Fetch Records API
Fetch all the Records in a particular Project
Root
Route
Request Type
Request Headers
Below are the list of Accepted Request Headers if you are trying to Fetch your Records.
Request Header | Value | Required |
---|---|---|
X-Master-Key | <API_KEY> | Yes |
Content-Type | application/json | Yes |
X-Master-Key Required
You will need this Key to access mostly any API end-point on TTSKit. You could find the key on the API Key page.
Content-Type Required
Set the Content-Type header to application/json. This needs to be passed with every request you make on the TTSKit. Failing to pass this in the Header will result in an error.
Request Query Parameters
Query Parameter | Value | Required |
---|---|---|
projectId | <Project Id> | Yes |
last_id | <Last Record Id> | No |
limit | <NUMBER> | No |
projectId Required
ID of the project whose records you want to retrieve.
last_id Optional
To Fetch the rest of the Records, pass the Last Record Id you've fetched from the previous GET. If this field is not included or the value is 0, it means that Fetch the First <LIMIT> Records
limit Optional
Limit the number of Records returned per request. Default value is 20, maximum value is 100.
Code Samples
- cURL
- Java
- JavaScript (ES6)
- Python 3
- Ruby
Request Response
Success Status Code: 200
Error Status Code: 400, 401, 402, 403
For more information on the error codes & errors you might possibly encounter, refer to the below section.
Error Reference
- 400 Bad Request
- 401 UnAuthorized
- 402 Payment Required
- 404 Not Found
Invalid Route
To solve this issue, simply provide the correct Route.
You need to pass Content-Type set to application/json
You'll encounter this error if you are not passing the Content-Type header. Hence, pass the Content-Type header with a value of application/json.
You need to pass X-Master-Key in the header
You'll encounter this error if you are not passing the X-Master-Key header which is required to authenticate your request. In-order to fix this, pass the X-Master-Key header with a value of the API Key which you can find on the API Keys page.
The last_id is not belong to you.
Use the Last Record Id you've fetched from the previous GET.
Currently, The API is only supported for premium users. Upgrade to Premium plan https://ttskit.com/pricing to use these features
You need to upgrade your account to the Premium Plan to use these features.
Project not found.
Check if the projectId is valid and belongs to your account.