Create subscription

post/v1/environments/{enironmentId}/subscriptions
Page View

Subscription endpoints allow you to review and manage subscriptions in a specified environment.

You must be a member of the environment and be assigned to an engineer role to manage subscriptions. Learn about roles.

Create subscription

Create a new subscription in the specified environment.

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/platform/v1/environments/{enironmentId}/subscriptions' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'accept: application/json' \
5
--header 'content-type: application/json' \
6
--data '{
7
"source": {
8
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
9
},
10
"destination": {
11
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
12
},
13
"dataModel": "PatientAdmin"
14
}'

Path Parameters

  • environmentId
    required, string

    Identifies the specific environment that you're operating in or on behalf of.

Request Body Schema

  • source
    required, object
    • id
      required, string

      Identifies the unique identifier for the source that initiates the data exchange.

      Format: uuid
  • destination
    required, object
    • id
      required, string

      Identifies the unique identifier for the destination that receives the data.

      Format: uuid
  • dataModel
    required, string

    Specifies the Redox data model used to exchange data between the source and destination.

Response fields and example

Example payload generated from schema
1
{
2
"meta": {
3
"version": "1.0.0"
4
},
5
"payload": {
6
"subscription": {
7
"source": {
8
"id": "3f7c5e24-91d4-4b55-9b65-4a6e2f3ea9c2",
9
"environmentFlag": "Production"
10
},
11
"destination": {
12
"id": "123e4567-e89b-12d3-a456-426614174000",
13
"environmentFlag": "Production"
14
},
15
"dataModel": "PatientAdmin",
16
"deletedAt": null
17
}
18
}
19
}
  • meta
    object
    • version
      string

      Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences.

  • payload
    object
    • subscription
      object

      Contains details about the subscription.

      • source
        object
        • id
          string

          Contains the unique identifier of the source.

          Format: uuid
        • environmentFlag
          string

          Indicates the environment type of the source.

      • destination
        object
        • id
          string

          Contains the unique identifier of the destination.

          Format: uuid
        • environmentFlag
          string

          Indicates the environment type of the destination.

      • dataModel
        string

        Specifies the Redox data model used for this subscription.

      • deletedAt
        nullable, string

        Indicates when the subscription was deleted, if applicable.

        Format: date-time