WARNING

WARNING: These APIs are currently in an 'alpha' state and are likely to change over time. We recommend you not use them in a production setting at this time!


Update an Environment

Attributes

archive
boolean - optional
archive_passphrase
string - optional
include_debug_library
boolean - optional
name
string - optional
path
string - optional

Definition

PATCH  /environments/:id

Example Request

curl https://mc-api-activation-reactor-integration.adobe.io/environments/:id \
  -H "Accept: application/vnd.api+json;revision=1" \
  -H "Content-Type: application/vnd.api+json" \
  -H "Authorization: Bearer [TOKEN]" \
  -H "X-Api-Key: [KEY]" \
  -X PATCH \
  -d \
'
{
  "data": {
    "attributes": {
      "name": "New environment name"
    },
    "id": "EN9ad8b036489442e7bbc6267854c67562",
    "type": "environments"
  }
}'

Example Response

200 OK
{
  "data": {
    "id": "EN9ad8b036489442e7bbc6267854c67562",
    "type": "environments",
    "attributes": {
      "archive": false,
      "created_at": "2018-08-31T16:49:52.907Z",
      "library_path": "",
      "library_name": "launch-EN9ad8b036489442e7bbc6267854c67562-development.min.js",
      "library_entry_points": [
        {
          "library_name": "launch-EN9ad8b036489442e7bbc6267854c67562-development.min.js",
          "minified": true,
          "references": [
            "launch-EN9ad8b036489442e7bbc6267854c67562-development.min.js"
          ]
        },
        {
          "library_name": "launch-EN9ad8b036489442e7bbc6267854c67562-development.js",
          "minified": false,
          "references": [
            "launch-EN9ad8b036489442e7bbc6267854c67562-development.js"
          ]
        }
      ],
      "name": "New environment name",
      "path": "//assets.adobedtm.com/staging",
      "stage": "development",
      "updated_at": "2018-08-31T16:49:53.123Z",
      "status": "succeeded"
    },
    "relationships": {
      "library": {
        "links": {
          "related": "http://localhost:9010/environments/EN9ad8b036489442e7bbc6267854c67562/library"
        },
        "data": null
      },
      "builds": {
        "links": {
          "related": "http://localhost:9010/environments/EN9ad8b036489442e7bbc6267854c67562/builds"
        }
      },
      "adapter": {
        "links": {
          "related": "http://localhost:9010/environments/EN9ad8b036489442e7bbc6267854c67562/adapter",
          "self": "http://localhost:9010/environments/EN9ad8b036489442e7bbc6267854c67562/relationships/adapter"
        },
        "data": {
          "id": "ADfc273b1e1f9e47db85fc7b0c8a50daba",
          "type": "adapters"
        }
      },
      "property": {
        "links": {
          "related": "http://localhost:9010/environments/EN9ad8b036489442e7bbc6267854c67562/property"
        },
        "data": {
          "id": "PRbd23870186e24c3abf244b463fc07d82",
          "type": "properties"
        }
      }
    },
    "links": {
      "property": "http://localhost:9010/properties/PRbd23870186e24c3abf244b463fc07d82",
      "self": "http://localhost:9010/environments/EN9ad8b036489442e7bbc6267854c67562"
    },
    "meta": {
      "archive_encrypted": false
    }
  }
}