List Projects API
The API allows you to list all your projects
Root
xxxxxxxxxx
https://api.ttskit.com/v1
Route
xxxxxxxxxx
/projects
Request Type
xxxxxxxxxx
GET
Request Headers
Below are the list of Accepted Request Headers if you are trying to List Your Projects.
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 |
---|---|---|
last_id | <Last Project Id> | No |
limit | <NUMBER> | No |
last_id Optional
To Fetch the rest of the Projects, pass the Last Project 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> Projects
limit Optional
Limit the number of Projects returned per request. Default value is 20, maximum value is 100.
Code Samples
- cURL
- Java
- JavaScript (ES6)
- Python 3
- Ruby
xxxxxxxxxx
curl -v\
-H "Content-Type: application/json" \
-H "X-Master-key: <YOUR_API_KEY>" \
--request GET \
https://api.ttskit.com/v1/projects
CloseableHttpResponse response = httpClient.execute(get)) {
req.open("GET", "https://api.ttskit.com/v1/projects", true);
req = requests.get(url, json=None, headers=headers)
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
Request Response
Success Status Code: 200
xxxxxxxxxx
{
"code": 200,
"message": "Success.",
"status": "success",
"projects": [
{
"id": 99,
"name": "Project Name",
"desc": "Project Description",
},
],
"total": 99
}
Error Status Code: 400, 401, 402, 403
xxxxxxxxxx
{
"code": 400,
"message": "<Error Message>",
"subMessage": "<Error Message Detail>",
"status": "error"
}
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
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 Project 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.