Skip to content

Some endpoints for action doesn't provide a relevant example #129

@mems

Description

@mems

Topic Link

Description

Some endpoints where data.meta.action is required, their examples omit it.
Some examples are wrong, look likes a copy of the "create" example.

Examples should be relevant like the following ones.

Discontinue an ExtensionPackage:

curl https://reactor.adobe.io/extension_packages/: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]" \
  -H "X-Gw-Ims-Org-Id: [ORG_ID]" \
  -X PATCH \
  -d \
'
{
  "data": {
    "attributes": {
      "discontinued": true
    },
    "type": "extension_packages",
    "id": "EP5eb32f57d71e436cac2b8e0e72ad08d2"
  }
}'

Private Release an ExtensionPackage:

curl https://reactor.adobe.io/extension_packages/: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]" \
  -H "X-Gw-Ims-Org-Id: [ORG_ID]" \
  -X PATCH \
  -d \
'
{
  "data": {
    "meta": {
      "action": "release_private"
    },
    "type": "extension_packages",
    "id": "EP5eb32f57d71e436cac2b8e0e72ad08d2"
  }
}'

Revise a DataElement:

curl https://reactor.adobe.io/data_elements/: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]" \
  -H "X-Gw-Ims-Org-Id: [ORG_ID]" \
  -X PATCH \
  -d \
'
{
  "data": {
    "attributes": {
      "name": "My New Name",
      "settings": "{\"elementSelector\":\".target-element-b\",\"elementProperty\":\"html\"}"
    },
    "meta": {
      "action": "revise"
    },
    "type": "data_elements",
    "id": "DE1246eb06e8884ef4b34a8e87dd9673a7"
  }
}'

Additional information

That not the case for Republish a build from a published Library.

Also, maybe it's not a documentation issue, but the id supplied by the data is required but useless. The value is ignored, never checked with the one provided in that path.

curl https://reactor.adobe.io/extension_packages/: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]" \
  -H "X-Gw-Ims-Org-Id: [ORG_ID]" \
  -X PATCH \
  -d \
'
{
  "data": {
    "attributes": {
      "discontinued": true
    },
    "type": "extension_packages",
    "id": "EP5eb32f57d71e436cac2b8e0e72ad08d2"<--- the value here
  }
}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Incoming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions