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!


Transition a Library

Libraries must progress through the publishing workflow to be properly tested and approved for publishing. This is achieved by transitioning the library state via an action supplied in the meta of a request.

Library states:


development

The Library is editable.

Available actions: submit

submitted

The Library has been submitted for review.

Available actions: approve, reject

approved

The Library has been approved for publishing.

Available actions: reject

rejected

The Library was rejected. Rejected libraries may be transitioned back to development for additional changes and submitted for an other review.

Available actions: develop

published

The Library has been published.

Definition

PATCH  /libraries/:id

Example Request

curl https://mc-api-activation-reactor-integration.adobe.io/libraries/: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": {
    "id": "LBfb786d9728bc4ae4931ab6efa8d11749",
    "type": "libraries",
    "meta": {
      "action": "submit"
    }
  }
}'

Example Response

200 OK
{
  "data": {
    "id": "LBfb786d9728bc4ae4931ab6efa8d11749",
    "type": "libraries",
    "attributes": {
      "created_at": "2018-06-15T19:09:57.245Z",
      "name": "My Library",
      "published_at": null,
      "state": "submitted",
      "updated_at": "2018-06-15T19:10:03.593Z",
      "build_required": true
    },
    "relationships": {
      "builds": {
        "links": {
          "related": "http://localhost:9010/libraries/LBfb786d9728bc4ae4931ab6efa8d11749/builds"
        }
      },
      "environment": {
        "links": {
          "self": "http://localhost:9010/libraries/LBfb786d9728bc4ae4931ab6efa8d11749/relationships/environment"
        },
        "data": null
      },
      "resources": {
        "links": {
          "related": "http://localhost:9010/libraries/LBfb786d9728bc4ae4931ab6efa8d11749/resources",
          "self": "http://localhost:9010/libraries/LBfb786d9728bc4ae4931ab6efa8d11749/relationships/resources"
        },
        "data": [

        ]
      },
      "upstream_library": {
        "data": null
      },
      "property": {
        "links": {
          "related": "http://localhost:9010/libraries/LBfb786d9728bc4ae4931ab6efa8d11749/property"
        },
        "data": {
          "type": "properties",
          "id": "PR167512c7ed1b4f718932cea2b5ea3721"
        }
      }
    },
    "links": {
      "property": "http://localhost:9010/properties/PR167512c7ed1b4f718932cea2b5ea3721",
      "self": "http://localhost:9010/libraries/LBfb786d9728bc4ae4931ab6efa8d11749"
    },
    "meta": {
      "build_status": null,
      "build_required_detail": "No build found since last state change"
    }
  }
}