Welcome to Data API. You’ll find comprehensive guides and documentation to help you start working with Data as quickly as possible, as well as support if you get stuck. Let’s get started.
Getting an API key
You can find your API key on your MY ACCOUNT page.
Authenticating your requests
You must include your API key with every request you make.
Append your API key to your requests using the api key parameter:
api_key=YOURAPIKEY
Data provide list of content with json reponse.Parameters are options you can pass with the endpoint (such as specifying the response format or the amount returned) to influence the response
Definition:
https://ai.catenacap.xyz/?page_id=7946&{database_code}/{dataset_code}&api_key=YOURAPIKEY&format={return_format}
Example:
https://ai.catenacap.xyz/?page_id=7946&JODI/OIL_KERIKB_LAJ&api_key=YOURAPIKEY&format=json
Parameter | Required | Type | Values | Description |
---|---|---|---|---|
database_code | yes | string | Code identifying the database to which the dataset belongs. | |
dataset_code | yes | string | Code identifying the dataset. | |
start_date | no | string | yyyy-mm-dd | Retrieve data rows on and after the specified start date. |
end_date | no | string | yyyy-mm-dd | Retrieve data rows up to and including the specified end date. |
Start Date & End Date
Using start date and end date filters with your API call can help get the data you need without wasting resources retrieving data you don’t need. A start date and end date can be added to any data object on a user or organization level call. It will return any records that have a “timestamp” on or after the start date up to or on the end date. Adding the start date and end date to your call can be done by appending &start_date=yyyy-mm-dd&end_date=yyyy-mm-dd to it and The End date must be greater than the Start date.
The default output format for the DATA is json format , DATA gives output in two formats. These are: * JSON : data is delivered in json format. * CSV : comma delimited values. The API gives you a choice of two formats (JSON/CSV). Queries can be run in both JSON and CSV format with all others parameters. Example is below:
Parameters | Example | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
api_key |
Example Query : https://ai.catenacap.xyz/?page_id=7946&JODI/OIL_KERIKB_LAJ&api_key=YOURAPIKEY Result : {“columns”:[“Date”,”Value”,”Notes”],”column_values”:[[“2015-01-31″,”0.0″,”3.0”],[“2014-12-31″,”0.0″,”3.0”],[“2014-11-30″,”0.0″,”3.0”],[“2014-10-31″,”0.0″,”3.0”]]} |
|||||||||
format=json |
Example Query : https://ai.catenacap.xyz/?page_id=7946&JODI/OIL_KERIKB_LAJ&api_key=YOURAPIKEY&format=json Result : {“columns”:[“Date”,”Value”,”Notes”],”column_values”:[[“2015-01-31″,”0.0″,”3.0”],[“2014-12-31″,”0.0″,”3.0”],[“2014-11-30″,”0.0″,”3.0”],[“2014-10-31″,”0.0″,”3.0”]]} |
|||||||||
format=csv |
Example Query : https://ai.catenacap.xyz/?page_id=7946&JODI/OIL_KERIKB_LAJ&api_key=YOURAPIKEY&format=csv Result :
|
|||||||||
start_date & end_date |
Example Query : https://ai.catenacap.xyz/?page_id=7946&JODI/OIL_KERIKB_LAJ&api_key=YOURAPIKEY&format=json&start_date=2002-10-31&end_date=2003-01-31 Result : {“columns”:[“Date”,”Value”,”Notes”],”column_values”:[[“2003-01-31″,”217.0″,”2.0”],[“2002-12-31″,”217.0″,”2.0”],[“2002-11-30″,”0.0″,”3.0”],[“2002-10-31″,”0.0″,”3.0”]]} |
We use json response to indicate when errors occur.
Without api_key parameter:
Data API url | https://ai.catenacap.xyz/?page_id=7946&JODI/OIL_KERIKB_LAJ |
---|---|
Error | {“api_key_error”:”API Key parameter is missing.”} |
Invalid api_key parameter:
Data API url | https://ai.catenacap.xyz/?page_id=7946&JODI/OIL_KERIKB_LAJ&api_key= OR https://ai.catenacap.xyz/?page_id=7946&api_key=abcdefghijklmnopqrstuvwxyz123456_1234567890 |
---|---|
Error | {“api_key_error”:”We could not recognize your API key. Please check your API key and try again.”} |
When data not found:
Error | {“data_error”:”No data found in this dataset.”} |
---|
Invalid start date format:
Data API url | https://ai.catenacap.xyz/?page_id=7946&JODI/OIL_KERIKB_LAJ&api_key=YOURAPIKEY&format=json&start_date=10-31&end_date=2003-01-31 |
---|---|
Error | {“invalid_start_date”:”You provided 10-31 for start_date. This is not a recognized date format. Please provide yyyy-mm-dd”} |
Invalid end date format:
Data API url | https://ai.catenacap.xyz/?page_id=7946&JODI/OIL_KERIKB_LAJ&api_key=YOURAPIKEY&format=json&start_date=2002-10-31&end_date=01-31 |
---|---|
Error | {“invalid_end_date”:”You provided 01-31 for end_date. This is not a recognized date format. Please provide yyyy-mm-dd”} |
When start date exceed end date:
Data API url | https://ai.catenacap.xyz/?page_id=7946&JODI/OIL_KERIKB_LAJ&api_key=YOURAPIKEY&format=json&start_date=2005-10-31&end_date=2003-01-31 |
---|---|
Error | {“start_date”:”start_date should not exceed end_date”} |