Get all projects
getapi.bunnystudio.com/projects
This endpoint returns all the projects of the authenticated user with pagination and some search filters.
Requirements
Authentication
Scope
Query parameters
page
<optional> number
Page that you want to retrieve from the paginated list. The default value is 1.
Page that you want to retrieve from the paginated list. The default value is 1.
pageSize
<optional> number
Page size you want the pagination to have. The default value is 20.
Page size you want the pagination to have. The default value is 20.
titleQuery
<optional> string
Title of the project you want to filter. The default value is empty.
Title of the project you want to filter. The default value is empty.
category
<optional> string
Category of the projects you want to filter. The default value is empty.
Category of the projects you want to filter. The default value is empty.
Request example
- Console
- JavaScript
- Python
- PHP - CURL
curl --request GET \
--url https://api.bunnystudio.com/projects?page=1&pageSize=20&titleQuery=Testing&category=voice_over \
--header "Content-Type: application/json" \
--header "x-access-token: YOUR_TOKEN" \
const queryParams = new URLSearchParams({
page: 1,
pageSize: 20,
titleQuery: "Testing",
category: "voice_over",
});
const url = 'https://api.bunnystudio.com/projects + queryString.toString()';
const options = {
method: 'GET',
headers: {
'content-type': 'application/json',
'x-access-token': 'YOUR_TOKEN',
}
};
fetch(url, options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import requests
import json
api_url = "https://api.bunnystudio.com/projects?page=1&pageSize=20&titleQuery=Testing&category=voice_over"
headers = {
"Content-Type": "application/json; charset=utf-8",
'x-access-token': 'YOUR_TOKEN',
}
response = requests.get(api_url, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.bunnystudio.com/projects?page=1&pageSize=20&titleQuery=Testing&category=voice_over',
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'content-type': 'application/json',
'x-access-token': 'YOUR_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response format
page
number
Number of the requested page.
Number of the requested page.
total
number
Total number of projects created by the authenticated user.
Total number of projects created by the authenticated user.
projects
array
Array of projects that the authenticated user has created and match the filter criteria.
Array of projects that the authenticated user has created and match the filter criteria.
Response example
{
"page": 1,
"total": XXX,
"projects": [LIST_OF_PROJECTS],
}
Error responses
500 Not projects info
{
status: 500,
type: 'NOT_PROJECTS_INFO',
message: 'There was an error getting all the projects, please talk with our support team',
}
403 Forbidden
{
status: 403,
type: 'FORBIDDEN',
message: 'You do not have permission to do this action',
}