logoBack to home screen

Reindexing Contents via REST API

When Should I Reindex Contents?

You may notice that fulltext search is not indexing all contents in your repository. This will happen in a situation where contents have been uploaded to a repository before fulltext was available, for example:

  • When you have just connected an external repository (such as Documentum) to ADx, the contents of which have been uploaded previously (not in ADx).
  • When contents have been uploaded to a repository at a time when fulltext search was disabled.

In this case, reindexing of the contents is necessary, to make sure that fulltext search works as expected on all contents. This document explains how to do it using ADx REST API (you can also do it from user interface - see Reindexing Contents in ADx.

Please keep in mind that a valid session ID is required by all ADx REST services. For information on how to obtain it, read Authenticating to ADx via REST.

Reindexing Single Content by ID

This service allows you to reindex specific content by ID. To execute it, send a POST request to https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/content/reindex, passing the content ID in the body. In the cURL example below, we are requesting content identified by content_id to be reindexed:

curl -X POST "https://adx-local:9080/tribefire-services/api/v1/access.adx.content.repositoryname/v1/content/reindex?sessionId=someId" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "contentId=content_id"

As a result, reindexing job is created, and the jobId parameter, identifying this job, is returned.

For detailed information about the /content/reindex endpoint, please read Full Endpoint Description.

Reindexing Multiple Contents by IDs

This service allows you to reindex multiple contents identified by their IDs. To execute it, send a POST request to https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex, passing the content IDs in the body. In the cURL example below, we are requesting contents identified by contentId1 and contentId2 to be reindexed:

curl -X POST "http://adx-local:9080/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex?sessionId=someId" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "contentIds=contentId1" -F "contentIds=contentId2"

As a result, reindexing job is created, and the jobId parameter, identifying this job, is returned.

For detailed information about the /contents/reindex endpoint, please read Full Endpoint Description.

Reindexing Contents by Condition

This service allows you to reindex contents identified by their properties. To execute it, send a POST request to https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex/by-condition, passing the properties (conditions) in the body. In the cURL example below, we are requesting contents identified by createdBy and owner properties to be reindexed:

If you do not pass any parameters, all contents will be reindexed!

curl -X POST "http://adx-local:9080/tribefire-services/api/v1/access.adx.content.fulltext/v1/contents/reindex/by-condition?sessionId=someId" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "createdBy=grzegorz" -F "owner=grzegorz"

As a result, reindexing job is created, and the jobId parameter, identifying this job, is returned.

For detailed information about the /contents/reindex/by-condition endpoint, please read Full Endpoint Description.

Full Endpoint Description

The table below explains what parameters you can pass to specific reindexing requests.

Request typeService descriptionEndpointRequest query parametersForm dataReturns
POSTReindex single content by IDhttps://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/content/reindexsessionIdcontentIdID of the reindexing job
POSTReindex multiple contents by IDshttps://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindexsessionIdcontentIdsID of the reindexing job
POSTReindex contents by conditionhttps://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex/by-conditionsessionIdcreatedBy, lastModifiedBy, name, owner, parentId, tagsID of the reindexing job

Properties

The table below explains propertied used for reindexing contents.

PropertyData typeDescription
sessionIdstringSession ID returned by authentication request. Mandatory in all reindexing requests.
contentIdstringContent ID, identifying a single content to be reindexed.
contentIdsarrayArray of content IDs, identifying contents to be reindexed.
createdBystringProperty identifying the creator of a content.
lastModifiedBystringProperty identifying the user who modified the content most recently.
namestringContent name.
ownerstringContent owner.
parentIdstringProperty identifying a folder (where contents are located).
tagsarrayArray of tags assigned to contents.