Create links

post/v1/environments/{environmentId}/operations/links
MCP ToolWrite
Page View

Subscription endpoints allow you to review, compare, and manage subscriptions and their related links to assets (i.e., filters, config modifiers, translation sets).

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

Create links

Closed beta feature

This is a closed beta feature for a limited pilot group by invitation only. We’re not currently accepting additional participants, but we’ll let you know when it’s available to everyone.

Add one or more subscription link(s) for the selected asset(s). A link’s settings can be independent or taken from an existing link using `fromLink`.

The request contains a list of links for one or more asset types. To link one asset to multiple subscriptions, include a link entry for each one. For example, an asset with 3 subscription links should have 3 entries in the list.

A filter can only have one subscription link.

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/platform/v1/environments/{environmentId}/operations/links' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'accept: application/json' \
5
--header 'content-type: application/json' \
6
--data '{
7
"links": [
8
{
9
"asset": {
10
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
11
"type": "configModifier"
12
},
13
"subscription": {
14
"source": {
15
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
16
},
17
"destination": {
18
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
19
},
20
"dataModel": "PatientAdmin"
21
},
22
"fromLink": {
23
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
24
},
25
"linkSettings": {
26
"expectedDataModel": "PatientAdmin",
27
"eventTypes": [
28
"string"
29
],
30
"ownedBy": "source",
31
"processingLocation": "source-request",
32
"direction": "to-from",
33
"paths": [
34
{
35
"dataType": "string",
36
"title": "Custom Path",
37
"path": "$.Allergies[*].Type.Code"
38
}
39
]
40
}
41
}
42
]
43
}'

Path Parameters

  • environmentId
    required, string

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

Request Body Schema

    Contains the links to create within the specified environment.

  • Lists the links to create (max allowed is 50). The same asset may appear in several entries, one per subscription.

    • asset
      required, object

      Identifies the asset to link. It must belong to the specified environment.

      • id
        required, string

        Contains the unique identifier of the asset.

        Format: uuid
      • type
        required, string
        Possible Values: configModifier, filter, translationSet
    • subscription
      required, object

      Identifies the subscription to link the asset to based on its source, destination, and data model.

      • source
        required, object

        Specifies the source of the subscription that an asset is or should be linked to.

        • id
          required, string

          Contains the unique identifier of the source.

          Format: uuid
      • destination
        required, object

        Specifies the destination of the subscription that an asset is or should be linked to.

        • id
          required, string

          Contains the unique identifier of the destination.

          Format: uuid
      • dataModel
        required, string

        Specifies the Redox data model that the link applies to or should apply to.

    • Identifies an existing link for the same asset type to take settings from. Any value in linkSettings overrides the respective setting taken from this link.

      • id
        required, string

        Contains the unique identifier of the link for a specified asset.

        Format: uuid
    • Contains the link's settings, which depend on the asset type. A config modifier link accepts expectedDataModel, eventTypes, ownedBy, and processingLocation; a translation set link accepts expectedDataModel, direction, processingLocation, and paths; a filter link has no settings. A setting that doesn't apply to the asset type fails the whole request. When you give fromLink, any setting here overrides the setting taken from that link.

      • Specifies the data model when it is expected to differ from the subscription's data model. Defaults to the subscription's data model.

      • For config modifier links only, specifies the event types of the data model that the link applies to. Set to null to apply the config modifier's link to every event type.

      • For config modifier links only, indicates whether the source or destination system owns the link. Inferred from the subscription when omitted.

        Possible Values: source, destination
      • Identifies where a link will be applied during log processing. There are up to four stages that an asset can be linked to, depending on whether you own either the source, the destination, or both.

        Possible Values: source-request, destination-request, source-response, destination-response
      • Indicates the direction in which the translation set is or should be linked. This can be either from-to (translates a "from" value into a "to" value), or to-from (tranlates a "to" value into a "from" value).

        Possible Values: from-to, to-from
      • Lists the field paths linked to a translation set. These paths must be unique on the path property.

        • Describes the format of the data found at the path location.

        • Specifies a human-readable title for the field path.

        • Specifies the path in a message to the location of the data to be translated. The path must always start with a $ to be considered valid.

Response fields and example

Example payload generated from schema
1
{
2
"meta": {
3
"version": "1.0.0"
4
},
5
"payload": {
6
"links": [
7
{
8
"asset": {
9
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
10
"type": "configModifier"
11
},
12
"link": {
13
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
14
"subscription": {
15
"source": {
16
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
17
},
18
"destination": {
19
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
20
},
21
"dataModel": "PatientAdmin"
22
}
23
},
24
"action": "created"
25
}
26
],
27
"failures": [
28
{
29
"asset": {
30
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
31
"type": "configModifier"
32
},
33
"link": {
34
"subscription": {
35
"source": {
36
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
37
},
38
"destination": {
39
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
40
},
41
"dataModel": "PatientAdmin"
42
}
43
},
44
"error": {
45
"id": "string",
46
"code": "asset.not.found",
47
"title": "Not Found",
48
"detail": "string",
49
"meta": {
50
"isTransient": true
51
}
52
}
53
}
54
]
55
}
56
}
  • 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
    • Lists the links that now exist, whether they were created by this request or already existed.

      • asset
        object

        Identifies the asset to link. It must belong to the specified environment.

        • id
          required, string

          Contains the unique identifier of the asset.

          Format: uuid
        • type
          required, string
          Possible Values: configModifier, filter, translationSet
        • id
          string

          Contains the unique identifier of the link for a specified asset.

          Format: uuid
        • subscription
          object

          Identifies the subscription to link the asset to based on its source, destination, and data model.

          • source
            required, object

            Specifies the source of the subscription that an asset is or should be linked to.

            • id
              required, string

              Contains the unique identifier of the source.

              Format: uuid
          • destination
            required, object

            Specifies the destination of the subscription that an asset is or should be linked to.

            • id
              required, string

              Contains the unique identifier of the destination.

              Format: uuid
          • dataModel
            required, string

            Specifies the Redox data model that the link applies to or should apply to.

      • action
        string

        Indicates whether this request created the link or found an existing one that went unchanged. An unchanged link reports the existing link's ID.

        Possible Values: created, unchanged
    • failures
      Array of object

      Lists any links that weren't added, along with the error that prevented it. See error.meta.isTransient to learn whether you can safely retry adding a link. This array is empty when every link was added successfully.

      • asset
        object

        Identifies the asset to link. It must belong to the specified environment.

        • id
          required, string

          Contains the unique identifier of the asset.

          Format: uuid
        • type
          required, string
          Possible Values: configModifier, filter, translationSet
      • Identifies the intended subscription of the failed link so the correct entry can be retried.

        • subscription
          object

          Identifies the subscription to link the asset to based on its source, destination, and data model.

          • source
            required, object

            Specifies the source of the subscription that an asset is or should be linked to.

            • id
              required, string

              Contains the unique identifier of the source.

              Format: uuid
          • destination
            required, object

            Specifies the destination of the subscription that an asset is or should be linked to.

            • id
              required, string

              Contains the unique identifier of the destination.

              Format: uuid
          • dataModel
            required, string

            Specifies the Redox data model that the link applies to or should apply to.

      • error
        object

        Explains why one item in a bulk request failed. The overall request still returns 200. A request that's rejected before any work starts (e.g., due to a malformed body) returns 400 instead.

        • id
          required, string

          Contains a unique identifier for this error instance.

        • code
          required, string

          Identifies the error type, which can be used to find relevant troubleshooting information.

        • title
          required, string

          Displays the high-level error message.

        • detail
          required, string

          Contains the specific error details for this item.

        • meta
          object

          Contains additional details about the failure. Some errors add other properties, such as the ID of an asset that was partially created.

          • isTransient
            boolean

            Indicates whether retrying this item as-is might succeed. true means the failure was temporary (e.g., a timeout), so you can retry the item. false means the item will continue to fail until you correct the issue (e.g., the asset doesn't exist or its name is a duplicate). When absent, the failure wasn't classified; review detail before retrying.

FHIR® is a registered trademark of Health Level Seven International (HL7) and is used with the permission of HL7. Use of this trademark does not constitute an endorsement of products/services by HL7®.