In some situations, the Image Artist Search (Public) API can become out of sync with the Datastore (Internal) API. When this happens, items that are visible in the Image Artist web interface may not appear in Search API results.
If you notice this behaviour, the Search API index can be safely rebuilt by re‑indexing it.
When to Re‑index
Re‑indexing is recommended if:
- Objects appear correctly in the Image Artist UI
- The same objects are missing when queried via the Search API
Rebuilding the index forces the Search API to resync with the underlying datastore.
Re‑indexing Options
The simplest way to trigger a re‑index is through the Swagger Web Interface.
For instructions on how to access Swagger, see the following article:
Image Artist: Using the Swagger Interface to query the Search API
Once in Swagger, you can trigger an index rebuild using the following endpoint:
Re‑indexing Using Command‑Line Tools (curl example)
If you prefer, you can also initiate the re‑index using third‑party tools such as curl or httpie. The example below uses curl.
This process consists of two steps:
Step 1: Request the Authentication Token
curl --request POST \
--url https://<ImageArtist_domain>/api/1.1/authentication/token \
--header 'Content-Type: application/json' \
--insecure \
--data-raw '{
"userName": "admin",
"password": "<PASSWORD>",
"urls": ["/api/1.1/*"]
}'Where:
-
<ImageArtist_domain>is the domain name or IP address of the Image Artist instance -
<PASSWORD>is the password for the Image Artist admin user
If successful, the response will contain a token, for example:
{
"token":"cabc3148-baed-4c1a-811e-845b8ff2492f",
"urls":["/api/1.1/*"]
}Next, pass the authentication token when calling the re‑index endpoint.
curl --request PUT \
--url https://<ImageArtist_domin>/api/admin/search_index/all/ \
--header 'PKI-Columbus-Authentication: <AUTHENTICATION_TOKEN>' \
--header 'Content-Type: application/json' \
--insecure \
--data-raw ''Where:
-
<ImageArtist_domain>is the domain name or IP address of the Image Artist instance -
<AUTHENTICATION_TOKEN>is the token returned in Step 1
If the request succeeds, the API will return a 200 OK response:
{
"status":"OK"
}
Comments
0 comments
Article is closed for comments.