Update data in an index layer
You can update the index records in an index layer by specifying indexes to add and ids to remove in request body.
- Obtain an authorization token.
- Use the
v1 API to get API base URLs.
- Use the
v1 API to update index records.
Obtain an authorization token
Obtain an authorization token for your HTTP requests. For instructions, see the Identity & Access Management Guide.
Get API base URLs
Use the API Lookup service to get the API endpoints for the
v1 API of the catalog containing the index layer with ids you want to delete.
For instructions, see the API Lookup Developer's Guide.
To update index records in the index layer, you must specify "additions" and "removals" in your request body, "deleteBlob" is optional:
- Additions are the index records you defined to insert into the index layer. The additions must follow the validation rules and constraints listed in Publish to an index layer
- Removals are the ids of the index records in the index layer. If the id related index record exists in the index layer, the index record will be removed, otherwise it will not make change to the index layer.
- DeleteBlob is a true/false flag. Set it to
true if you want to delete the data from blob storage corresponding to the index records as well. By default, it is
- Even if DeleteBlob is
true, the blob data will continue to be available for 24 hours after update request is completed successfully.
PUT /<Base path for the index API from the API Lookup Service>/layers/<Layer ID> HTTP/1.1
Host: <Hostname for the index API from the API Lookup Service>
Authorization: Bearer <Authorization Token>
Content-Type: <Content type configured for the target layer>
- The maximum number of index records in the additions of one index update API call is 2000.
- The maximum number of ids in the removals of one index update API call is 2000.