Content
BASE URL: https://cdn.umbraco.io
Table of Contents
Common Headers
Accept-Language: {culture}
Api-Version: 2
Umb-Project-Alias: {project-alias}Depth
The depth querystring parameter controls how many levels of referenced Content or Media items that is included in the result.
Lets say a Content item have a Multi Node Tree Picker and one of the Content items that can be picked have a Media Picker. In this case, if the level is set to 1 the returned data will contain the referenced Content items, but their Media property will be null. To include the Media property (which is at level 2) the depth parameter should be 2 or higher.
The lowest supported depth value is 0 and the highest is 5.
Errors
If an error occours you will receive a HTTP status code along with an API error code and an error message in the response body.
400
AmbiguousCulture
The following cultures were requested: {cultures}. At most, only a single culture may be specified. Please update the intended culture and retry the request.
400
LanguageForCultureNotFound
Could not find a language for culture {culture}.
401
Unauthorized
Authorization has been denied for this request.
404
NotFound
Published content with id '{id}' and culture '{culture}' could not be found.
500
InternalServerError
Internal server error.
JSON example:
Get root content
Gets all published content at the root of the tree.
URL: /content
Method: GET
Query Strings
Success Response
Code: 200
Content Example:
Get by id
Get a single published content by its ID.
URL: /content/{id}
Method: GET
Query Strings
Success Response
Code: 200
Content Example:
Get by URL
Get a single published content by its URL.
URL: /content/url?url={url}
Method: GET
Query Strings
Success Response
Code: 200
Content Example:
Get by type
Get content by its Content Type.
Use the Content Type alias to filter all returned content to that specific type.
Example: GET /content/type?contentType=product gets all content based on the product Content Type.
URL: /content/type?contentType={string}
Method: GET
Query Strings
Success Response
Code: 200
Content Example:
Get ancestors
Get ancestors of a single published content.
URL: /content/{id}/ancestors
Method: GET
Query Strings
Success Response
Code: 200
Content Example:
Get children
Get children of a single published content.
URL: /content/{id}/children
Method: GET
Query Strings
Success Response
Code: 200
Content Example:
Get descendants
Get descendants of a single published content.
URL: /content/{id}/descendants
Method: GET
Query Strings
Success Response
Code: 200
Content Example:
Content Filter
Get content filtered by property values and optionally content type.
This endpoint can be used for advanced filtering of content based on the value of specific properties. You can choose to filter on one or more properties by their alias and a value. The matching criteria include whether the property contains or is like the passed-in value.
Say you have a property with an alias called "title" and you want all content, which contains the word "world". The payload you post to the /content/filter endpoint would be as shown below.
Setting the above properties to "hello world" results in content with a "title" property containing either "hello" or "world" as values.
If you want the value of a property to match on both "page" and "pages" then you could use like with a payload as shown below.
Filtering is performed on individual content items, indicating that content matching is not conducted on related content or media.
URL: /content/filter
Method: POST
Query Strings
Headers
This endpoint is available from API-Version: 2.1. Specify the header as shown below when using the REST API.
Request
In this example, we perform a filter with criteria for a "productName"-property containing the value "Jacket" and a "description"-property containing the value "Vivamus". Additionally, the Document Type should have the alias "product."
At least one object with alias, value and match in the properties array is required. The contentTypeAlias is optional and the match property can be either CONTAINS or LIKE.
Success Response
Code: 200
Content Example:
Search
Search for published content by keyword.
URL: /content/search?term={string}
Method: GET
Query Strings
Success Response
Code: 200
Content Example:
Last updated
Was this helpful?