Skip to main content

Content types

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

Authorization and status codes

For authorization and status codes see the API Reference overview.

Content types
Link copied!

MethodEndpointSummary
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
GET/content-types/{contentTypeId}Get content type
PATCH/content-types/{contentTypeId}Update content type
POST/content-types/{contentTypeId}/archiveArchive content type
POST/content-types/{contentTypeId}/unarchiveUnarchive content type
POST/hubs/{hubId}/content-typesCreate content type
GET/hubs/{hubId}/content-typesList content types

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.

Get content type
Link copied!

GET /content-types/{contentTypeId}

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

Get the request Content Type

Parameters

NameInTypeRequiredDescription
contentTypeIdpathstringContent Type ID
Example: 00112233445566778899aabb

Responses

StatusDescription
200Content Type
Response Example (200)
{
"id": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json",
"status": "ACTIVE",
"settings": {
"label": "New Content Type",
"icons": [
{
"size": 256,
"url": "http://example.com/icon.png"
}
],
"visualizations": [
{
"label": "Desktop Website",
"templatedUri": "http://example.com?vse={{vse}}",
"default": true
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"archive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/archive"
},
"unarchive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/unarchive"
},
"content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"effective-content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/effective-content-type"
},
"content-type-schema": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/schema"
}
}
}

Update content type
Link copied!

PATCH /content-types/{contentTypeId}

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

Update the Content Type

Parameters

NameInTypeRequiredDescription
contentTypeIdpathstringContent Type ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
settingsobject
Request example
{
"settings": {
"label": "New Content Type",
"icons": [
{
"size": 256,
"url": "http://example.com/icon.png"
}
],
"visualizations": [
{
"label": "Desktop Website",
"templatedUri": "http://example.com?vse={{vse}}",
"default": true
}
]
}
}

Responses

StatusDescription
200Updated Content Type
Response Example (200)
{
"id": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json",
"status": "ACTIVE",
"settings": {
"label": "New Content Type",
"icons": [
{
"size": 256,
"url": "http://example.com/icon.png"
}
],
"visualizations": [
{
"label": "Desktop Website",
"templatedUri": "http://example.com?vse={{vse}}",
"default": true
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"archive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/archive"
},
"unarchive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/unarchive"
},
"content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"effective-content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/effective-content-type"
},
"content-type-schema": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/schema"
}
}
}

Archive content type
Link copied!

POST /content-types/{contentTypeId}/archive

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

Archive a Content Type

Parameters

NameInTypeRequiredDescription
contentTypeIdpathstringContent Type ID
Example: 00112233445566778899aabb

Responses

StatusDescription
200Archived Content Type
Response Example (200)
{
"id": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json",
"status": "ARCHIVED",
"settings": {
"label": "New Content Type",
"icons": [
{
"size": 256,
"url": "http://example.com/icon.png"
}
],
"visualizations": [
{
"label": "Desktop Website",
"templatedUri": "http://example.com?vse={{vse}}",
"default": true
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"archive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/archive"
},
"unarchive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/unarchive"
},
"content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"effective-content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/effective-content-type"
},
"content-type-schema": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/schema"
}
}
}

Unarchive content type
Link copied!

POST /content-types/{contentTypeId}/unarchive

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

Unarchive a Content Type

Parameters

NameInTypeRequiredDescription
contentTypeIdpathstringContent Type ID
Example: 00112233445566778899aabb

Responses

StatusDescription
200Unarchived Content Type
Response Example (200)
{
"id": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json",
"status": "ACTIVE",
"settings": {
"label": "New Content Type",
"icons": [
{
"size": 256,
"url": "http://example.com/icon.png"
}
],
"visualizations": [
{
"label": "Desktop Website",
"templatedUri": "http://example.com?vse={{vse}}",
"default": true
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"archive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/archive"
},
"unarchive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/unarchive"
},
"content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"effective-content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/effective-content-type"
},
"content-type-schema": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/schema"
}
}
}

Create content type
Link copied!

POST /hubs/{hubId}/content-types

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

Create a new Content Type

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
contentTypeUristringContent Type URI
settingsobject
Request example
{
"contentTypeUri": "http://example.com/content-type.json",
"settings": {
"icons": [],
"visualizations": []
}
}

Responses

StatusDescription
201Created Content Type
Response Example (201)
{
"id": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json",
"status": "ACTIVE",
"settings": {
"label": "New Content Type",
"icons": [
{
"size": 256,
"url": "http://example.com/icon.png"
}
],
"visualizations": [
{
"label": "Desktop Website",
"templatedUri": "http://example.com?vse={{vse}}",
"default": true
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"archive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/archive"
},
"unarchive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/unarchive"
},
"content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"effective-content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/effective-content-type"
},
"content-type-schema": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/schema"
}
}
}

List content types
Link copied!

GET /hubs/{hubId}/content-types

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

List Content Types for a Hub

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
pagequeryintegerPage number
Example: 0
sizequeryintegerPage size
Example: 20
sortquerystringSort paramter
Example: contentTypeUri,asc
statusquerystringComma seperated list of statuses
Example: ACTIVE,ARCHIVED

Responses

StatusDescription
200Paginated Content Types
Response Example (200)
{
"_embedded": {
"content-types": [
{
"id": "00112233445566778899aabb",
"contentTypeUri": "http://example.com/content-type.json",
"status": "ACTIVE",
"settings": {
"label": "New Content Type",
"icons": [],
"visualizations": []
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"archive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/archive"
},
"unarchive": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/unarchive"
},
"content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb"
},
"effective-content-type": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/effective-content-type"
},
"content-type-schema": {
"href": "https://api.amplience.net/v2/content/content-types/00112233445566778899aabb/schema"
}
}
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-type/00112233445566778899aabb?page=0&size=20"
},
"first": {
"href": "https://api.amplience.net/v2/content/content-type/00112233445566778899aabb?page=0&size=20"
},
"last": {
"href": "https://api.amplience.net/v2/content/content-type/00112233445566778899aabb?page=0&size=20"
}
},
"page": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}