Download OpenAPI specification:Download
This illustrates the key aspects of getting content from Delivery Endpoints.
In Magnolia, you create your own endpoints via configuration to match your needs.
We provide the output of two example content types: Tours
and Pages
.
An example of working with a standard Magnolia content type.
We use tours
as a concrete example here, but the format will apply to any delivery endpoint that you create.
The tours
collection has the following extra properties:
An endpoint that returns Pages from the website
workspace - an important special case.
A Page
has a heirarchy of Areas
and Components
, so the endpoint returns a tree.
Different properties will be returned on each node, depending on the dialog associated with the page template or component template.
If no orderBy
parameter is used, the order of the results is unknown.
It probably will not be the same order of the items seen by users in the AdminCentral Magnolia UI.
lang | string In which language to return the content. By default, returns the language based on | ||||||||||||||||||||||
limit | integer <int32> How many tours to return at one time (Default can be specified in endpoint configuration) | ||||||||||||||||||||||
offset | integer <int32> The start position in a result list. For pagination. (Default is 0) | ||||||||||||||||||||||
orderBy | string The properties by which to order the nodes.
The result may be returned either in the ascending ( asc ) order or in the descending ( desc ) order.
The ascending order is applied if the direction is not set. | ||||||||||||||||||||||
q | string A search phrase (full-text search). | ||||||||||||||||||||||
<filter> | string queryNodes provides a filtering mechanism. Filters are added as request parameters. Filter values must be properly URL-encoded. You can use multiple filters within the same request. Filter formatThe filter parameter has the following format:
Filters are case-sensitive. For For For filtering by date and time: For filtering within a language: If a filter can take multiple possible values , use Special filter propertiesYou can filter on additional special properties that you don't see in the endpoint response.
|
An array of tours
Unexpected Error
{- "results": [
- {
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@path": "/magnolia-travels/A-Taste-of-Malaysia",
- "@name": "A-Taste-of-Malaysia",
- "@nodeType": "string",
- "@nodes": [ ],
- "mgnl:tags": [ ],
- "mgnl:created": "2015-07-01T08:50:23.426Z",
- "mgnl:createdBy": "superuser",
- "mgnl:lastModified": "2015-07-01T08:50:23.426Z",
- "mgnl:lastModifiedBy": "superuser",
- "mgnl:lastActivated": "2015-07-01T08:50:23.426Z",
- "mgnl:lastActivatedBy": "superuser",
- "name": "string",
- "location": "string",
- "author": "string",
- "body": "string",
- "duration": "string",
- "image": {
- "@name": "string",
- "@path": "/pages/surfing/ash-unsplash.jpg",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@link": "/magnoliaPublic/dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-unsplash.jpg",
- "metadata": {
- "filename": "string",
- "mimeType": "string",
- "caption": "string",
- "fileSize": "string",
- "height": "string",
- "width": "string",
- "title": "string",
- "format": "string",
- "coverage": "string",
- "description": "string",
- "publisher": "string",
- "rights": "string",
- "source": "string",
- "date": null,
- "created": null,
- "modified": null,
- "creator": [
- "string"
], - "contributor": [
- "string"
], - "subject": [
- "string"
]
}, - "renditions": {
- "480x360": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}, - "960x720": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}
}
}, - "tourTypes": [
- {
- "@name": "string",
- "@path": "/pageTypes/sport",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@nodeType": "mgnl:category",
- "name": "string",
- "displayName": "string",
- "description": "string",
- "body": "string",
- "level": "string",
- "icon": {
- "@name": "string",
- "@path": "/pages/surfing/ash-unsplash.jpg",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@link": "/magnoliaPublic/dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-unsplash.jpg",
- "metadata": {
- "filename": "string",
- "mimeType": "string",
- "caption": "string",
- "fileSize": "string",
- "height": "string",
- "width": "string",
- "title": "string",
- "format": "string",
- "coverage": "string",
- "description": "string",
- "publisher": "string",
- "rights": "string",
- "source": "string",
- "date": null,
- "created": null,
- "modified": null,
- "creator": [
- "string"
], - "contributor": [
- "string"
], - "subject": [
- "string"
]
}, - "renditions": {
- "480x360": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}, - "960x720": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}
}
}, - "image": {
- "@name": "string",
- "@path": "/pages/surfing/ash-unsplash.jpg",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@link": "/magnoliaPublic/dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-unsplash.jpg",
- "metadata": {
- "filename": "string",
- "mimeType": "string",
- "caption": "string",
- "fileSize": "string",
- "height": "string",
- "width": "string",
- "title": "string",
- "format": "string",
- "coverage": "string",
- "description": "string",
- "publisher": "string",
- "rights": "string",
- "source": "string",
- "date": null,
- "created": null,
- "modified": null,
- "creator": [
- "string"
], - "contributor": [
- "string"
], - "subject": [
- "string"
]
}, - "renditions": {
- "480x360": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}, - "960x720": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}
}
}
}
], - "destinations": [
- {
- "@name": "string",
- "@path": "/pageTypes/sport",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@nodeType": "mgnl:category",
- "name": "string",
- "displayName": "string",
- "description": "string",
- "body": "string",
- "level": "string",
- "icon": {
- "@name": "string",
- "@path": "/pages/surfing/ash-unsplash.jpg",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@link": "/magnoliaPublic/dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-unsplash.jpg",
- "metadata": {
- "filename": "string",
- "mimeType": "string",
- "caption": "string",
- "fileSize": "string",
- "height": "string",
- "width": "string",
- "title": "string",
- "format": "string",
- "coverage": "string",
- "description": "string",
- "publisher": "string",
- "rights": "string",
- "source": "string",
- "date": null,
- "created": null,
- "modified": null,
- "creator": [
- "string"
], - "contributor": [
- "string"
], - "subject": [
- "string"
]
}, - "renditions": {
- "480x360": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}, - "960x720": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}
}
}, - "image": {
- "@name": "string",
- "@path": "/pages/surfing/ash-unsplash.jpg",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@link": "/magnoliaPublic/dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-unsplash.jpg",
- "metadata": {
- "filename": "string",
- "mimeType": "string",
- "caption": "string",
- "fileSize": "string",
- "height": "string",
- "width": "string",
- "title": "string",
- "format": "string",
- "coverage": "string",
- "description": "string",
- "publisher": "string",
- "rights": "string",
- "source": "string",
- "date": null,
- "created": null,
- "modified": null,
- "creator": [
- "string"
], - "contributor": [
- "string"
], - "subject": [
- "string"
]
}, - "renditions": {
- "480x360": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}, - "960x720": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}
}
}
}
]
}
]
}
This API will return child nodes in their 'natural order',
the same order that users give items in the AdminCentral Magnolia UI.
(With the 'Query nodes' API, the array of responses may not be in their 'natural order' )
To get only the children of the item specified with the path, append @nodes
to the end of the query.
(This is called the 'Get children' API in the full documentation.)
Note: To get an item by its id
or other property you can use a query as described above in the 'Query nodes' API.
path required | string The path of the page to retreive.
Example: |
Expected response to a valid request
Unexpected Error
{- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@path": "/magnolia-travels/A-Taste-of-Malaysia",
- "@name": "A-Taste-of-Malaysia",
- "@nodeType": "string",
- "@nodes": [ ],
- "mgnl:tags": [ ],
- "mgnl:created": "2015-07-01T08:50:23.426Z",
- "mgnl:createdBy": "superuser",
- "mgnl:lastModified": "2015-07-01T08:50:23.426Z",
- "mgnl:lastModifiedBy": "superuser",
- "mgnl:lastActivated": "2015-07-01T08:50:23.426Z",
- "mgnl:lastActivatedBy": "superuser",
- "name": "string",
- "location": "string",
- "author": "string",
- "body": "string",
- "duration": "string",
- "image": {
- "@name": "string",
- "@path": "/pages/surfing/ash-unsplash.jpg",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@link": "/magnoliaPublic/dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-unsplash.jpg",
- "metadata": {
- "filename": "string",
- "mimeType": "string",
- "caption": "string",
- "fileSize": "string",
- "height": "string",
- "width": "string",
- "title": "string",
- "format": "string",
- "coverage": "string",
- "description": "string",
- "publisher": "string",
- "rights": "string",
- "source": "string",
- "date": null,
- "created": null,
- "modified": null,
- "creator": [
- "string"
], - "contributor": [
- "string"
], - "subject": [
- "string"
]
}, - "renditions": {
- "480x360": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}, - "960x720": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}
}
}, - "tourTypes": [
- {
- "@name": "string",
- "@path": "/pageTypes/sport",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@nodeType": "mgnl:category",
- "name": "string",
- "displayName": "string",
- "description": "string",
- "body": "string",
- "level": "string",
- "icon": {
- "@name": "string",
- "@path": "/pages/surfing/ash-unsplash.jpg",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@link": "/magnoliaPublic/dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-unsplash.jpg",
- "metadata": {
- "filename": "string",
- "mimeType": "string",
- "caption": "string",
- "fileSize": "string",
- "height": "string",
- "width": "string",
- "title": "string",
- "format": "string",
- "coverage": "string",
- "description": "string",
- "publisher": "string",
- "rights": "string",
- "source": "string",
- "date": null,
- "created": null,
- "modified": null,
- "creator": [
- "string"
], - "contributor": [
- "string"
], - "subject": [
- "string"
]
}, - "renditions": {
- "480x360": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}, - "960x720": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}
}
}, - "image": {
- "@name": "string",
- "@path": "/pages/surfing/ash-unsplash.jpg",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@link": "/magnoliaPublic/dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-unsplash.jpg",
- "metadata": {
- "filename": "string",
- "mimeType": "string",
- "caption": "string",
- "fileSize": "string",
- "height": "string",
- "width": "string",
- "title": "string",
- "format": "string",
- "coverage": "string",
- "description": "string",
- "publisher": "string",
- "rights": "string",
- "source": "string",
- "date": null,
- "created": null,
- "modified": null,
- "creator": [
- "string"
], - "contributor": [
- "string"
], - "subject": [
- "string"
]
}, - "renditions": {
- "480x360": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}, - "960x720": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}
}
}
}
], - "destinations": [
- {
- "@name": "string",
- "@path": "/pageTypes/sport",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@nodeType": "mgnl:category",
- "name": "string",
- "displayName": "string",
- "description": "string",
- "body": "string",
- "level": "string",
- "icon": {
- "@name": "string",
- "@path": "/pages/surfing/ash-unsplash.jpg",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@link": "/magnoliaPublic/dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-unsplash.jpg",
- "metadata": {
- "filename": "string",
- "mimeType": "string",
- "caption": "string",
- "fileSize": "string",
- "height": "string",
- "width": "string",
- "title": "string",
- "format": "string",
- "coverage": "string",
- "description": "string",
- "publisher": "string",
- "rights": "string",
- "source": "string",
- "date": null,
- "created": null,
- "modified": null,
- "creator": [
- "string"
], - "contributor": [
- "string"
], - "subject": [
- "string"
]
}, - "renditions": {
- "480x360": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}, - "960x720": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}
}
}, - "image": {
- "@name": "string",
- "@path": "/pages/surfing/ash-unsplash.jpg",
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@link": "/magnoliaPublic/dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-unsplash.jpg",
- "metadata": {
- "filename": "string",
- "mimeType": "string",
- "caption": "string",
- "fileSize": "string",
- "height": "string",
- "width": "string",
- "title": "string",
- "format": "string",
- "coverage": "string",
- "description": "string",
- "publisher": "string",
- "rights": "string",
- "source": "string",
- "date": null,
- "created": null,
- "modified": null,
- "creator": [
- "string"
], - "contributor": [
- "string"
], - "subject": [
- "string"
]
}, - "renditions": {
- "480x360": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}, - "960x720": {
- "link": "/magnoliaPublic/.imaging/mte/travel-demo-theme/960x720/dam/pages/ash-unsplash/jcr:content/ash-unsplash.jpg",
- "mimeType": "string"
}
}
}
}
]
}
If no orderBy
parameter is used, the order of the results is unknown.
It probably will not be the same order of the items seen by users in the AdminCentral Magnolia UI.
lang | string In which language to return the content. By default, returns the language based on | ||||||||||||||||||||||
limit | integer <int32> How many tours to return at one time (Default can be specified in endpoint configuration) | ||||||||||||||||||||||
offset | integer <int32> The start position in a result list. For pagination. (Default is 0) | ||||||||||||||||||||||
orderBy | string The properties by which to order the nodes.
The result may be returned either in the ascending ( asc ) order or in the descending ( desc ) order.
The ascending order is applied if the direction is not set. | ||||||||||||||||||||||
q | string A search phrase (full-text search). | ||||||||||||||||||||||
<filter> | string queryNodes provides a filtering mechanism. Filters are added as request parameters. Filter values must be properly URL-encoded. You can use multiple filters within the same request. Filter formatThe filter parameter has the following format:
Filters are case-sensitive. For For For filtering by date and time: For filtering within a language: If a filter can take multiple possible values , use Special filter propertiesYou can filter on additional special properties that you don't see in the endpoint response.
|
An array of pages
Unexpected Error
{- "results": [
- {
- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@path": "/magnolia-travels/A-Taste-of-Malaysia",
- "@name": "A-Taste-of-Malaysia",
- "@nodeType": "mgnl:page",
- "@nodes": [ ],
- "mgnl:tags": [ ],
- "mgnl:created": "2015-07-01T08:50:23.426Z",
- "mgnl:createdBy": "superuser",
- "mgnl:lastModified": "2015-07-01T08:50:23.426Z",
- "mgnl:lastModifiedBy": "superuser",
- "mgnl:lastActivated": "2015-07-01T08:50:23.426Z",
- "mgnl:lastActivatedBy": "superuser",
- "mgnl:template": "react-minimal-lm:pages/basic",
- "main": {
- "0": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:area",
- "@nodes": [
- "02",
- "00",
- "0",
- "01"
], - "00": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "01": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "02": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}
}, - "extras": {
- "0": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:area",
- "@nodes": [
- "02",
- "00",
- "0",
- "01"
], - "00": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "01": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "02": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}
}
}
]
}
This API will return child nodes in their 'natural order',
the same order that users give items in the AdminCentral Magnolia UI.
(With the 'Query nodes' API, the array of responses may not be in their 'natural order' )
To get only the children of the item specified with the path, append @nodes
to the end of the query.
(This is called the 'Get children' API in the full documentation.)
Note: To get an item by its id
or other property you can use a query as described above in the 'Query nodes' API.
path required | string The path of the page to retreive.
Example: |
Expected response to a valid request
Unexpected Error
{- "@id": "a358f3ad-5a03-4f5d-b0ab-cb2219100472",
- "@path": "/magnolia-travels/A-Taste-of-Malaysia",
- "@name": "A-Taste-of-Malaysia",
- "@nodeType": "mgnl:page",
- "@nodes": [ ],
- "mgnl:tags": [ ],
- "mgnl:created": "2015-07-01T08:50:23.426Z",
- "mgnl:createdBy": "superuser",
- "mgnl:lastModified": "2015-07-01T08:50:23.426Z",
- "mgnl:lastModifiedBy": "superuser",
- "mgnl:lastActivated": "2015-07-01T08:50:23.426Z",
- "mgnl:lastActivatedBy": "superuser",
- "mgnl:template": "react-minimal-lm:pages/basic",
- "main": {
- "0": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:area",
- "@nodes": [
- "02",
- "00",
- "0",
- "01"
], - "00": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "01": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "02": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}
}, - "extras": {
- "0": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:area",
- "@nodes": [
- "02",
- "00",
- "0",
- "01"
], - "00": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "01": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}, - "02": {
- "All the usual '@' and 'mgnl:' properties": "string",
- "@nodeType": "mgnl:component",
- "mgnl:template": "spa-lm:components/expander"
}
}
}