Workflows and localization
Base URL: https://api.amplience.net/v2/content
Authorization and status codes
For authorization and status codes see the API Reference overview.
WorkflowsLink copied!
| Method | Endpoint | Summary |
|---|---|---|
PATCH | /content-items/{contentItemId}/workflow | Assigning a workflow state |
POST | /hubs/{hubId}/workflow-states | Create workflow state |
GET | /hubs/{hubId}/workflow-states | List workflow states |
GET | /workflow-states/{workflowStateId} | Get workflow state |
PATCH | /workflow-states/{workflowStateId} | Update workflow state |
Assigning a workflow stateLink copied!
PATCH /content-items/{contentItemId}/workflow
https://api.amplience.net/v2/content/content-items/{contentItemId}/workflow
Assign or unassign a Workflow State on a Content Item. To unassign the current workflow state, omit the state field or set it to null.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contentItemId | path | string | ✓ | Content Item ID Example: 00112233-4455-6677-8899-aabbccddeeff |
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
version | integer | ✓ | Current version of the content item |
state | string | Workflow State ID. Omit or set to null to remove the current workflow state. |
Request example
Responses
| Status | Description |
|---|---|
| 200 | Content Item |
Response Example (200)
Create workflow stateLink copied!
POST /hubs/{hubId}/workflow-states
https://api.amplience.net/v2/content/hubs/{hubId}/workflow-states
You may create up to 100 workflow states per hub.
The color property is an RGB value representing the color which should be used to display the workflow state within Dynamic Content.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
label | string | ✓ | Label |
color | string | ✓ | Color |
Request example
Responses
| Status | Description |
|---|---|
| 201 | Created Snapshot List |
Response Example (201)
List workflow statesLink copied!
GET /hubs/{hubId}/workflow-states
https://api.amplience.net/v2/content/hubs/{hubId}/workflow-states
List all of the workflow stats for a hub.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hubId | path | string | ✓ | Hub ID Example: 00112233445566778899aabb |
page | query | integer | Page number Example: 0 | |
size | query | integer | Page size Example: 20 | |
sort | query | string | Sort paramter Example: createdDate,asc |
Responses
| Status | Description |
|---|---|
| 200 | Paginated Snapshot List |
Response Example (200)
Get workflow stateLink copied!
GET /workflow-states/{workflowStateId}
https://api.amplience.net/v2/content/workflow-states/{workflowStateId}
Returns the workflow state with the specified ID.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowStateId | path | string | ✓ | Workflow State ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Workflow State Response |
Response Example (200)
Update workflow stateLink copied!
PATCH /workflow-states/{workflowStateId}
https://api.amplience.net/v2/content/workflow-states/{workflowStateId}
Update the workflow state
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowStateId | path | string | ✓ | Workflow State ID Example: 00112233445566778899aabb |
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
label | string | Label | |
color | string | Color |
Request example
Responses
| Status | Description |
|---|---|
| 200 | Updated Workflow State Response |
Response Example (200)
LocalizationLink copied!
| Method | Endpoint | Summary |
|---|---|---|
POST | /content-items/{contentItemId}/locale | Assigning locales to content items |
GET | /content-items/{contentItemId}/localizations | Listing the localizations of a content item |
PATCH | /content-repositories/{contentRepositoryId}/item-locales | Assigning locales to content repository |
POST | /content-repositories/{contentRepositoryId}/localization-group | Updating a content repository localization group |
GET | /content-repositories/{contentRepositoryId}/localization-group/locales | Get content repository localization group locales |
GET | /localization-jobs/search/findByRootContentItem/{id} | Localization jobs |
Assigning locales to content itemsLink copied!
POST /content-items/{contentItemId}/locale
https://api.amplience.net/v2/content/content-items/{contentItemId}/locale
Assign a locale to a Content Item
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contentItemId | path | string | ✓ | Content Item ID Example: 00112233-4455-6677-8899-aabbccddeeff |
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
locale | string | ✓ | Locale |
version | number | ✓ | Version |
Request example
Responses
| Status | Description |
|---|---|
| 200 | Assign Content Item Locale response |
Response Example (200)
Listing the localizations of a content itemLink copied!
GET /content-items/{contentItemId}/localizations
https://api.amplience.net/v2/content/content-items/{contentItemId}/localizations
Once a Content Item has been localized into one or more desired locales, you will be able to see the list of all localizations by following the "localizations" HAL link.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contentItemId | path | string | ✓ | Content Item ID Example: 00112233-4455-6677-8899-aabbccddeeff |
Responses
| Status | Description |
|---|---|
| 200 | Content Item response |
Response Example (200)
Assigning locales to content repositoryLink copied!
PATCH /content-repositories/{contentRepositoryId}/item-locales
https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/item-locales
In order to organise your localized content into separate repositories you can assign a set locales to a Content Repository. You may want to do this in order to give different teams different permissions to create or edit content based on locale.
Assigning locales to a Content Repository has 2 effects. Firstly, you will only be able to assign locales to Content Items which match those assigned to the repository. Secondly, when localizing a content graph, the newly created Content Items will be created in the appropriate Content Repository which match the desired locale.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contentRepositoryId | path | string | ✓ | Content Repository ID Example: 00112233445566778899aabb |
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
itemLocales | array | ✓ | Item locales |
Request example
Responses
| Status | Description |
|---|---|
| 200 | Content Repository |
Response Example (200)
Updating a content repository localization groupLink copied!
POST /content-repositories/{contentRepositoryId}/localization-group
https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/localization-group
The following API allows you to make 2 or more Content Repositories part of the same "group". The new repository will leave it’s current group and join the group of the target repository. To do this, follow the "join-localization-group" HAL link from the target repository and specify the new repository in the body.
For example, lets say you have 3 Content Repositories, Repo1 has no locales assigned, Repo2 and Repo3 are both members of the same group and are assigned locales ["en-GB", "en-US"] and ["fr-FR"] respectively. The following example shows localizing en-GB content into fr-FR. A1 signifies that item A exists in Repo1.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contentRepositoryId | path | string | ✓ | Content Repository ID Example: 00112233445566778899aabb |
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
newRepositoryId | string | ✓ | New Content Repository ID |
Request example
Responses
| Status | Description |
|---|---|
| 200 | Content Repository |
Response Example (200)
Get content repository localization group localesLink copied!
GET /content-repositories/{contentRepositoryId}/localization-group/locales
https://api.amplience.net/v2/content/content-repositories/{contentRepositoryId}/localization-group/locales
List of all supported item locales in a Content Repository localization group. This request can be made using the ID of any repository in the localization group.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contentRepositoryId | path | string | ✓ | Content Repository ID Example: 00112233445566778899aabb |
Responses
| Status | Description |
|---|---|
| 200 | Content Repository |
Response Example (200)
Localization jobsLink copied!
GET /localization-jobs/search/findByRootContentItem/{id}
https://api.amplience.net/v2/content/localization-jobs/search/findByRootContentItem/{id}
Content item localization is performed asynchronously - the request to localize a content item graph creates a Localization Job which will be completed at some point in the future. It is possible to track the status of these jobs.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contentItemId | path | string | ✓ | Content Item ID Example: 00112233-4455-6677-8899-aabbccddeeff |
Responses
| Status | Description |
|---|---|
| 200 | Localization Jobs response |
Response Example (200)
Locale labelsLink copied!
| Method | Endpoint | Summary |
|---|---|---|
GET | /hubs/{hubId}/locale-labels | Read local labels |
PUT | /hubs/{hubId}/locale-labels | Manage locale labels |
Read local labelsLink copied!
GET /hubs/{hubId}/locale-labels
https://api.amplience.net/v2/content/hubs/{hubId}/locale-labels
Get a list of locals and labels
Responses
| Status | Description |
|---|---|
| 200 |
Response Example (200)
Manage locale labelsLink copied!
PUT /hubs/{hubId}/locale-labels
https://api.amplience.net/v2/content/hubs/{hubId}/locale-labels
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
localeLabels | array | An Array of objects containing a Locale and Label property |
Request example
Responses
| Status | Description |
|---|---|
| 200 |