Not logged in - Login
< back

REST API v1.0 - Function: Delete, Pause, Resume

ThisREST API is the REST API, the kernel of all our libraries.

In this version, there are 4 functions:

  • Create
  • Delete: Delete task(s) and all their information.
  • Pause: Pause task(s) and cancel future calls.
  • Resume: Resume paused task(s) to the normal cycles.

Here we want to explain last 3 functions, because you can call them in a similar way.


Parameters

All this three functions only accept tags_* as a query(API Key/Secret is required, Of course). You can add multiple tags, or at least you need to enter 1 tag to make it clear what you want to Delete, Pause or Resume.

Adding more tags is equal to AND operator. So If you define two or more tags on a query, It will only do action on which tasks that they have all this tags together.

Example: [api]/v1/tasks/delete?key=APIKEY&secret=APISECRET&tag_type=test This will delete all our test tasks which onestagged type=test

Example: [api]/v1/tasks/delete?key=APIKEY&secret=APISECRET&tag_type=test&tag_a=b This will delete all our test tasks which ones have this two tags type=test AND a=b


Delete

This will cause permanent remove of your chosen tasks by tag. All history, future calls and task details will be removed.

https://api.atrigger.com/v1/tasks/delete?
    key=APIKEY             //required
    &secret=APISECRET      //required
    &tag_key1=value2       //required
    &tag_key2=value2       //optional
    &tag_*=*               //optional


Sample Output / Result: { "type": "OK", "message": "18 tasks deleted." }

Example Request: https://api.atrigger.com/v1/tasks/delete?key=APIKEY&secret=APISECRET&tag_type=testing


Pause

Pause will suspend selected tasks. They will be not called again if you don't Resume them.

https://api.atrigger.com/v1/tasks/pause?
    key=APIKEY             //required
    &secret=APISECRET      //required
    &tag_key1=value2       //required
    &tag_key2=value2       //optional
    &tag_*=*               //optional


Sample Output / Result: { "type": "OK", "message": "1 tasks paused." }

Example Request: https://api.atrigger.com/v1/tasks/pause?key=APIKEY&secret=APISECRET&tag_type=testing


Resume

Resume will restore selected paused tasks.

https://api.atrigger.com/v1/tasks/pause?
    key=APIKEY             //required
    &secret=APISECRET      //required
    &tag_key1=value2       //required
    &tag_key2=value2       //optional
    &tag_*=*               //optional

By resuming a task, It will set the next call at the nearest possible time based on timeSlice.
For example look at this scenario:

  1. 1/1/2019: Create Task with timeSlice=1month, so the next call should be: 2/1/2019
  2. 1/15/2019: Pause Task
  3. 1/21/2019: Resume Task
  • NEXT CALL WILL BE: 2/1/2019 (not changed)
  1. 1/22/2019: Pause Task
  2. 2/2/2019: Resume Task
  • NEXT CALL WILL BE: 3/1/2019 (task was paused at 2/1/2019, so this call is ignored)


Sample Output / Result: { "type": "OK", "message": "1 tasks resumed." }

Example Request: https://api.atrigger.com/v1/tasks/resume?key=APIKEY&secret=APISECRET&tag_type=testing