connections_external_data_search
const url = 'https://example.com/api/connections/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/external_data/search?q=example';const options = { method: 'GET', headers: { 'X-Workspace': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/connections/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/external_data/search?q=example' \ --header 'Authorization: Bearer <token>' \ --header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'Search the data of the source of a connection.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Connection ID
Header Parameters
Section titled “Header Parameters”Workspace ID
Query Parameters
Section titled “Query Parameters”Page of results, starting at 1. A page holds at most EXTERNAL_SEARCH_PAGE_SIZE results (20 by default).
Id of the data object to search in (a folder, a record…). Without it, the whole source is searched. Results found below the direct children of the parent carry their location.
Text to search for: an identifier, a DOI, a title, as the plugin of the connection reads it. At least EXTERNAL_SEARCH_MIN_LENGTH characters (3 by default) and at most EXTERNAL_SEARCH_MAX_LENGTH (200 by default) once stripped of spaces.
Responses
Section titled “Responses”object
Number of results, null when the source does not tell.
Serialize external data attributes for representation.
object
object
Why nothing matches, when the plugin tells (an identifier of another instance, for example).
Example generated
{ "count": 1, "next": "https://example.com", "previous": "https://example.com", "current_page": 1, "total_pages": 1, "results": [ { "id": "example", "name": "example", "size": { "additionalProperty": "example" }, "file_extension": "example", "type": "example", "icon": "example", "has_children": true, "location": "example" } ], "message": "example"}object
object
Example
{ "code": "plugin_error", "message": "An error occurred in the plugin. Check the `details` property for more details.", "details": [ { "parameter": "plugin", "message": "Plugin `Stub` cannot search its source.", "code": "search_not_supported" }, { "parameter": "retry_after", "message": "The data source refuses requests for now. Please retry in 30 seconds.", "code": "rate_limited", "retry_after": 30 } ]}object
object
Example
{ "code": "object_not_found", "message": "Object not found. Check the `details` property for more details.", "details": [ { "parameter": "<id>", "code": "does_not_exist", "message": "\"<id>\" does not exist." } ]}
