Fetch tasks of an alert

GET /accounts/{account_id}/alerts/{alert_id}/tasks

It is possible to create mention tasks, that is, create assignments on a mention to other members of your team.

This method is a way to fetch all tasks of the mentions on an alert, so that you can see all open tasks on that alert for instance.

Parameters

  • account_id (string) - Id of the account
  • alert_id (number) - Id of the alert

Page content


Minimal curl example

curl -ig 'https://api.mention.net/api/accounts/{account_id}/alerts/{alert_id}/tasks' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Accept-Version: 1.15'

Available properties

as Query string!

there are query string parameters that enable you to filter your mentions. They are all optional.

Attribute _ Definition Example
since_id optional get tasks after given id 4321
before_id optional get tasks before given id 4444
limit optional limits the number of tasks returned per call 2
assigned_to optional account_id to select only tasks of that account 12345_llezjrazoiuroaurlezlaz1LJ238okljqre
done optional filter by status of the task 1

Since id

since_id

Pulling for new tasks should be done using the since_id parameter

Before id

before_id

Retrieving older tasks should be done using the before_id parameter.

Limit

limit

Number indicating the maximum results to be fetched by page.

Assigned to

assigned_to

account_id indicating that you want to fetch only tasks assigned to that account.

Done

done

Binomial value 0 or 1, respectively indicating that you want to fetch tasks not completed or completed. If you do not want to filter by the done attribute of the task, just forget this query string parameter.


Request example

  • Headers
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept-Version: 1.15
  • Body

None


Response example

  • Body
{
    "tasks": [
        {...augmented_task...},
        {...augmented_task...},
        ...
    ],
    "_links": {
        "more": {
            "href": "\/api\/accounts\/12345_llezjrazoiuroaurlezlaz1LJ238okljqre\/alerts\/112233\/tasks?limit=2&before_id=140548",
            "params": {
                "limit": 2,
                "before_id": "140548"
            }
        },
        "pull": {
            "href": "\/api\/accounts\/12345_llezjrazoiuroaurlezlaz1LJ238okljqre\/alerts\/112233\/alerts\/4077\/tasks?limit=2&since_id=140676",
            "params": {
                "limit": 2,
                "since_id": "140676"
            }
        }
    }
}

More

more

Json object that contains an "href" attribute, which is an url that enables you to fetch tasks older than the oldest task of the page.

Pull

pull

It contains an "href" url that enables you to update tasks with the latest tasks added.

Task

{...augmented_task...}

This is a task json object with the same model as if you had fetched it with a GET request. However, to that model, there is an attribute mention added, which contains the mention on which that task was created. The content of that mention is the same as if you had done a GET request on that mention.

That's why it is designed above as "augmented_task".

{
    "id": ...,
    "assigned_to_account": ...,
    ...,
    "mention": { ...mention...},
}

results matching ""

    No results matching ""