Token

The Infobel DaaS api uses a token-based authentication that is required to use any of the methods available. The following method will generate a valid token that you can use only for a limited time. Once expired, you will have to generate and use a new token

API method URIDescription
POST api/token

Use this method to generate a new token using your provided credentials. The returned access_token must be used in a custom HTTP Header named Authorization and having for value: Bearer {access_token}

Countries

The following methods allow you to check all the countries available through DaaS api

API method URIDescription
GET api/countries

Use this method to get all the countries you can query using DaaS api. For each one you will know which database types can be queried

Test

The following method is only present for tests purpose

API method URIDescription
GET api/test/hello

Use this method to test the connection to the DaaS api. You will receive a welcome message that will change if the request is sent anonymously, or authentified with a valid token

Categories

The following methods allow you to fetch all and search for any of the different types of categories that you can use in your queries

API method URIDescription
GET api/categories/infobel/{language}

Use this method to fetch all the Infobel categories available. This will return the categories and their descriptions in the specified language. Note that some Infobel categories might not have a description in some languages

GET api/categories/international/{language}

Use this method to fetch all the International categories available. This will return the categories and their descriptions in the specified language. Note that some International categories might not have a description in some languages

GET api/categories/local/{countryCode}/{language}

Use this method to fetch all the Local categories available for a specified country. Note that some Local categories might not have a description in some languages

GET api/categories/search/{language}/{filter}

Use this method to search for any type of category, using a term-based filter. This will return any type of category matching the input filter in the specified language

Locations

The following methods allow you to fetch all and search for any of the different types of locations for any country available that you can use in your queries

API method URIDescription
GET api/locations/{countryCode}/cities?provinceCode={provinceCode}

Use this method to fetch all the cities available for a specified country. You can also limit to fetch only the cities for a specified province

GET api/locations/{countryCode}/provinces?regionCode={regionCode}

Use this method to fetch all the provinces available for a specified country. You can also limit to fetch only the provinces for a specified region

GET api/locations/{countryCode}/regions

Use this method to fetch all the regions available for a specified country

GET api/locations/{countryCode}/search/{filter}

Use this method to search for any type of location for a specified country, using a term-based filter. This will return any type of location matching the input filter in the specified country

Query

The following methods allow you to submit queries, check their status and check the counts they returned

API method URIDescription
POST api/query/add

Use this method to submit a new query. Please check the input requirements

GET api/query/{queryId}/status

Use this method to check your query status. All possible values being: Pending, Processing, Processed, Error

GET api/query/{queryId}/counts

Once a query is Processed, use this method to get the counts produced

Extract

Once queries are processed, the following methods will allow you to create extracts from your queries, check the extracts status and once Processed download the extracted records

API method URIDescription
POST api/extract/add

Once a query is Processed, if you want to download a sample of the records that matched (or all of them), use this method to create an extract. Please check the input requirements. Note that you can create several extracts for one query. For example you might want to extract a small sample to first check the content of the records extracted before doing a large or full extract with more records. Note also that even if the records are extracted randomly, a same record won't appear in several extracts. Already extracted records are auto excluded in next extracts.

GET api/extract/{extractId}/status

Use this method to check your extract status. All possible values being: Pending, Processing, Processed, Error

GET api/extract/{extractId}/records/{page}?pageSize={pageSize}

Once an extract is Processed, use this method to fetch the content of the records. Pagination is available to avoid you to fetch a too large set of records at once. Still you can do it if needed