Native external references

Similar to cross-space references that allow you to link content across multiple spaces, Native external references allow you to integrate content from external sources using the Contentful App Framework.

To model the data from third-party systems, the following entity types have been introduced:

  • Resource Provider - a third-party system that provides resources. Each provider can have multiple resource types.
  • Resource Type - a specific type of resource (not the resource itself) that is provided by a resource provider.
  • Resource - a representation of real data in an external system.

Resource Provider

Create, return or delete a Resource Provider for a given App Definition in a given Organization.

Create a resource provider

Each app can have only one resource provider. PUT will fail if an app already has an associated resource provider.
Each app contains a manifest JSON file that describes the app and its capabilities. It contains a function property which is an array of functions the app can run (currently limited to only one function). The function.sys.id of the PUT request must be identical to the value of functions[0].id in the app’s manifest file.

Get a resource provider

Delete a resource provider

Each app can have only one resource provider which is a parent entity for resource types. It is not possible to delete a provider if it has associated resource types.

Resource Type

Create, return or delete a Resource Type for a given App Definition in a given Organization.

Create a resource type

Resource Providers are parent entities for Resource Types. PUT will fail if an app has no associated Resource Provider.

Get a resource type

Delete a resource type

Resource Type Collection

Return all Resource Types for a given App Definition in a given Organization.

Get all resource types

Resource Type Collection In Environment

Return all Resource Types from the most recent app installed in a given Space and Environment.

Get all resource types in an environment

Resource

Return all Resources of a Resource Type in a given Space and Environment.

Get all resources in an environment

Update a content type with a Resource Type field

Use this endpoint to add a Resource Type field to a content type or update an existing Resource Type field.

To update a content type with a Resource Type field, use the Create a content type with PUT endpoint, see example payload:

{
"sys": {
"type": "ContentType",
"...": ""
},
"fields": [
{
"id": "myResourceLink",
"type": "Array",
"localized": true,
"disabled": false,
"omitted": false,
"validations": [
{
"size": {
"min": "1",
"max": "3"
}
}
],
"allowedResources": [
{
"type": [
"RESOURCE_TYPE /**e.g.",
"Shopify:Product",
"TMDB:Person**/"
],
"...": ""
}
]
}
]
}