A Queued Action represents a command to send a project or session to a mobile device.

Queued Actions are represented as a data record with the following keys:

  • id - a unique identifier for the queued action in the system.
  • project_id - the database id of the project relating to this queued action
  • device_id - the database id of the device to receive the project or session
  • device_unit_id - the unit id of the device to receive the project or session
  • action - which action, one of “update project” or “send session”
  • status - a string representing the status of the action, one of: “pending”, “succeeded”, “failed”, “in progress”
  • session_uuid (optional) - the uuid of the session to be sent. Only used for “send session” actions.
  • queued_timestamp - a unix timestamp of when the queued action was created.
  • executed_timestamp - a unix timestamp of when the queued action was executed (transitioned from pending to succeeded or failed)

Example JSON object:

{
    "id": 123
    "project_id": 1234,
    "device_id": 2345,
    "device_unit_id": "iphone_1",
    "action": "update project",
    "status": "pending",
    "queued_timestamp": 123456789,
    "executed_timestamp": 123456789
}

Filtering results.

The index (get list) method can apply a filter to the database and return the queued actions that match the specified filter.

The following filters can be applied in the query string:

  • skip: Skip a number of results in the get session list method.
  • limit: Return only this many results in the get session list method. Defaults to 100.
  • filter[project_id]: return only queued actions for the specified project.
  • filter[device_id]: return only queued actions for the specified device. This number is the device ID which can be obtained from the devices list.
  • filter[action]: return only queued actions for the action. Valid values are “update project” and “send session”.
  • filter[status]: return only queued actions with the specific status. Valid values are “pending”, “succeeded”, “failed”, “in progress”

GET /api/v1/queued_actions
Return a list of queued actions for a device

Refer to the documentation above for more details on filtering the results.


POST /api/v1/queued_actions/raw_sessions_results
Updates action status for batch of session results


POST /api/v1/queued_actions/:id/success
Sets action status to completed successfully.


POST /api/v1/queued_actions/:id/fail
Sets action status to failed.


GET /api/v1/queued_actions/:id/raw_project
Retrieves the project for a queued action


GET /api/v1/queued_actions/:id/raw_session
Retrieves the session for a queued action


POST /api/v1/queued_actions/raw_sessions
Retrieves a batch of sessions for an array of queued actions