Resources

Searching for resources

NOTE: when it comes to searching by name, the equal sign must be intended as "contains" rather than "equals". So if we search resources with name "in" we might be given back e.g. India.csv and Indonesia.json but also Argentina.csv

  • JSON
  • XML

Filtering Resources by scope

{{codeStart}}

# To retrieve the list of public Resources in a User-defined workspace

GET https://api.<region>.whispir.com/workspaces/:workspace_id/resources?scope=public

# To retrieve the list of public Resources in the default workspace

GET https://api.<region>.whispir.com/resources?scope=public

Authorization: Basic asdf98nf89asdvasd2r398h8sdf

x-api-key: your_api_key

Accept: application/vnd.whispir.resource-v1+json

{{codeEnd}}

Filtering Resources by name

{{codeStart}}

# To retrieve the list of public Resources in a User-defined workspace

GET https://api.<region>.whispir.com/workspaces/:workspace_id/resources?name=australia.csv

# To retrieve the list of public Resources in the default workspace

GET https://api.<region>.whispir.com/resources?name=australia.csv

Authorization: Basic asdf98nf89asdvasd2r398h8sdf

x-api-key: your_api_key

Accept: application/vnd.whispir.resource-v1+json

{{codeEnd}}

Query Parameters Details

You can search for resources by passing valid search criteria as query parameters

scope

String

Filters the Resources according to their scope. The allowed options for its values are:

  • public
  • private

Example:
https://api.<region>.whispir.com/resources?scope=public

name

String

Specifies the name of the Resource, including the file extension. Providing an accurate name will narrow down the results

Example:
https://api.<region>.whispir.com/resources?name=australia.json

Sample Response

200 - OK