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!


Get the upstream Library for a Library

Retrieve the data for the upstream of the specified Library, if it has one.

What is an Upstream Library?

An upstream Library is the Library in the next-most “stage”, which the current library uses as a foundation.

As a Library is developed, it moves through four different stages: Development, Submitted, Approved, and Published. Each Library moves through the stages in that order, except that Libraries in Submitted or Approved can also move back to Development.

The importance of the upstream Library is that a Library represents a set of changes relative to its upstream. This means that if one development Library is moved to a later stage, any other development Libraries will have to be rebuilt relative to their new upstream.

Usually, a Library has exactly one upstream Library. However, if that Library’s Property has no Libraries in the Submitted, Approved, or Published stages, then any Development Libraries will not have an upstream Library. If there is no upstream, the Library represents a set of changes relative to the empty library.

Definition

GET  /libraries/:library_id/upstream_library

Example Request

curl https://mc-api-activation-reactor-integration.adobe.io/libraries/:library_id/upstream_library \
  -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 GET
  

Example Response

200 OK
{
  "data": {
    "id": "LBc0b23075309847aca8a7edb5bdfc67ad",
    "type": "libraries",
    "attributes": {
      "created_at": "2018-08-31T16:51:26.191Z",
      "name": "My Library",
      "published_at": null,
      "state": "submitted",
      "updated_at": "2018-08-31T16:51:32.341Z",
      "build_required": true
    },
    "relationships": {
      "builds": {
        "links": {
          "related": "http://localhost:9010/libraries/LBc0b23075309847aca8a7edb5bdfc67ad/builds"
        }
      },
      "environment": {
        "links": {
          "self": "http://localhost:9010/libraries/LBc0b23075309847aca8a7edb5bdfc67ad/relationships/environment"
        },
        "data": null
      },
      "resources": {
        "links": {
          "related": "http://localhost:9010/libraries/LBc0b23075309847aca8a7edb5bdfc67ad/resources",
          "self": "http://localhost:9010/libraries/LBc0b23075309847aca8a7edb5bdfc67ad/relationships/resources"
        },
        "data": [

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