Reindexing Contents via REST API
On this page
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 type | Service description | Endpoint | Request query parameters | Form data | Returns |
---|---|---|---|---|---|
POST | Reindex single content by ID | https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/content/reindex | sessionId | contentId | ID of the reindexing job |
POST | Reindex multiple contents by IDs | https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex | sessionId | contentIds | ID of the reindexing job |
POST | Reindex contents by condition | https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex/by-condition | sessionId | createdBy, lastModifiedBy, name, owner, parentId, tags | ID of the reindexing job |
Properties
The table below explains propertied used for reindexing contents.
Property | Data type | Description |
---|---|---|
sessionId | string | Session ID returned by authentication request. Mandatory in all reindexing requests. |
contentId | string | Content ID, identifying a single content to be reindexed. |
contentIds | array | Array of content IDs, identifying contents to be reindexed. |
createdBy | string | Property identifying the creator of a content. |
lastModifiedBy | string | Property identifying the user who modified the content most recently. |
name | string | Content name. |
owner | string | Content owner. |
parentId | string | Property identifying a folder (where contents are located). |
tags | array | Array of tags assigned to contents. |