Here is new documentation version.
You are reading outdated documentation, which will be shutdown soon!

REST API

ADX REST API documentation version v1

{schema}://{host}/api/{version}

  • schema: required(one of http, https - default: http)
  • host: required(string - default: localhost)
  • version: required(v1)

Application version configuration

Operations on application version configuration.

/app-configs/applications/{appName}/app-versions/{appVersionName} put get patch

put /app-configs/applications/{appName}/app-versions/{appVersionName}

Upserts application version configuration.

Secured by OAuth 2.0 with scopes:
  • application:update

Adx supports OAuth 2.0 for authenticating all API requests.

URI Parameters

  • appName: required(string)

    Application name.

    Example:

    smart_kettle
  • appVersionName: required(string)

    Application version name.

    Example:

    smart_kettle_v1

Body

Media type: application/json

Type: any

Example:

{
  "gw01": "077c3ffc-6a3f-4925-88c9-bfe30c5e6593",
  "gw02": [
    "moduleA",
    "moduleB"
  ],
  "gw03": {
    "key": "4ae4dc32-bebf-482c-8a55-c5b1d1b61409",
    "setting": {
      "enabled": true
    }
  }
}

HTTP status code 204

Application version configuration successfully updated.

HTTP status code 404

Application or application version name is not found, or the querying user is denied access.

Body

Media type: application/json

Type: object

Properties

  • message: required(string)

    Detailed error description.

Secured by OAuth 2.0

Headers

  • Authorization: optional (string)

    Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

get /app-configs/applications/{appName}/app-versions/{appVersionName}

Returns application version configuration.

Secured by OAuth 2.0 with scopes:
  • application:read

Adx supports OAuth 2.0 for authenticating all API requests.

URI Parameters

  • appName: required(string)

    Application name.

    Example:

    smart_kettle
  • appVersionName: required(string)

    Application version name.

    Example:

    smart_kettle_v1

HTTP status code 200

Application version configuration.

Body

Media type: application/json

Type: any

Example:

{
  "gw01": "077c3ffc-6a3f-4925-88c9-bfe30c5e6593",
  "gw02": [
    "moduleA",
    "moduleB"
  ],
  "gw03": {
    "key": "4ae4dc32-bebf-482c-8a55-c5b1d1b61409",
    "setting": {
      "enabled": true
    }
  }
}

HTTP status code 404

Application or application version name is not found, or the querying user is denied access.

Body

Media type: application/json

Type: object

Properties

  • message: required(string)

    Detailed error description.

Secured by OAuth 2.0

Headers

  • Authorization: optional (string)

    Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

patch /app-configs/applications/{appName}/app-versions/{appVersionName}

Patches application version configuration data via REST API PATCH request according to the RFC 6902.

Secured by OAuth 2.0 with scopes:
  • application:update

Adx supports OAuth 2.0 for authenticating all API requests.

URI Parameters

  • appName: required(string)

    Application name.

    Example:

    smart_kettle
  • appVersionName: required(string)

    Application version name.

    Example:

    smart_kettle_v1

Body

Media type: application/json

Type: any

Example:

[
  {
    "op": "remove",
    "path": "/gw01/setting"
  },
  {
    "op": "add",
    "path": "/gw03/setting/enabled",
    "value": true
  }
]

HTTP status code 204

Application version configuration successfully patched.

HTTP status code 404

Application name is not found, patch path not found, or the querying user is denied access.

Body

Media type: application/json

Type: object

Properties

  • message: required(string)

    Detailed error description.

Secured by OAuth 2.0

Headers

  • Authorization: optional (string)

    Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.