Skip to navigation

Entity relationships

In active development: The Experience Management API is shared with design partners while it is being built out. The shape of resources and endpoints may change before general availability.

Find Experiences that depend on an entity in an environment. The response contains Experience resource links, a total count, and cursor-based pagination links.

List affected Experiences

List affected Experiences

GET /spaces/{spaceId}/environments/{environmentId}/relationships/{entityType}/{entityId}/ancestors/experiences

Set entityType to entry, asset, component, data-assembly, experience-fragment, or experience-template. Set entityId to the ID of that entity. Authenticate with a Content Management API token, as for other Experience Management API endpoints.

Access and permissions

Any member of the space containing the requested entity can use this endpoint with a Content Management API token. No additional role permission is required.

The lookup can return Experiences from other spaces. Results are not filtered by your access to those Experiences, so resource links may reveal IDs of Experiences you cannot access. Each CRN also identifies the Experience’s space and environment. total includes those Experiences. A CRN does not grant access to their content.

The response has this shape:

{
"sys": { "type": "Array" },
"items": [
{
"sys": {
"type": "ResourceLink",
"linkType": "Contentful:Experience",
"urn": "crn:contentful:::content:spaces/my-space/environments/master/experiences/my-experience"
}
}
],
"total": 1,
"pages": {}
}

Where:

  • items contains Experience resource links.
  • total is the number of affected Experiences. If more results are available, follow the relative URL in pages.next. Use pages.prev to move back.

An empty pages object means there are no adjacent pages. The default limit is 100. You can also pass pageNext or pagePrev with the opaque cursor from a pagination link.

Limitations

For entry seeds, an Experience may be listed even when the requested Entry is absent from its resolved output. The relationship lookup does not account for which fields a Data Assembly’s GraphQL query selects. It may therefore consider a published reference in a field the query does not use.