Search Files
Endpoint to search files. One or multiple filters can be applied. <br/>Note: The result set is lmited to 10,000 results.
Request
- Base URLhttps://api.kontainer.com/jsonapi/v2
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
[ "keyword" ]
Filter by file extensions. Example: filter[extensions][in]=['jpg','png']
[ "extension" ]
Custom fields filters.
Example:
To apply a filter on the custom field name "ean" equals "ABC123", and "size" of either medium or large, you would write the filter query as below:
{
"filter": {
"custom_fields": {
"ean": {"eq": "ABC123"},
"size": {"in": ["medium", "large"]}
}
}
}
A file reference custom field only filters on whether it has a linked file. To find files that have a "license" file, and files in the category without one:
{"filter": {"custom_fields": {"license": {"eq": "true"}}}}
{"filter": {"custom_fields": {"license": {"eq": "false"}}}}
true and 1 mean "is set"; false, 0 and an empty value mean "not set". Any other value is ignored.
{
"ean": {
"eq": "ABC123"
},
"size": {
"in": [
"medium",
"large"
]
}
}If filtering by custom fields, you must include the category id. Example: filter[custom_fields_category_id][eq]=22
Define the FROM updated date. Examples: filter[upload_date][gte]='2024-02-01' OR filter[upload_date][gte]='2024-02-01 10:11:12'. OBS! when specifying date and time, API expects UTC'. ISO-8601 is also accepted, and a UTC designator or a UTC offset is converted to the application timezone
Define the TO updated date. Examples: filter[upload_date][gte]='2024-02-01' OR filter[upload_date][gte]='2024-02-01 10:11:12'. OBS! when specifying date and time, API expects UTC'. ISO-8601 is also accepted, and a UTC designator or a UTC offset is converted to the application timezone
Define the FROM updated date. Examples: filter[updated_date][gte]='2024-02-01' OR filter[updated_date][gte]='2024-02-01 10:11:12'. OBS! when specifying date and time, API expects UTC'. ISO-8601 is also accepted, and a UTC designator or a UTC offset is converted to the application timezone
Define the TO updated date. Examples: filter[updated_date][gte]='2024-02-01' OR filter[updated_date][gte]='2024-02-01 10:11:12'. OBS! when specifying date and time, API expects UTC'. ISO-8601 is also accepted, and a UTC designator or a UTC offset is converted to the application timezone
Define the start folder begin the search from, including all subfolders. Example: filter[start_folder][eq]=2511
Define the folder id to limit the search to. Example: filter[folder_id][eq]=2955
Define the per page size. (defaults to 100, limit is 500) Example: page[size]=10
Define the page number. (defaults to 1) Example: page[number]=1
Result sorting options: name, size, created, updated. Example : sort=name, or sort=-name (use the minus sign to sort in descending order)</br>
When true and keywords are given, meta.content_matches holds, for each file whose text matched, the passages of its text around the keywords.
Relationship options: file.folder, file.custom_fields, file.cdn, file.focal_point, file.created_by, folder.parent_folder, folder.source_folder
Inlcudes options: file.folder, file.custom_fields, file.cdn, file.focal_point, file.created_by, folder.parent_folder, folder.source_folder</br></br> Note! : the asociated relationships must also be requested to use the includes options.
Response
success
Example response
{
"data": [
{
"type": "file",
"id": "1234",
"attributes": {
"name": "Callaway.png",
"description": "Golf image",
"size": 5566,
"sort": 2,
"created_at": "2023-10-15T06:29:29.000000Z",
"updated_at": "2023-10-15T06:29:29.000000Z",
"extension": "png",
"width": 16,
"height": 16,
"orientation": 1,
"version": 1,
"consent_status": "no_consent",
"consent_rights": [],
"consent_party_ids": []
}
}
],
"meta": {
"sort": "name",
"content_matches": {
"1234": [
"1-4 Crankshaft position sensor (CKP) signal missing. Inspect the CKP sensor connector and replace sensor 33220-90J00 if out of range."
]
}
},
"pagination": {
"total": 100,
"per_page": 10,
"current_page": 1,
"last_page": 10,
"info": "Max results limit of 10000 records has been reached. Consider refining your search."
}
}Changes
No recorded changes to this operation across all 1 revision of this API.