List Push Tasks
List Push Tasks
GET
https://api.ocamba.com/v0/hood/push-tasks
Retrieve a paginated list of Push Tasks with filtering, sorting, and search capabilities.Query parameters
parametersResponse schemas
›
200
application/json
›
400
application/json
›
500
application/json
curl -X GET \
"https://api.ocamba.com/v0/hood/push-tasks" \
-H "Authorization: Bearer {TOKEN}"
const url = 'https://api.ocamba.com/v0/hood/push-tasks';
const options = {
method: 'GET',
headers: {
Authorization: `Bearer {TOKEN}`
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v0/hood/push-tasks");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Responses
200 OK
{
"total": "75",
"items": [
{
"id": "13542713",
"name": "Example",
"status": "2",
"start_time": "2021-11-23 13:37:16",
"end_time": null,
"frequency": null,
"cron": null,
"ttl": "3600",
"user_time_zone": "0",
"quiet_time": null,
"next_execution_time": null,
"last_execution_time": "2021-11-23 13:37:20",
"total_user": "0",
"create_time": "2021-11-23 13:37:16",
"targeting": {
"apps": {
"op": "include",
"items": [
"1122334455"
]
}
},
"message": {
"title": {
"en": "This is my title"
},
"body": {
"en": "This is my body"
},
"image": {
"en": "https://example.com"
},
"icon": null,
"landing_url": "https://example.com",
"tag": null,
"require_interaction": "0",
"renotify": "0",
"silent": "0",
"vibration": null,
"badge": null,
"actions": [
{
"action": null,
"title": {
"en": "Yes"
},
"icon": "https://example.com",
"url": "https://example.com"
},
{
"action": null,
"title": {
"en": "No"
},
"icon": "https://example.com",
"url": null
}
]
},
"adex": null,
"custom_data": null,
"creator_id": "1000000",
"creator_name": "John Doe",
"creator_image": null
}
]
}
400 Bad Request
500 Internal Server Error
Responses
Tip
Searchable field is name.
Sortable fields are: next_execution_time, last_execution_time, create_time, start_time, name, total_user, status.
Filterable fields are: id, name, status, start_time, end_time and create_time.
Note
Set
backup=true to retrieve archived Push Tasks.