Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mems opened this issue Jul 26, 2023 · 1 comment
Open

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

mems opened this issue Jul 26, 2023 · 1 comment

Comments

@mems
Copy link

mems commented Jul 26, 2023

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
  }
}'
@jeffreywalter
Copy link

@adobe export issue to Jira project PDCL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Incoming
Development

No branches or pull requests

2 participants