SweetConnect LogoSweetConnect
ApiDatabus datasources

Create a new datasource

Provision a new datasource for the current organization and OEM, if permitted

Access restricted to roles:

  • admin
  • manufacturer-admin
  • manufacturer-user
POST
/v1/datasources

Request Body

application/json

datasourceType*string

Type of the datasource

Value in"InfluxDB_v2" | "InfluxDB_v3" | "Inuatek"
name*string

Name of the datasource

adapter*|

The connection information of the datasource

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://test.sweetconnect.io/api/databus-controller/v1/datasources" \  -H "Content-Type: application/json" \  -d '{    "datasourceType": "InfluxDB_v2",    "name": "influxdb-v2-org-12345",    "adapter": {      "org": "sweetconnect",      "url": "https://influxdb.12345.example.org",      "token": "readonly-token",      "bucket": "default"    }  }'
{
  "data": {
    "id": "ce452d7d-448a-4d42-98e0-ac879f7baae9"
  }
}
{
  "errors": [
    {
      "errorCode": "RequestValidationError",
      "message": "The 'username' field is required.",
      "extension": {
        "type": "body",
        "key": "username"
      }
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "Unauthorized",
      "message": "Authentication is required to access this resource.",
      "extension": {}
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "NoPermission",
      "message": "You do not have permission to access this resource.",
      "extension": {}
    }
  ]
}