Skip to content

connections_external_data_search

GET
/api/connections/{connections_pk}/external_data/search
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.

connections_pk
required
string format: uuid

Connection ID

X-Workspace
required
string format: uuid

Workspace ID

p
integer

Page of results, starting at 1. A page holds at most EXTERNAL_SEARCH_PAGE_SIZE results (20 by default).

parent
string

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.

q
required
string

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.

Media typeapplication/json
object
count
required

Number of results, null when the source does not tell.

integer
nullable
next
required
string format: uri
nullable
previous
required
string format: uri
nullable
current_page
required
integer
total_pages
required
integer
results
required
Array<object>

Serialize external data attributes for representation.

object
id
required
string
name
required
string
size
required
object
key
additional properties
string
file_extension
required
string
type
required
string
icon
required
string
has_children
required
boolean
location
required
string
nullable
message
required

Why nothing matches, when the plugin tells (an identifier of another instance, for example).

string
nullable

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"
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

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
}
]
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

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."
}
]
}