Content API (1.2.0)

Download OpenAPI specification:Download

The Content API lets you use Matrix as a headless CMS through a REST API web service.
As a system administrator, you can control what parts of the asset tree the Content API can access, and what permission restrictions each Content API should inherit based on the user profile selected.
Read the Using Content API documentation to learn how to configure a Content API token asset in Matrix.
Read the API reference documentation to learn more about the base URL, authentication methods, and error responses relating to this API.

Authentication

BearerAuth

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "Bearer abcd1234"

Asset

Fields and attributes by asset ID

Return the fields and attributes for a single asset using its asset ID.

Authorizations:
path Parameters
assetId
required
string
Example: 1234

The ID of the asset.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

query Parameters
data
Array of strings or null
Example: data=attributes,contents

A comma-separated list of additional asset data to return.

include_dependents
string or null
Default: "false"
Enum: "true" "false"
Example: include_dependents=true

Include dependent children assets in a normalized format using a hierarchical format in asset tree sort order. Data query parameters included in the request will be applied to the dependent children.
Note: Any value other than "true" will be treated as false.

base_url
string or null
Example: base_url=https://my-matrix-site

Used in conjunction with resolving the "url" of the asset. The logic will attempt to identify a closest match to this parameter and return it as preference.

context
context or null
Example: context=American%20English

Set the context for the request to the specified context based on name. Applies to all data that is returned.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "type": "page",
  • "type_name": "string",
  • "version": "string",
  • "name": "string",
  • "short_name": "string",
  • "status": {
    },
  • "created": {
    },
  • "updated": {
    },
  • "published": {
    },
  • "status_changed": {
    },
  • "attributes": {
    },
  • "metadata": {
    },
  • "contents": "string",
  • "thumbnail": {
    },
  • "include_dependents": [
    ],
  • "additional": { }
}

Fields and attributes by asset URL

Return the fields and attributes for a single asset using its asset URL.

Authorizations:
query Parameters
url
required
string
Example: url=https://my-matrix-site/some/asset/url

The URL of the asset being requested.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

data
Array of strings or null
Example: data=attributes,contents

A comma-separated list of additional asset data to return.

include_dependents
string or null
Default: "false"
Enum: "true" "false"
Example: include_dependents=true

Include dependent children assets in a normalized format using a hierarchical format in asset tree sort order. Data query parameters included in the request will be applied to the dependent children.
Note: Any value other than "true" will be treated as false.

base_url
string or null
Example: base_url=https://my-matrix-site

Used in conjunction with resolving the "url" of the asset. The logic will attempt to identify a closest match to this parameter and return it as preference.

context
context or null
Example: context=American%20English

Set the context for the request to the specified context based on name. Applies to all data that is returned.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "type": "page",
  • "type_name": "string",
  • "version": "string",
  • "name": "string",
  • "short_name": "string",
  • "status": {
    },
  • "created": {
    },
  • "updated": {
    },
  • "published": {
    },
  • "status_changed": {
    },
  • "attributes": {
    },
  • "metadata": {
    },
  • "contents": "string",
  • "thumbnail": {
    },
  • "include_dependents": [
    ],
  • "additional": { }
}

Site Lineage

Site lineage by asset ID

Return the site lineage for an asset (links and related asset details) using its asset ID.

Authorizations:
path Parameters
assetId
required
string
Example: 1234

The ID of the asset.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

query Parameters
data
Array of strings or null
Example: data=attributes,contents

A comma-separated list of additional asset data to return.

include_dependents
string or null
Default: "false"
Enum: "true" "false"
Example: include_dependents=true

Include dependent children assets in a normalized format using a hierarchical format in asset tree sort order. Data query parameters included in the request will be applied to the dependent children.
Note: Any value other than "true" will be treated as false.

base_url
string or null
Example: base_url=https://my-matrix-site

Used in conjunction with resolving the "url" of the asset. The logic will attempt to identify a closest match to this parameter and return it as preference.

context
context or null
Example: context=American%20English

Set the context for the request to the specified context based on name. Applies to all data that is returned.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

Responses

Response samples

Content type
application/json
{
  • "links": [
    ],
  • "assets": [
    ]
}

Site lineage by asset URL

Return the site lineage for an asset (links and related asset details) using its asset URL.

Authorizations:
query Parameters
url
required
string
Example: url=https://my-matrix-site/some/asset/url

The URL of the asset being requested.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

data
Array of strings or null
Example: data=attributes,contents

A comma-separated list of additional asset data to return.

include_dependents
string or null
Default: "false"
Enum: "true" "false"
Example: include_dependents=true

Include dependent children assets in a normalized format using a hierarchical format in asset tree sort order. Data query parameters included in the request will be applied to the dependent children.
Note: Any value other than "true" will be treated as false.

base_url
string or null
Example: base_url=https://my-matrix-site

Used in conjunction with resolving the "url" of the asset. The logic will attempt to identify a closest match to this parameter and return it as preference.

context
context or null
Example: context=American%20English

Set the context for the request to the specified context based on name. Applies to all data that is returned.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

Responses

Response samples

Content type
application/json
{
  • "links": [
    ],
  • "assets": [
    ]
}

Asset Children

Child assets by asset ID

Return the child assets of a parent asset based on the parent asset's ID.

Authorizations:
path Parameters
assetId
required
string
Example: 1234

The ID of the asset.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

query Parameters
data
Array of strings or null
Example: data=attributes,contents

A comma-separated list of additional asset data to return.

depth
integer or null [ 1 .. 5 ]
Default: 1
Example: depth=3

Specifies the depth of the asset tree that children will be returned for.
Note: An asset can appear multiple times within the asset tree. If this occurs it will appear once in the "assets" array but appear multiple times in the "links" array.

limit
integer or null >= 0
Default: 100
Example: limit=20

Specifies how many child assets to return for the current request.

page
integer or null >= 1
Default: 1
Example: page=2

Specifies how many result pages to return for the current request.

asset_types
Array of strings or null
Example: asset_types=page_standard,folder

Filter child assets by asset types. Specify multiple asset types with a comma-separated list.

sort_by
string
Enum: "id" "type" "version" "name" "short_name" "status.id" "created.date" "created.user_id" "updated.date" "updated.user_id" "published.date" "published.user_id" "status_changed.date" "status_changed.userid"
Example: sort_by=status

Sort child assets by standard asset fields.

sort_order
string or null
Enum: "asc" "desc"
Example: sort_order=desc

Sort child assets in ascending or descending order.

include_dependents
string or null
Default: "false"
Enum: "true" "false"
Example: include_dependents=true

Include dependent children assets in a normalized format using a hierarchical format in asset tree sort order. Data query parameters included in the request will be applied to the dependent children.
Note: Any value other than "true" will be treated as false.

base_url
string or null
Example: base_url=https://my-matrix-site

Used in conjunction with resolving the "url" of the asset. The logic will attempt to identify a closest match to this parameter and return it as preference.

context
context or null
Example: context=American%20English

Set the context for the request to the specified context based on name. Applies to all data that is returned.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

Responses

Response samples

Content type
application/json
{
  • "links": [
    ],
  • "assets": [
    ],
  • "page_info": [
    ]
}

Child assets by asset URL

Return the child assets of a parent asset based on the parent asset's URL.

Authorizations:
query Parameters
url
required
string
Example: url=https://my-matrix-site/some/asset/url

The URL of the asset being requested.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

data
Array of strings or null
Example: data=attributes,contents

A comma-separated list of additional asset data to return.

depth
integer or null [ 1 .. 5 ]
Default: 1
Example: depth=3

Specifies the depth of the asset tree that children will be returned for.
Note: An asset can appear multiple times within the asset tree. If this occurs it will appear once in the "assets" array but appear multiple times in the "links" array.

limit
integer or null >= 0
Default: 100
Example: limit=20

Specifies how many child assets to return for the current request.

page
integer or null >= 1
Default: 1
Example: page=2

Specifies how many result pages to return for the current request.

asset_types
Array of strings or null
Example: asset_types=page_standard,folder

Filter child assets by asset types. Specify multiple asset types with a comma-separated list.

sort_by
string
Enum: "id" "type" "version" "name" "short_name" "status.id" "created.date" "created.user_id" "updated.date" "updated.user_id" "published.date" "published.user_id" "status_changed.date" "status_changed.userid"
Example: sort_by=status

Sort child assets by standard asset fields.

sort_order
string or null
Enum: "asc" "desc"
Example: sort_order=desc

Sort child assets in ascending or descending order.

include_dependents
string or null
Default: "false"
Enum: "true" "false"
Example: include_dependents=true

Include dependent children assets in a normalized format using a hierarchical format in asset tree sort order. Data query parameters included in the request will be applied to the dependent children.
Note: Any value other than "true" will be treated as false.

base_url
string or null
Example: base_url=https://my-matrix-site

Used in conjunction with resolving the "url" of the asset. The logic will attempt to identify a closest match to this parameter and return it as preference.

context
context or null
Example: context=American%20English

Set the context for the request to the specified context based on name. Applies to all data that is returned.
Note: This value must be URL-encoded to support potentially unsafe characters in the results.

Responses

Response samples

Content type
application/json
{
  • "links": [
    ],
  • "assets": [
    ],
  • "page_info": [
    ]
}