Skip to main content

Folders and hierarchy

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

Authorization and status codes

For authorization and status codes see the API Reference overview.

Folders
Link copied!

MethodEndpointSummary
POST/content-repositories/{contentRepositoryId}/foldersCreate folder
GET/content-repositories/{contentRepositoryId}/foldersList folders
PATCH/folders/{folderId}Update folder
GET/folders/{folderId}Get folder
DELETE/folders/{folderId}Delete folder
POST/folders/{folderId}/foldersCreate sub-folder
GET/folders/{folderId}/foldersList sub-folders

Create folder
Link copied!

POST /content-repositories/{contentRepositoryId}/folders

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

Folders are used to organise items in a hierarchical structure. Currently only enabled for organising content items within a content repository.

To create a new folder follow the "create-folder" link from a content repository.

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
namestringFolder name
Request example
{
"name": "New folder"
}

Responses

StatusDescription
201Created Content Repository Folder
Response Example (201)
{
"id": "00112233445566778899aabb",
"name": "New folder",
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-items": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items?folderId=00112233445566778899aabb{&page,projection,size,sort,status}",
"templated": true
},
"create-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb/folders"
},
"delete-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"update-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
}
}
}

List folders
Link copied!

GET /content-repositories/{contentRepositoryId}/folders

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

List all of the top-level Folders for a Content Repository

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb
pagequeryintegerPage number
Example: 0
sizequeryintegerPage size
Example: 20
sortquerystringSort paramter
Example: createdDate,asc

Responses

StatusDescription
200Top-level Folders
Response Example (200)
{
"_embedded": {
"folders": [
{
"id": "00112233445566778899aabb",
"name": "New folder",
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-items": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items?folderId=00112233445566778899aabb{&page,projection,size,sort,status}",
"templated": true
},
"create-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb/folders"
},
"delete-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"update-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
}
}
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-repositories/5d5bc1dfc9e77c035fede5c7/folders?page=0&size=20"
},
"first": {
"href": "https://api.amplience.net/v2/content/content-repositories/5d5bc1dfc9e77c035fede5c7/folders?page=0&size=20"
},
"last": {
"href": "https://api.amplience.net/v2/content/content-repositories/5d5bc1dfc9e77c035fede5c7/folders?page=0&size=20"
},
"search": {
"href": "https://api.amplience.net/v2/content/content-repositories/5d5bc1dfc9e77c035fede5c7/folders/search"
}
},
"page": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}

Update folder
Link copied!

PATCH /folders/{folderId}

https://api.amplience.net/v2/content/folders/{folderId}

Update a folder

Parameters

NameInTypeRequiredDescription
folderIdpathstringFolder ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
namestringFolder name
Request example
{
"name": "New folder"
}

Responses

StatusDescription
200Updated Folder
Response Example (200)
{
"id": "00112233445566778899aabb",
"name": "New folder",
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-items": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items?folderId=00112233445566778899aabb{&page,projection,size,sort,status}",
"templated": true
},
"create-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb/folders"
},
"delete-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"update-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
}
}
}

Get folder
Link copied!

GET /folders/{folderId}

https://api.amplience.net/v2/content/folders/{folderId}

Get a folder

Parameters

NameInTypeRequiredDescription
folderIdpathstringFolder ID
Example: 00112233445566778899aabb

Responses

StatusDescription
200Folder
Response Example (200)
{
"id": "00112233445566778899aabb",
"name": "New folder",
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-items": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items?folderId=00112233445566778899aabb{&page,projection,size,sort,status}",
"templated": true
},
"create-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb/folders"
},
"delete-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"update-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
}
}
}

Delete folder
Link copied!

DELETE /folders/{folderId}

https://api.amplience.net/v2/content/folders/{folderId}

Delete a folder

Parameters

NameInTypeRequiredDescription
folderIdpathstringFolder ID
Example: 00112233445566778899aabb

Responses

StatusDescription
204Success

Create sub-folder
Link copied!

POST /folders/{folderId}/folders

https://api.amplience.net/v2/content/folders/{folderId}/folders

Create a new sub-folder.

Parameters

NameInTypeRequiredDescription
contentRepositoryIdpathstringContent Repository ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
namestringFolder name
Request example
{
"name": "New folder"
}

Responses

StatusDescription
201Created Sub-Folder
Response Example (201)
{
"id": "00112233445566778899aabb",
"name": "New folder",
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-items": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items?folderId=00112233445566778899aabb{&page,projection,size,sort,status}",
"templated": true
},
"create-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb/folders"
},
"delete-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"update-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
}
}
}

List sub-folders
Link copied!

GET /folders/{folderId}/folders

https://api.amplience.net/v2/content/folders/{folderId}/folders

List the sub-folders of a folder

Parameters

NameInTypeRequiredDescription
folderIdpathstringFolder ID
Example: 00112233445566778899aabb

Responses

StatusDescription
200Folder
Response Example (200)
{
"_embedded": {
"folders": [
{
"id": "00112233445566778899aabb",
"name": "New folder",
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"content-repository": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb"
},
"content-items": {
"href": "https://api.amplience.net/v2/content/content-repositories/00112233445566778899aabb/content-items?folderId=00112233445566778899aabb{&page,projection,size,sort,status}",
"templated": true
},
"create-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb/folders"
},
"delete-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
},
"update-folder": {
"href": "https://api.amplience.net/v2/content/folders/00112233445566778899aabb"
}
}
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/content-repositories/5d5bc1dfc9e77c035fede5c7/folders?page=0&size=20"
},
"first": {
"href": "https://api.amplience.net/v2/content/content-repositories/5d5bc1dfc9e77c035fede5c7/folders?page=0&size=20"
},
"last": {
"href": "https://api.amplience.net/v2/content/content-repositories/5d5bc1dfc9e77c035fede5c7/folders?page=0&size=20"
},
"search": {
"href": "https://api.amplience.net/v2/content/content-repositories/5d5bc1dfc9e77c035fede5c7/folders/search"
}
},
"page": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}

Hierarchy node
Link copied!

MethodEndpointSummary
GET/hierarchy-node/{id}/childrenGet child hierarchy nodes
GET/hierarchy-node/{id}/parentsGet parent hierarchy nodes
POST/hierarchy-node/{id}/positionChange a hierarchy node's position

Get child hierarchy nodes
Link copied!

GET /hierarchy-node/{id}/children

https://api.amplience.net/v2/content/hierarchy-node/{id}/children

Get a List of Child Hierarchy Nodes

Parameters

NameInTypeRequiredDescription
contentItemIdpathstringContent Item ID
Example: 00112233-4455-6677-8899-aabbccddeeff

Responses

StatusDescription
200List of Child Hierarchy Nodes
Response Example (200)
{
"id": "00112233-4455-6677-8899-aabbccddeeff",
"label": "Banner Ad Homepage",
"root": true,
"children": [
{
"id": "00112233-4455-6677-8899-aabbccddeeff",
"label": "Banner Ad Homepage",
"root": false,
"parentId": "00112233-4455-6677-8899-aabbccddeeff",
"_links": {
"content-item": {
"href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff"
},
"archive": {
"href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/archive"
},
"get-hierarchy-parents": {
"href": "https://api.amplience.net/v2/content/hierarchy-node/00112233-4455-6677-8899-aabbccddeeff/parents"
},
"get-hierarchy-children": {
"href": "https://api.amplience.net/v2/content/hierarchy-node/00112233-4455-6677-8899-aabbccddeeff/children"
}
}
}
],
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hierarchy-node/00112233-4455-6677-8899-aabbccddeeff/children"
},
"content-item": {
"href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff"
}
}
}

Get parent hierarchy nodes
Link copied!

GET /hierarchy-node/{id}/parents

https://api.amplience.net/v2/content/hierarchy-node/{id}/parents

Get a List of Parent Hierarchy Nodes

Parameters

NameInTypeRequiredDescription
contentItemIdpathstringContent Item ID
Example: 00112233-4455-6677-8899-aabbccddeeff

Responses

StatusDescription
200List of Parent Hierarchy Nodes
Response Example (200)
{
"id": "00112233-4455-6677-8899-aabbccddeeff",
"label": "Banner Ad Homepage",
"root": false,
"parents": [
{
"id": "00112233-4455-6677-8899-aabbccddeeff",
"label": "Banner Ad Homepage",
"root": true,
"_links": {
"content-item": {
"href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff"
},
"archive": {
"href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff/archive"
},
"get-hierarchy-parents": {
"href": "https://api.amplience.net/v2/content/hierarchy-node/00112233-4455-6677-8899-aabbccddeeff/parents"
},
"get-hierarchy-children": {
"href": "https://api.amplience.net/v2/content/hierarchy-node/00112233-4455-6677-8899-aabbccddeeff/children"
}
}
}
],
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hierarchy-node/00112233-4455-6677-8899-aabbccddeeff/parents"
},
"content-item": {
"href": "https://api.amplience.net/v2/content/content-items/00112233-4455-6677-8899-aabbccddeeff"
}
}
}

Change a hierarchy node's position
Link copied!

POST /hierarchy-node/{id}/position

https://api.amplience.net/v2/content/hierarchy-node/{id}/position

Change a Hierarchy Node's position

Parameters

NameInTypeRequiredDescription
contentItemIdpathstringContent Item ID
Example: 00112233-4455-6677-8899-aabbccddeeff

Responses

StatusDescription
200List of Hierarchy Node Position Changes

Hierarchies publish
Link copied!

MethodEndpointSummary
POST/hierarchies/publishPublish hierarchy nodes

Publish hierarchy nodes
Link copied!

POST /hierarchies/publish

https://api.amplience.net/v2/content/hierarchies/publish

To publish a hierarchy tree, you need to specify the root node and set getDescendants to true.

To publish a hierarchy branch, you need to specify the parent node and set getDescendants to true.

To publish a hierarchy node without any children and set getDescendants to false.

To publish multiple nodes individually supply their IDs, you cannot publish multiple nodes with getDescendants set to true.

Request Body

Content-Type: application/json

Request example
[
{
"hierarchyNodeIds": [
"00112233-4455-6677-8899-aabbccddeeff"
],
"getDescendants": false
}
]

Responses

StatusDescription
204No Content

Hierarchies snapshot
Link copied!

MethodEndpointSummary
POST/hierarchies/snapshotSnapshot hierarchy nodes

Snapshot hierarchy nodes
Link copied!

POST /hierarchies/snapshot

https://api.amplience.net/v2/content/hierarchies/snapshot

To snapshot a hierarchy tree, you need to specify the root node and set getDescendants to true.

To snapshot a hierarchy branch, you need to specify the parent node and set getDescendants to true.

To snapshot a hierarchy node without any children and set getDescendants to false.

To snapshot multiple nodes individually supply their IDs, you cannot snapshot multiple nodes with getDescendants set to true.

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
hierarchyNodeIdsarrayID's
getDescendantsboolean
typestring (USER, SYSTEM)Indicates the type of Snapshot (USER or SYSTEM)
commentstringComment
Request example
{
"hierarchyNodeIds": [
"00112233-4455-6677-8899-aabbccddeeff"
],
"getDescendants": false,
"comment": "This is a example snapshot."
}

Responses

StatusDescription
201Snapshot
Response Example (201)
{
"id": "00112233445566778899aabb",
"comment": "This is a example snapshot.",
"createdDate": "2019-01-01T00:00:00.000Z",
"createdBy": "00112233-4455-6677-8899-aabbccddeeff",
"createdFrom": "content-item",
"type": "USER",
"meta": [
{
"key": "example-key",
"value": "example value"
}
],
"taggedEdition": [
{
"editionId": "00112233445566778899aabb",
"createdDate": "2019-01-01T00:00:00.000Z",
"createdBy": "00112233-4455-6677-8899-aabbccddeeff",
"name": "Example Edition 1",
"editionName": "Example Edition 1"
}
],
"locale": "en-US",
"contentRoot": "00112233-4455-6677-8899-aabbccddeeff",
"rootContentItem": {
"label": "Banner Ad Homepage",
"contentTypeUri": "Banner Ad Homepage",
"id": "00112233-4455-6677-8899-aabbccddeeff"
},
"rootContentItems": [
{
"label": "Banner Ad Homepage",
"contentTypeUri": "Banner Ad Homepage",
"id": "00112233-4455-6677-8899-aabbccddeeff"
}
],
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/snapshots/00112233445566778899aabb"
},
"snapshot": {
"href": "https://api.amplience.net/v2/content/snapshots/00112233445566778899aabb"
},
"publishing-jobs": {
"href": "https://api.amplience.net/v2/content/snapshots/00112233445566778899aabb/publishing-jobs{?page,size,sort}",
"templated": true
},
"create-publishing-job": {
"href": "https://api.amplience.net/v2/content/snapshots/00112233445566778899aabb/publishing-jobs"
},
"edition-links": {
"href": "https://api.amplience.net/v2/content/snapshots/00112233445566778899aabb/edition-links"
},
"hub": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
},
"content-root": {
"href": "https://api.amplience.net/v2/content/content-items/00112233445566778899aabb"
},
"snapshot-content-item": {
"href": "https://api.amplience.net/v2/content/snapshots/00112233445566778899aabb/content-items{/id}",
"templated": true
}
}
}