Libraries

Libraries expose the deepest workflow surface in the SDK because they cover CRUD, relationship management, environment assignment, build triggering, note support, workflow transitions, and resource bundling. If your goal is Launch promotion, this is usually the first page to read in the release workflow set.

Familyclient.libraries

Libraries

AttributeData typeDescription
list_for_property(property_id)
Array<Library>

Lists libraries for a property.

find(library_id)
Library

Fetches a single library.

find_with_resources(library_id)
LibraryWithResources

Fetches the library with included rules, data elements, and extensions. Each included resource also exposes a gem-added revision_id derived from relationships.latest_revision.data.id.

compare(current_library_id, baseline_library_id:, property_id:)
LibraryComparison

Compares two libraries from the same property and returns revision-aware entries plus normalized review output for each resource.

add_rules / remove_rules / set_rules
nil

Manage the rule relationship incrementally or by full replacement.

add_data_elements / remove_data_elements / set_data_elements
nil

Manage data element relationships.

add_extensions / remove_extensions / set_extensions
nil

Manage extension relationships.

assign_environment(library_id, environment_id)
nil

Assigns an environment before building.

transition(library_id, state:)
Library

Moves the library through development, submission, approval, rejection, and publication.

build(library_id)
Build

Triggers a build for the library.

Library workflow

Library workflow

# PR123 = property ID.
# RL123 = rule ID.
# DE123 = data element ID.
# EN123 = environment ID.
# Create a new library inside the property.
library = client.libraries.create(
  # Parent property for the new library.
  property_id: "PR123",
  # Human-readable library name.
  name:        "Release 1.0"
)

# Add an existing rule to the library.
client.libraries.add_rules(library.id, ["RL123"])
# Add an existing data element to the library.
client.libraries.add_data_elements(library.id, ["DE123"])
# Assign the library to an environment before building.
client.libraries.assign_environment(library.id, "EN123")

# Trigger a new build for the library.
build = client.libraries.build(library.id)

Comparison workflow

Use client.libraries.compare(...) when you want a full library-level review instead of a single-resource upstream lookup.

Continue to Library comparison for the full comparison workflow, review object shape, and sample output patterns.

Included resources

Sample: fetch a library with included resources

GET /libraries/:library_id?include=rules,data_elements,extensions

# LB... = library ID.
# The include query parameter asks Adobe to embed rules, data elements, and extensions in one response.
curl -s "https://reactor.adobe.io/libraries/LB1234567890abcdef1234567890abcd?include=rules,data_elements,extensions" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "x-api-key: YOUR_ADOBE_CLIENT_ID" \
  -H "x-gw-ims-org-id: YOUR_IMS_ORG_ID" \
  -H "Accept: application/vnd.api+json;revision=1"

Sample response

{
  // Primary library resource.
  "data": {
    // LB... = library ID.
    "id": "LB1234567890abcdef1234567890abcd",
    "type": "libraries",
    "attributes": {
      // Human-readable library name.
      "name": "Release 1.0",
      // Workflow state of the library.
      "state": "development",
      // Whether Adobe considers the library published.
      "published": false,
      // Adobe creation timestamp.
      "created_at": "2026-03-27T08:10:03.000Z",
      // Adobe last-update timestamp.
      "updated_at": "2026-03-27T08:14:55.000Z",
      // Publish timestamp, or null while unpublished.
      "published_at": null,
      // Additional Adobe build detail when a build is required.
      "build_required_detail": null
    }
  },
  // Included resources requested through the include query parameter.
  "included": [
    {
      // RL... = rule ID included in the library.
      "id": "RL1234567890abcdef1234567890abcd",
      "type": "rules",
      "attributes": {
        // Human-readable rule name.
        "name": "Order Confirmation",
        // Whether the rule is enabled.
        "enabled": true,
        // Adobe creation timestamp.
        "created_at": "2026-03-26T10:05:41.000Z",
        // Adobe last-update timestamp.
        "updated_at": "2026-03-26T10:05:41.000Z",
        // Publish timestamp, or null while unpublished.
        "published_at": null,
        // Timestamp of the latest revision.
        "revised_at": "2026-03-26T10:07:02.000Z"
      },
      "relationships": {
        "latest_revision": {
          "data": {
            // RE... = revision ID for the current rule revision.
            "id": "RE1234567890abcdef1234567890abcd",
            "type": "revisions"
          }
        }
      }
    },
    {
      // DE... = data element ID included in the library.
      "id": "DE1234567890abcdef1234567890abcd",
      "type": "data_elements",
      "attributes": {
        // Human-readable data element name.
        "name": "Page Title",
        // Whether the data element is enabled.
        "enabled": true,
        // Delegate used to resolve the data element value.
        "delegate_descriptor_id": "core::dataElements::custom-code",
        // Serialized data element settings.
        "settings": "{\"source\":\"return document.title;\"}",
        // Adobe creation timestamp.
        "created_at": "2026-03-26T10:22:11.000Z",
        // Adobe last-update timestamp.
        "updated_at": "2026-03-26T10:22:11.000Z",
        // Publish timestamp, or null while unpublished.
        "published_at": null
      },
      "relationships": {
        "latest_revision": {
          "data": {
            // RE... = revision ID for the current data element revision.
            "id": "RE2234567890abcdef1234567890abcd",
            "type": "revisions"
          }
        }
      }
    }
  ]
}

Continue to Upstream chain when you need to compare resources across stages.

Was this page helpful?