Promote asset (beta)

post/v1/promotions
Page View

Promotion endpoints allow you to push assets from staging to production environments in your Redox organization. This creates a promotion association between the two assets so that you can keep track of when production assets might be out of date. Currently, you can promote config modifiers.

Learn more about promotions. Or learn how to promote a config modifier in the Redox dashboard.

Promote asset (beta)

Promote a config modifier from a staging environment to a production environment.

If a user edits the config modifier in the staging environment later, a new version of it is created. That means you have to promote it to production again. You can use this same endpoint for promoting or re-promoting a config modifier.

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/platform/v1/promotions' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'accept: application/json' \
5
--header 'content-type: application/json' \
6
--data '{
7
"promotingAssets": [
8
{
9
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
10
"type": "configModifier"
11
}
12
],
13
"fromEnvironment": {
14
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
15
},
16
"toEnvironment": {
17
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
18
}
19
}'

Request Body Schema

    Contains the necessary details to promote asset(s) from staging to production.

  • promotingAssets
    Array of object
    • id
      string

      Contains the unique identifier of the asset.

      Format: uuid
    • type
      string
      Value: configModifier
  • fromEnvironment
    object

    Specifies the staging environment that the asset should be promoted from.

    • id
      string

      Contains the unique identifier of the Redox environment.

      Format: uuid
  • toEnvironment
    object

    Specifies the production environment that the original asset from staging will be promoted to.

    • id
      string

      Contains the unique identifier of the Redox environment.

      Format: uuid

Response fields and example

Example payload generated from schema
1
{
2
"meta": {
3
"version": "1.0.0"
4
},
5
"payload": {
6
"promotedAssets": [
7
{
8
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
9
"version": 1,
10
"action": "created",
11
"environment": {
12
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
13
},
14
"type": "configModifier",
15
"promotingAsset": {
16
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
17
"environment": {
18
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
19
},
20
"type": "configModifier"
21
}
22
}
23
]
24
}
25
}
  • 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
    • promotedAssets
      Array of object
      • id
        string

        Contains the unique identifier of the asset.

        Format: uuid
      • version
        number

        Specifies the version of the promoted asset in the production environment.

      • action
        string

        Indicates whether the asset was promoted for the first time (i.e., created) or re-promoted with a new version (i.e., updated).

        Possible Values: created, updated
      • environment
        object

        Describes the Redox environment that the asset belongs to.

        • id
          string

          Contains the unique identifier of the Redox environment.

          Format: uuid
      • type
        string
        Value: configModifier
      • promotingAsset
        object

        Contains details about the original asset in the staging environment that was promoted to create the production asset.

        • id
          string

          Contains the unique identifier of the asset.

          Format: uuid
        • environment
          object

          Describes the Redox environment that the asset belongs to.

          • id
            string

            Contains the unique identifier of the Redox environment.

            Format: uuid
        • type
          string
          Value: configModifier