Querying Assets
This page shows some examples on how to use the dScribe API to query assets.
Before you can query, you will first have to create some assets. Try our get inspired feature to quickly get some glossary items in your catalog!
Get assets
This endpoint will list your available assets. The query is paginated to the first 15 items. You can use the page and pageSize params to adjust this to your needs.
The response will look something like this.
Note the last page argument in the metadata object. We added it for your convenience to check if more assets need to be fetched.
Search assets
If you want a bit more control on the assets that are returned, you can use the search endpoint. You can do a fuzzy search on name or filter on any combination of asset types and other properties.
Supported filters
filter | description |
---|---|
name_contains | Does a fuzzy search on the name field |
asset_type | Only returns assets of the specified asset_types (e.g. dataset or report) |
properties | List of properties to filter on, multiple ones will be combined as a logical AND |
Properties
filter | description |
---|---|
key | The API handle of the property. You can find this in the property admin section of the web application |
operator | One of the following: equal, not_equal, include, not_include, not_empty, empty, in (used for dates, you can filter on the last 7 days with the operator -7d/d) |
value | The value of the property to filter on. For text properties, this is just a string. For selects, multi selects, collaborator and hierarchical selects this is the api handle that can be found in the web portal. For date properties, it is a range string, for example: -7d/d (last 7 days), -30d/d (last 30 days), ... |
Find an asset
For some integrations it might be useful to only fetch one asset.
Query parameters
The following parameters can be added to all three requests:
addPropertyValueLabel boolean (default: false)
Add the label (and not only id) of property values returned on the asset. That would mean the properties array would go from:
to this:
addPropertyValueLabel boolean (default: false)
If true, the wysywig property value will be returned as full text instead of the the WYSYWIG JSON format (the JSON format includes mentions, links, images, etc...)
include boolean (default: false)
Adding include to the request will allow to add certain information that is not included by default. The only supported value at the moment is relations. Adding include=relations
to get, find and search assets will include the relations to other assets or dses.
Last updated