How to use THRON PrettyIDs for Content, Folders and Tags

Business Case:

KPI to be measured

Bookmark this resource Follow

Ask a question

Was this article helpful? 0 out of 0 found this helpful

 

In THRON you can map or associate identifiers to contents, folders and tags, to facilitate their management and retrieval.

The PrettyID is one of the identifiers you can associate to your platform elements in THRON. The other ones are THRON Id and the ExternalID.

 

Index

 

What is the PrettyID

The Pretty ID is a human-readable label that can be associated to contents, folders and tags, with two different objectives:

  • in THRON DAM PLATFORM, the PrettyID can be included in a content url as its identifier to build SEO oriented urls
  • for search purposes in THRON DAM PLATFORM or via API, instead of the THRON ID. In this way, you can associate these entities with an identifier consistent with your naming convention, without the need to search them through the THRON ID.

 

You can set a PrettyID both from THRON DAM PLATFORM and via API.

 

The Pretty ID has a maximum length of 150 characters and can be defined for each language that has been activated in you THRON DAM PLATFORM. When choosing a PrettyID, remember the following constraints:

  • Maximum number of characters: 150;
  • Can only contain lower case letters or numbers;
  • Special characters allowed are "-" and "_";
  • Can not contain spaces;
  • It must be unique in the platform;

 

To identify a content through the association of a unique key:value combination, you can also use the ExternalID. Read this article for more details about ExternalIDs: HOW TO USE THRON EXTERNAL ID FOR CONTENT, TAGS, GROUPS AND USERS.

Here below you find a guide about how creating, deleting and searching for PrettyIDs for Contents, Folders and Tags, both from THRON DAM PLATFORM and via API.

 

Content PrettyID

You can create, edit, delete and search for Content PrettyIDs both from THRON DAM PLATFORM and via API.

It may be useful, for example, to associate to a product image the Pretty ID corresponding to its EAN code. This way, when you need to search for this content, you can retrieve it directly using its EAN code instead of calling other THRON APIs to find it. At the same time, the URL generated for example to deliver the image (see article How to embed images into your projects) will include the EAN instead of the THRON ID to meet SEO requirements.

 

From THRON DAM PLATFORM - Pretty ID entry, editing and removal:

You can enter, edit or remove the PrettyID of a Content in the corresponding field within the content’s edit area. 
For example, in the screenshot below, the image is associated with a Pretty ID corresponding to its EAN code “45378879oe" and its view code “11":

 

PrettyID_OK.png

 

From THRON DAM PLATFORM - Searching for content via PrettyID:

In THRON DAM PLATFORM, you can search for a content by its Pretty ID, using the "Content" mode in the search field.
For example, in the screenshot below I search for content that has the Pretty ID composed by the EAN code and the assigned view code "45378879oe_11":

 

searchPrettY.png

 

Via API - Pretty ID entry:

Using the addContentPrettyId service, you can associate a Pretty ID with a content for each language.
For example, with the code below, you can associate to the content a Pretty ID corresponding to its EAN code “45378879oe" and its view code “11":

 

POST: https://<clientId>-view.thron.com/api/xcontents/resources/content/addContentPrettyId

{ 
  "clientId": "Your clientId", 
  "contentId": "Your xcontentId", 
  "prettyId": { 
    "id": "45378879oe_11", 
    "locale": "EN" 
  } 
} 

 

Before proceeding to add a Pretty ID, you can check whether it already exists via the verifyContentPrettyId service.

 

Via API - Pretty ID editing:

Using the updateContentPrettyId service, you can change the Pretty ID of a content for each language.
For example, with the code below, it is possible to replace the previous Pretty ID "45378879oe_11" with a new value "45378879oe_12".

 

POST: https://<clientId>-view.thron.com/api/xcontents/resources/content/updateContentPrettyId

{ 
  "clientId": "Your clientId", 
  "contentId": "Your xcontentId", 
  "prettyId": { 
    "id": "45378879oe_12", 
    "locale": "EN" 
  } 
} 

 

Via API - Pretty ID removal:

Using the removeContentPrettyId service, you can remove the Pretty ID of a content for each language.

 

POST: https://<clientId>-view.thron.com/api/xcontents/resources/content/removeContentPrettyId

{ 
  "clientId": "Your clientId", 
  "contentId": "Your xcontentId", 
  "locale": "EN" 
} 

 

Via API - Searching for contents via Pretty ID:

Using the search service, you can search for a content using its Pretty ID instead of its alphanumeric xcontentId.
For example, with the code below, you can search for content directly via the Pretty ID "45378879oe_11" without necessarily knowing its THRON ID

 

POST: https://<clientId>-view.thron.com/api/xcontents/resources/content/search/clientId

{
  "criteria": {
  "ids": [
  "45378879oe_11"
    ]
  },
  "responseOptions": {
  "returnDetailsFields": [
  "locales"
    ],
  "resultsPageSize": 10,
  "sort": [{
	"lastUpdate": {
	"order": "asc"
	}
   }]
  }
}

Another case may be the use of the Pretty ID in calling up the public/image API (see article How to embed images into your projects) to obtain both the advantage of optimisation for SEO purposes (Pretty ID instead of THRON's alphanumeric ID) and the simplification of the search for the content itself, which is identified by its naming convention.

 

Folder Pretty ID

You can manage Folders Pretty IDs either from THRON DAM PLATFORM or via API.

 

THRON DAM PLATFORM:

To create, edit or remove the PrettyID of a Folder, follow these steps:

  • Click on the three dots in correspondence of a specific folder
  • Click on the edit icon (pencil)
  • Add, edit or remove the folder PrettyID from the corresponding field.

folderprettyid.png

 

Via API - Pretty ID entry:

Using the addCategoryPrettyId service, you can associate a PrettyID to a folder for each language.

 

POST: https://<clientId>-view.thron.com/api/xcontents/resources/category/addCategoryPrettyId

{ 
  "categoryId": "Your Category ID", 
  "clientId": "Your ClientId", 
  "prettyId": { 
    "id": "Your Pretty ID", 
    "locale": "EN" 
  } 
} 

 

Via API - Pretty ID editing:

Using the addCategoryPrettyId service, you can edit the Pretty ID of a folder for each language.

 

POST: https://<clientId>-view.thron.com/api/xcontents/resources/category/updateCategoryPrettyId

{ 
  "categoryId": "Your Category ID", 
  "clientId": "Your ClientId", 
  "prettyId": { 
    "id": "Your Pretty ID", 
    "locale": "EN" 
  } 
}  

 

Via API - Pretty ID removal:

Using the removeCategoryPrettyId service, you can remove the Pretty ID of a folder for each language.

 

POST: https://<clientId>-view.thron.com/api/xcontents/resources/category/removeCategoryPrettyId

{ 
  "categoryId": "Your Category ID", 
  "clientId": "Your ClientId", 
  "locale": "EN" 
} 

 

Via API - Searching a folder via Pretty ID:

Using the findByProperties2 service, you can search for a folder using its Pretty ID instead of its categoryId.

 

POST: https://<clientId>-view.thron.com/api/xcontents/resources/category/findByProperties2

{ 
  "categoryFieldOption": { 
    "returnAclInfo": false, 
    "returnNumberOfContents": false, 
    "returnNumberOfSubCategories": false, 
    "returnNumberOfUnreadContents": false, 
    "returnNumberOfUnreadContentsInSubCategories": false, 
    "returnTotalResults": false 
  }, 
  "client": { 
    "clientId": "Your clientId" 
  }, 
  "numberOfResult": 10, 
  "offset": 0, 
  "orderBy": "categoryName_A", 
  "properties": { 
    "categoryIds": [ 
      "Your Pretty ID" 
    ] 
  } 
} 

 

Tags Pretty ID

You can manage Tags Pretty IDs either from THRON DAM PLATFORM or via API.

 

THRON DAM PLATFORM:

To create, edit or remove the PrettyID of a Tag, follow these steps:

  • Go to THRON DAM PLATFORM Tag Center and enter a Class
  • Click on a specific Tag
  • Add, edit or remove the Tag PrettyID from the corresponding field.

tagprettyid.png

 

Via API - Pretty ID update:

Using the itagdefinition/update service, you can associate a Pretty ID to an existing tag.

 

POST: https://<clientId>-view.thron.com/api/xintelligence/resources/itagdefinition/update/clientId/classificationId/tagId

{
	"update": {
		"names": [{
			"lang": "EN",
			"label": "Wood",
			"description": "Material"
		}],
		"prettyId": "Your Pretty ID"
	}
}

 

You can also associate a Pretty ID to a tag during tag creation, through the corresponding parameter using the insert service.

 

POST: https://<clientId>-view.thron.com/api/xintelligence/resources/itagdefinition/insert/clientId/classificationId

{
	"value": {
		"names": [{
			"lang": "EN",
			"label": "Wood",
			"description": "Material"
		}],
		"pos": 51,
		"prettyId": "Your Pretty ID",
		"categorized": true
	}
}
Was this article helpful?
0 out of 0 found this helpful

Have any question?

Open a ticket
Comments