Record a search selection
const url = 'https://example.com/api/v1/search/opened';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"plugin_id":"example","result_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/search/opened \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "plugin_id": "example", "result_id": "example" }'Records a search selection. It requires a signed-in User with the data scope. It can return 400 if the request is invalid, 401 if the session is missing or expired, 403 if access is denied and 503 if the service is temporarily unavailable. Route: /api/v1/search/opened. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Plugin that owns the opened result.
Stable result identifier returned by the search API.
Examplegenerated
{ "plugin_id": "example", "result_id": "example"}Responses
Section titled “Responses”Opened result recorded for this User
Invalid open record
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Authentication is required
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Data access is required
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Search index is unavailable
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}