Rebuild Search Indices

post/search/indices
Internal-Use Only

Delete and rebuild indices from the content in the Catalog service. The index rebuild jobs run asynchronously via Job Execution Service jobs, which can be polled for status using the job identiers in the response.

Request Samples

1

Response Samples

1{
2 "/catalog/search/indices/3bbc7ed7-0e60-456b-a0e1-632024d7ed5a": {
3 "createdBy": "sasuser",
4 "modifiedBy": "sasuser",
5 "version": 4,
6 "id": "a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee",
7 "state": "running",
8 "heartbeatInterval": 30,
9 "heartbeatTimeStamp": "2022-11-15T16:32:05.845Z",
10 "elapsedTime": 439,
11 "submittedByApplication": "catalog",
12 "links": [
13 {
14 "method": "GET",
15 "rel": "self",
16 "href": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee",
17 "uri": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee",
18 "type": "application/vnd.sas.job.execution.job"
19 },
20 {
21 "method": "GET",
22 "rel": "state",
23 "href": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee/state",
24 "uri": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee/state",
25 "type": "text/plain"
26 },
27 {
28 "method": "PUT",
29 "rel": "update",
30 "href": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee",
31 "uri": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee",
32 "type": "application/vnd.sas.job.execution.job",
33 "responseType": "application/vnd.sas.job.execution.job"
34 },
35 {
36 "method": "DELETE",
37 "rel": "delete",
38 "href": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee",
39 "uri": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee"
40 },
41 {
42 "method": "PUT",
43 "rel": "updateState",
44 "href": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee/state",
45 "uri": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee/state",
46 "type": "text/plain"
47 },
48 {
49 "method": "POST",
50 "rel": "updateHeartbeatTimeStamp",
51 "href": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee/heartbeatTimeStamp",
52 "uri": "/jobExecution/jobs/a9b1eb6b-d428-4f13-adc0-8d3e1868e7ee/heartbeatTimeStamp",
53 "type": "text/plain"
54 }
55 ],
56 "jobRequest": {
57 "version": 3,
58 "name": "Index Maintenance (dataplans)",
59 "description": "Maintain an Index",
60 "expiresAfter": "PT168H",
61 "createdByApplication": "jobExecution",
62 "jobDefinition": {
63 "version": 2,
64 "name": "indexMaintenance",
65 "type": "CATALOG",
66 "code": "{\"index\":\"dataplans\"}"
67 }
68 },
69 "creationTimeStamp": "2022-11-15T16:32:05.424Z",
70 "modifiedTimeStamp": "2022-11-15T16:32:05.849Z"
71 },
72 "/catalog/search/indices/f2351f74-09cb-4fc2-96df-6131946c354b": {
73 "createdBy": "sasuser",
74 "modifiedBy": "sasuser",
75 "version": 4,
76 "id": "c85bc909-e530-4acb-8c58-5f3669b0149e",
77 "state": "running",
78 "heartbeatInterval": 30,
79 "heartbeatTimeStamp": "2022-11-15T16:32:06.654Z",
80 "elapsedTime": 251,
81 "submittedByApplication": "catalog",
82 "links": [
83 {
84 "method": "GET",
85 "rel": "self",
86 "href": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e",
87 "uri": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e",
88 "type": "application/vnd.sas.job.execution.job"
89 },
90 {
91 "method": "GET",
92 "rel": "state",
93 "href": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e/state",
94 "uri": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e/state",
95 "type": "text/plain"
96 },
97 {
98 "method": "PUT",
99 "rel": "update",
100 "href": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e",
101 "uri": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e",
102 "type": "application/vnd.sas.job.execution.job",
103 "responseType": "application/vnd.sas.job.execution.job"
104 },
105 {
106 "method": "DELETE",
107 "rel": "delete",
108 "href": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e",
109 "uri": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e"
110 },
111 {
112 "method": "PUT",
113 "rel": "updateState",
114 "href": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e/state",
115 "uri": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e/state",
116 "type": "text/plain"
117 },
118 {
119 "method": "POST",
120 "rel": "updateHeartbeatTimeStamp",
121 "href": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e/heartbeatTimeStamp",
122 "uri": "/jobExecution/jobs/c85bc909-e530-4acb-8c58-5f3669b0149e/heartbeatTimeStamp",
123 "type": "text/plain"
124 }
125 ],
126 "jobRequest": {
127 "version": 3,
128 "name": "Index Maintenance (datasets)",
129 "description": "Maintain an Index",
130 "expiresAfter": "PT168H",
131 "createdByApplication": "jobExecution",
132 "jobDefinition": {
133 "version": 2,
134 "name": "indexMaintenance",
135 "type": "CATALOG",
136 "code": "{\"index\":\"datasets\"}"
137 }
138 },
139 "creationTimeStamp": "2022-11-15T16:32:06.426Z",
140 "modifiedTimeStamp": "2022-11-15T16:32:06.657Z"
141 }
142}

Query Parameters

NameTypeRequiredDescription
action
string
true

The action parameter for the rebuild request.

Allowed value:
rebuild
Default:
rebuild

Header Parameters

NameTypeRequiredDescription
Accept
string
false

The desired representation for the response. The response is a map of the search index uri to the result--either a job, which can be used to poll for updates, or an error if there was an issue processing the index that prevented submission of the job request.

Allowed value:
application/json
Default:
application/json

Request Body

Identifies a set of resources.

NameTypeRequiredDescription
version
integer
true

The schema version number of this media type. This representation is version 1.

template
string
false

A URI template in which the {id} parameter can be replaced with a value from the "resources" array in order to yield the URI of the identified resource.

type
string
false

Specifies whether the resources array contains IDs, URIs, or both.

Allowed values:
idurimixed
resources
array [string]
true

An array of resource IDs or URIs

links
array [Link]
false

An array of links to related resources and actions.

Responses

StatusMeaningDescription
202AcceptedThe request was accepted, but the index updates have not yet been applied. The jobs identified in the response can be monitored independently to determine when (and how) they complete. HeadersSchema
400Bad RequestBad request (the request is not well-formed).Schema
401UnauthorizedNot authenticated.Schema
403ForbiddenThe user does not have permission to complete this request.Schema
406Not AcceptableNot Acceptable. Include an Accept header with a supported value on the request.Schema