logo
Feature Endpoint
Assets
GET

/custom/api/fetch/assets

Headers

Authorizationrequired
string

Input the Authorization Bearer Token to authorize your API request.

Parameters

file_nameoptional
string

File name which is fuzzy matched when searching

start_countoptional
number

Start count of the assets for pagination. Minimum value is 1.

end_countoptional
number

End count of the assets for pagination. Minimum value is 1.

Response

results
array

This array contains the list of asset objects.

Each asset object contains the following properties:

  1. 01.  _id: Asset ID
  2. 02.  unique_id: User unique id
  3. 03.  created_at: timestamp of creation
  4. 04.  updated_at: timestamp of last update
  5. 05.  deleted: boolean flag
  6. 06.  asset_type: type of asset (e.g. "file")
  7. 07.  tag_ids: array of tag identifiers
  8. 08.  filename: name of the file
  9. 09.  total_words: number of words in the file
  10. 10.  file_size: size in bytes
  11. 11.  file_description: description of the file
Use _id (Asset ID) in file_id attribute when calling the following endpoints:
total_count
number

Count of total uploaded assets

curl -X 'GET' \
'https://api-az.longshot.ai/custom/api/fetch/assets?file_name=mallorca&start_count=1&end_count=10' \
-H 'Authorization: Bearer <API_KEY>'                         
{
  "results": [
    {
      "_id": "<asset_id>",
      "unique_id": "<unique_id>",
      "created_at": "<timestamp>",
      "updated_at": "<timestamp>",
      "deleted": false,
      "asset_type": "file",
      "tag_ids": [
        "<tag_id>"
      ],
      "filename": "<filename>",
      "total_words": 100,
      "file_size": 10000,
      "file_description": "<file description>"
    }
  ],
  "total_count": 10
}