View Tasks targeting a container
https://api.ocamba.com/v1/hood/containers/{id}/tasks
https://api.ocamba.com/v1/hood/containers/{id}/tasks
Retrieves the details of Scheduled Tasks that explicitely or implicitely through groups, accounts and containers fragment targeting a specific container.
Name
Descriptionidstringrequired
Unique Container identifier.Example: 12345
Name
Descriptionsortstring
Sorts the response by specified field(s) with the option to specify sorting order (ascending by default, add prefix "-" for descending).Examples:
GET /VERSION/hood/RESOURCE_NAME?sort=name → sorts per name, ascending
GET /VERSION/hood/RESOURCE_NAME?sort=-id → sorts per id descending
GET /VERSION/hood/RESOURCE_NAME?sort=id,-name → sorts per id ascending, then name descending
See tips for the list of sortable fields.
Example: sort=-field1,field2
fieldsstring
Fields parameter represents array of dimensions and measures. Dimensions are used to categorize, segment, and reveal the details of the data. Measures contain numeric, quantitative values that can be measured. At least one measure is required.Example: fields=field1,field2,field3
pagestring
The page number indicates which set of items will be returned in the response. The format of request is "page=N,M" where 'N' (required) represents page number and 'M' (optional) is number of items per page.Examples:
N=1, M=20 → returns page 1 with 20 items
N=2, M=20 → returns page 2 with 20 items (items 21-40)
N=3 → returns page 3. The number of objects returned depends on the resource settings.
Example: page=1,10
viewstring
Hood API returns full representation of the resource using the "view=full" query parameter. If not specified, the default view will be used.Note that the "fields" parameter has precedence over the "view" parameter.
Example: view=full/default
qstring
Set the q parameter value to search for a keyword or search term.Example:
GET /VERSION/hood/RESOURCE_NAME?q=sou → returns a certain resource that contain string 'sou'
See tips for the list of searchable parameters.
q_fieldsstring
Use the q_fields parameter to list all fields you want to include in the search using q parameter. Note that not all fields are searchable on a specific object. If parameter q_fields is not specified, search is performed on a default search field.Examples:
GET /VERSION/hood/RESOURCE_NAME?q=sou&q_fields=lname → API retuns a certain resource whose lname contains string 'sou'.
GET /VERSION/hood/RESOURCE_NAME?q=sou&q_fields=fname,lname,email → API returns a certain resource that contain string 'sou' in any of the specified fields.
See tips for the list of searchable parameters.
statusstring
Describe status of the object.Example: status=status1
explicitstring
Determines if the endpoint will return only the tasks that are explicitely targeting a specific container in a container fragment. Shows tasks that have both operations exclude/include.Example: true
200 - OK
Name
Descriptionitems[ push-tasks ]
An array of all scheduled tasks items targeting a specific container.Push Tasks
Name
Descriptionadexpush-task-adex
Adex object.Adex
Name
Descriptionaccount_idarray
Array of account ids created on Ocamba platform.Example: 123456,654321
campaign_idarray
Array of campaign ids created on Ocamba platform.Example: 1367890,1098763
default_campaign_idinteger
Campaign id created on Ocamba platform.Example: 1036975
group_idarray
Array of group ids created on Ocamba platform.Example: 113,22,374
number_of_messagesinteger
Minimal value is 1, maximal value is 10.Example: 4
Default: 1
repeat_on_clickinteger
Repeats action on clickExample: 1
Possible values: 0 | 1
zone_idinteger
Push zone id created on Ocamba platform.Example: 1000321
create_timedateTime
Timezone: GMT. Describes the create time of the push task.Example: 2021-12-20 17:14:56
cronstring
Cron expression containing 5 fields, separated by a single whitespace, that represents a set of times as a schedule to execute task. The first field in cron expression (minute) must be set to a single value, multi values and special characters are not allowed. The same applies to the second field (hours) if task is optimized by user timezone. For any other appliance the cron expressions are valid. The other three fields respresent the day, the month, and the day of a week.Example: 0 0 * * *
custom_datastring
Maximal length is 4000. Key-Value pairs.end_timedateTime
Timezone: GMT. Describes the ending time of the push task.Example: 2021-12-28 11:00:00
frequencyinteger
Time when task will be repeated, exposed in seconds. Minimum value is 3600, maximum value is 94608000, must be a number divisible by 60.Example: 3600
idinteger
A unique identifier generated by the Ocamba platform.Example: 1057
last_execution_timedateTime
Timezone: GMT. Describes the time the push task was executed the last time.Example: 2021-12-31 00:00:00
messagepush-task-message
Message object.Message
Name
Descriptionactionspush-task-actions
An array of action objects.Action
Name
Descriptionactionstring
This field is deprecated, you should pass null as value and the field will be omitted.Example: null
iconstring
Visual attribute presented to the user. Must be a valid url.Example: https://www.iconexample.com
titleobject
The main textual aspect as pairs of keys and values, where key represents language and value title in that language.Example: { "en": "en_title" "de": "de_title" }
urlstring
The landing url of the action.Example: https://www.urlexample.com
badgestring
Monochromatic mini-icon which portrays to user source where he subscribed in the first place.Example: https://www.badgeexample.com
bodyobject
Key value pairs {key:value}.Name
Descriptionkeystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).Example: en
valuestring
Maximum 200 characters.Example: Hello world
iconstring
Secondary visual attribute presented to the user. Must be a valid url.Example: https://www.iconexample.com
imageobject
Key value pairs {key:value}.Name
Descriptionkeystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).Example: en
valuestring
Maximum 200 characters.Example: https://www.exampleimage.com/
landing_urlstring
The url of the site the user is redirected to when clicking on the notification.Example: https://www.landingurl.com/
renotifystring
Replacing old notification with the new one using the silent method. Applicable only with tag option.Example: 0
require_interactionstring
Demand action execution from the user. Applicable only for desktop users. Acts like a boolean.Example: 1
Possible values: 0 | 1
silentstring
Serving notification without sound and vibration. Applicable only to mobile devices.Example: 0
tagstring
This option enables the removal of notifications with the same tag which were delivered earlier.Example: tag
titleobject
Key value pairs {key:value}.Name
Descriptionkeystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).Example: en
valuestring
Maximum 200 characters.Example: Title example
vibrationstring
Two vibration pulses with customizable length and pause between them, described in milliseconds (200,100,200 formats), will start when a notification is displayed. Applicable only for Android users.Example: 100,100
namestring
Task name, maximum length 60 characters.Example: Example task name
next_execution_timedateTime
Timezone: GMT.Example: 2022-01-01 00:00:00
quiet_timepush-task-quiet-time
Quiet time object.Quiet Time
Name
Descriptionfromnumber (integer)
An integer between 0 and 23 including those numbers. Describes the starting of quiet time.Example: 2
tonumber (integer)
An integer between 0 and 23 including those numbers. Describes the ending of quiet time.Example: 12
start_timedateTime
Timezone: GMT. Describes the starting time of the push task. In case you want the task to be executed right away, you should pass the value 'immediately'.Example: 2021-12-28 09:16:33
statusinteger
Task status, accepted values are 0 (inactive), 1 (active), 2 (finished).Possible values: 0 | 1 | 2
targetingpush-task-targeting
Targeting object.Push Task Targeting
Name
Descriptionaccountsobject
Name
Descriptionitems[ string ]
List of account ids with unique items and minimum length of 1.opstring
Operator.Example: include
Possible values: include | exclude
application_groupsobject
Name
Descriptionitems[ string ]
Array of application group ids created on Ocamba platform.opstring
Operator.Example: include
Possible values: include | exclude
applicationsobject
Name
Descriptionitems[ string ]
List of applications with unique items and minimum length of 1. Every item should be valid full qualified domain name and can contain star (*).opstring
Operator.Example: eq
Possible values: include | exclude
appsobject
Name
Descriptionitems[ string ]
Array of container id's located on the Hood app.opstring
Operator.Example: include
Possible values: include | exclude
browsersobject
Name
Descriptionitems[ string ]
Array of browser ids supported by Ocamba.opstring
Operator.Example: include
Possible values: include | exclude
countriesobject
Name
Descriptionitems[ string ]
Array of country codes supported by Ocamba (ISO 3166-1, 2 letter country codes).opstring
Operator.Example: include
Possible values: include | exclude
groupsobject
Name
Descriptionitems[ string ]
Array of hood tag group ids created on Ocamba platform.opstring
Operator.Example: include
Possible values: include | exclude
languagesobject
Name
Descriptionitems[ string ]
Array of language codes supported by Ocamba (ISO 639-2, 2 letter language codes).opstring
Operator.Example: include
Possible values: include | exclude
osobject
Name
Descriptionitems[ string ]
Array of os ids supported by Ocamba.opstring
Operator.Example: include
Possible values: include | exclude
regionsobject
Name
Descriptionitems[ string ]
Array of region id's located on the Ocamba platform.opstring
Operator.Example: include
Possible values: include | exclude
remote_usersobject
Name
Descriptionitems[ string ]
Array of remote user id's.opstring
Operator.Example: include
Possible values: include | exclude
segmentsobject
Name
Descriptionitems[ string ]
Array of segment id's located on the Hood app.opstring
Operator.Example: include
Possible values: include | exclude
subscribed_ageobject
Name
Descriptionfrominteger
Minimal value is 0, maximal 3500.tointeger
Minimal value is 1, maximal 3500.user_dataobject
Key value pairs {key:value}.Name
Descriptionkeystring
Key can be any string which represents user specific data.Example: clicker
valueobject
Name
Descriptionitemsarray
Array of values, maximum 10 items.opstring
Accepted values are include and exclude, default is include.Possible values: include | exclude
usersobject
Name
Descriptionitems[ string ]
Array of user id's.opstring
Operator.Example: include
Possible values: include | exclude
ttlinteger
The lifetime of the messaage. Minimum value is 0, maximum value is 2419200.Example: 2400
Default: 3600
user_time_zoneinteger
Optimized to work according to the user's time zone.Example: 1
Possible values: 0 | 1
totalinteger
A total number of items.Example: 1
400 - Bad Request
Name
Descriptioncodeinteger
Http response status code.Example: 400
messagestring
The human readable message that describes how to deal with error.Example: Unknown container id.
titlestring
The error title.Example: Bad Request.
trace_idstring
Error trace id.Example: 99a84211-f73d-4ff8-acdf-eb3e06bb9d62
500 - Internal Server Error
Name
Descriptioncodeinteger
Http response status code.Example: 500
messagestring
The human readable message that describes how to deal with error.Example: Internal server error.
titlestring
The error title.Example: Internal server error.
note
1 If executed without the 'explicit' query parameter, it will show all the tasks implicitely targeting a specific container.
2 The endpoint will return all the tasks regardless of status by default. If you wish to see only active tasks, filter by status.
tip
1 Searchable field is name.
2 Sortable fields are: next_execution_time, last_execution_time, create_time, start_time, name, total_user, status.