Skip to main content

Content repositories

Base URL: https://api.amplience.net/v2/content

Authorization and status codes

For authorization and status codes see the API Reference overview.

Content repositories
Link copied!

MethodEndpointSummary
GET/content-repositories/{contentRepositoryId}Get content repository
PATCH/content-repositories/{contentRepositoryId}Update content repository
GET/content-repositories/{contentRepositoryId}
/content-items
List content items
POST/content-repositories/{contentRepositoryId}
/content-types
Assign content type to content repository
DELETE/content-repositories/{contentRepositoryId}
/content-types/{contentTypeId}
Remove content type from content repository
POST/content-repositories/{contentRepositoryId}/featuresAssign a feature
DELETE/content-repositories/{contentRepositoryId}/featuresRemove a feature
POST/content-repositories/{contentRepositoryId}/shareShare a content repository
POST/hubs/{hubId}/content-repositoriesCreate content repository
GET/hubs/{hubId}/content-repositoriesList content repositories
GET/hubs/{hubId}
/content-repositories/search/findByFeaturesContaining
Find by feature

Most content repository API responses include a standard set of HAL _links describing the actions and related resources available. The examples throughout this page show an abbreviated set of links for readability. The full set returned in a typical content repository response looks like this:

  "_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"update": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"hub": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
},
"create-content-item": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items{?ignoreSchemaValidation}",
"templated": true
},
"search-content-items": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/content-items/find{?page,projection,query,size,sort}",
"templated": true
},
"facet-content-items": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/content-items/facet{?page,projection,query,size,sort}",
"templated": true
},
"content-items": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items{?folderId,page,projection,size,sort,status}",
"templated": true
},
"share": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/share"
},
"assign-content-type": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-types"
},
"unassign-content-type": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-types/{id}",
"templated": true
},
"folders": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/folders{?page,size,sort}",
"templated": true
},
"create-folder": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/folders"
},
"features": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/features?feature={feature}",
"templated": true
},
"update-content-items": {
"href": "https://api.amplience.net/v2/content/content-items"
},
"set-item-locales": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/item-locales"
},
"join-localization-group": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/localization-group"
},
"localization-group-locales": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/localization-group/locales"
}
}
Which links you'll actually see

The exact set of links returned can vary slightly by content repository state. Endpoints that return a partial or list representation may include a smaller subset of these links rather than the full set shown above.

Get content repository
Link copied!

GET /content-repositories/{contentRepositoryId}

https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}

Get a new Content Repository

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb

Responses

StatusDescription
200Content Repository
Response Example (200)
{
"id": "00112233445566778899aabb",
"name": "inspiration",
"label": "inspiration",
"status": "ACTIVE",
"features": [
"slots"
],
"type": "CONTENT",
"contentTypes": [
{
"hubContentTypeId": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json"
}
],
"itemLocales": [
"en_US"
],
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"update": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
}
}
}
Abbreviated response

The _links object in this example is truncated for readability: it shows 4 of the 19 links the API actually returns. Every content repository response includes the full standard set. See Content repository response links for the complete list.

Update content repository
Link copied!

PATCH /content-repositories/{contentRepositoryId}

https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}

Update the Content Repository

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
namestringName
labelstringName
Request example
{
"name": "inspiration",
"label": "inspiration"
}

Responses

StatusDescription
200Updated Content Repository
Response Example (200)
{
"id": "00112233445566778899aabb",
"name": "inspiration",
"label": "inspiration",
"status": "ACTIVE",
"features": [
"slots"
],
"type": "CONTENT",
"contentTypes": [
{
"hubContentTypeId": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json"
}
],
"itemLocales": [
"en_US"
],
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"update": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
}
}
}
Abbreviated response

The _links object in this example is truncated for readability: it shows 4 of the 19 links the API actually returns. Every content repository response includes the full standard set. See Content repository response links for the complete list.

List content items
Link copied!

GET /content-repositories/{contentRepositoryId}/content-items

https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/content-items

This lists all of the Content Items within this Content Repository

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb
projectionquerystring (projection)"basic" - omits the body property from the return Content Items
Example: basic
pagequeryintegerPage number
Example: 0
folderIdquerystringFolder ID
Example: 00112233445566778899aabb
statusquerystringStatus
excludeHierarchicalChildrenquerybooleanExclude hierarchical child items
Example: True
sizequeryintegerPage size
Example: 20
sortquerystringSort paramter
Example: createdDate,asc

Responses

StatusDescription
200Content Repository
Response Example (200)
{
"_embedded": {
"content-items": [
{
"id": "00112233-4455-6677-8899-aabbccddeeff",
"contentRepositoryId": "00112233445566778899aabb",
"body": {
"_meta": {
"name": "main-banner",
"schema": "http://example.com/banner.json",
"deliveryKey": "promo-page/main-banner"
},
"heading": "Buy more stuff!!",
"link": "http://anyafinn.com/buymore?campaign=shouting"
},
"label": "Banner Ad Homepage",
"folderId": "00112233445566778899aabb",
"assignees": [
"00112233445566778899aabb"
],
"assignedDate": "2019-01-01T00:00:00.000Z",
"locale": "en-GB",
"version": 1,
"createdBy": "00112233-4455-6677-8899-aabbccddeeff",
"createdDate": "2019-01-01T00:00:00.000Z",
"lastModifiedBy": "00112233-4455-6677-8899-aabbccddeeff",
"lastModifiedDate": "2019-01-01T00:00:00.000Z",
"lastPublishedDate": "2019-01-01T00:00:00.000Z",
"lastPublishedVersion": 1,
"lastUnpublishedDate": "2019-01-01T00:00:00.000Z",
"lastUnpublishedVersion": 1,
"publishingStatus": "NONE",
"deliveryId": "00112233-4455-6677-8899-aabbccddeeff",
"workflow": {
"state": "00112233445566778899aabb"
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff"
},
"content-item": {
"href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff{?projection}",
"templated": true
},
"planned": {
"href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/planned{?epoch,time}",
"templated": true
},
"publish": {
"href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/publish"
}
}
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-type/00112233-4455-6677-8899-aabbccddeeff?page=0&size=20"
},
"first": {
"href": "https://api.amplience.net/v2/content/content-type/00112233-4455-6677-8899-aabbccddeeff?page=0&size=20"
},
"last": {
"href": "https://api.amplience.net/v2/content/content-type/00112233-4455-6677-8899-aabbccddeeff?page=0&size=20"
},
"search": {
"href": "https://api.amplience.net/v2/content/content-type/00112233-4455-6677-8899-aabbccddeeff/search"
}
},
"page": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}
Abbreviated response

The _links object in this example is truncated for readability: it shows 4 of the 24 links the API actually returns. Every content item response includes the full standard set. See Content item response links for the complete list.

Assign content type to content repository
Link copied!

POST /content-repositories/{contentRepositoryId}/content-types

https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/content-types

Assign Content Type to a Content Repository

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
contentTypeIdstringContent Type ID
Request example
{
"contentTypeId": "00112233445566778899aabb"
}

Responses

StatusDescription
201Updated Content Repository
Response Example (201)
{
"id": "00112233445566778899aabb",
"name": "inspiration",
"label": "inspiration",
"status": "ACTIVE",
"features": [
"slots"
],
"type": "CONTENT",
"contentTypes": [
{
"hubContentTypeId": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json"
}
],
"itemLocales": [
"en_US"
],
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"update": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
}
}
}
Abbreviated response

The _links object in this example is truncated for readability: it shows 4 of the 19 links the API actually returns. Every content repository response includes the full standard set. See Content repository response links for the complete list.

Remove content type from content repository
Link copied!

DELETE /content-repositories/{contentRepositoryId}/content-types/{contentTypeId}

https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/content-types/{contentTypeId}

Remove a Content Type from a Content Repository

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb
contentTypeIdpathstringContent Type ID
Example: 00112233445566778899aabb

Responses

StatusDescription
200Updated Content Repository
Response Example (200)
{
"id": "00112233445566778899aabb",
"name": "inspiration",
"label": "inspiration",
"status": "ACTIVE",
"features": [
"slots"
],
"type": "CONTENT",
"contentTypes": [
{
"hubContentTypeId": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json"
}
],
"itemLocales": [
"en_US"
],
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"update": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
}
}
}
Abbreviated response

The _links object in this example is truncated for readability: it shows 4 of the 19 links the API actually returns. Every content repository response includes the full standard set. See Content repository response links for the complete list.

Assign a feature
Link copied!

POST /content-repositories/{contentRepositoryId}/features

https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/features

Assign a feature to a Content Repository

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb
featurequerystringFeature
Example: slots

Responses

StatusDescription
204No Content Response

Remove a feature
Link copied!

DELETE /content-repositories/{contentRepositoryId}/features

https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/features

Remove a feature from a Content Repository

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb
featurequerystringFeature
Example: slots

Responses

StatusDescription
204No Content Response

Share a content repository
Link copied!

POST /content-repositories/{contentRepositoryId}/share

https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/share

Share a Content Repository with another user

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
userstringUser ID
additionalPermissionsarrayAdditional Permissions
Request example
{
"additionalPermissions": []
}

Responses

StatusDescription
204No Content Response

Create content repository
Link copied!

POST /hubs/{hubId}/content-repositories

https://api.amplience.net/v2/content/hubs/{hubId}/content-repositories

Create a new Content Repository

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
namestringName
labelstringName
Request example
{
"name": "inspiration",
"label": "inspiration"
}

Responses

StatusDescription
201Created Content Repository
Response Example (201)
{
"id": "00112233445566778899aabb",
"name": "inspiration",
"label": "inspiration",
"status": "ACTIVE",
"features": [
"slots"
],
"type": "CONTENT",
"contentTypes": [
{
"hubContentTypeId": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json"
}
],
"itemLocales": [
"en_US"
],
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"update": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
}
}
}
Abbreviated response

The _links object in this example is truncated for readability: it shows 4 of the 19 links the API actually returns. Every content repository response includes the full standard set. See Content repository response links for the complete list.

List content repositories
Link copied!

GET /hubs/{hubId}/content-repositories

https://api.amplience.net/v2/content/hubs/{hubId}/content-repositories

List Content Repositories for a Hub

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
pagequeryintegerPage number
Example: 0
sizequeryintegerPage size
Example: 20
sortquerystringSort paramter
Example: label,asc

Responses

StatusDescription
200Paginated Content Repository
Response Example (200)
{
"_embedded": {
"content-repositories": [
{
"id": "00112233445566778899aabb",
"name": "inspiration",
"label": "inspiration",
"status": "ACTIVE",
"features": [
"slots"
],
"type": "CONTENT",
"contentTypes": [
{
"hubContentTypeId": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json"
}
],
"itemLocales": [
"en_US"
],
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"update": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
}
}
}
]
},
"_links": {
"search:findByFeaturesContaining": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/search/findByFeaturesContaining?feature={feature}{&page,size,sort}",
"templated": true
}
},
"page": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}
Abbreviated response

The _links object in this example is truncated for readability: it shows 4 of the 19 links the API actually returns. Every content repository response includes the full standard set. See Content repository response links for the complete list.

Find by feature
Link copied!

GET /hubs/{hubId}/content-repositories/search/findByFeaturesContaining

https://api.amplience.net/v2/content/hubs/{hubId}/content-repositories/search/findByFeaturesContaining

Find all the Content Repositories that contain a feature

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
featurequerystringFeature
Example: slots
pagequeryintegerPage number
Example: 0
sizequeryintegerPage size
Example: 20
sortquerystringSort paramter
Example: label,asc

Responses

StatusDescription
200Paginated Content Repository
Response Example (200)
{
"_embedded": {
"content-repositories": [
{
"id": "00112233445566778899aabb",
"name": "inspiration",
"label": "inspiration",
"status": "ACTIVE",
"features": [
"slots"
],
"type": "CONTENT",
"contentTypes": [
{
"hubContentTypeId": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json"
}
],
"itemLocales": [
"en_US"
],
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"update": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
}
}
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/content-repositories?page=0&size=20"
},
"first": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/content-repositories?page=0&size=20"
},
"last": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/content-repositories?page=0&size=20"
}
},
"page": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}
Abbreviated response

The _links object in this example is truncated for readability: it shows 4 of the 19 links the API actually returns. Every content repository response includes the full standard set. See Content repository response links for the complete list.