Requests

A Request represents the intent of creating or changing an object in the system.

For example, when you create a transaction, a Create transaction request is created.

You can observe all the changes in the system via GET /requests. Every request has a target_type and target_id that you can use to fetch the object targeted by this request.

For example, you can list all requests waiting for approval:

GET /requests?status=PENDING_APPROVAL
{
  "edges": [
    {
      "cursor": 0,
      "node": {
        "created_by": 5,
        "created_on": "2020-09-25T13:52:38.377654+00:00",
        "expires_at": "2020-10-02T13:52:38.377605+00:00",
        "id": 20,
        "status": "PENDING_APPROVAL",
        "target_id": 13,
        "target_type": "USER",
        "type": "REVOKE_USER"
      }
    },
    {
      "cursor": 1,
      "node": {
        "created_by": 11,
        "created_on": "2020-09-25T13:52:53.421567+00:00",
        "expires_at": "2020-10-02T13:52:53.421502+00:00",
        "id": 21,
        "status": "PENDING_APPROVAL",
        "target_id": 3681,
        "target_type": "TRANSACTION",
        "type": "CREATE_TRANSACTION"
      }
    }
  ],
  "page_info": {
    "count": 2,
    "has_next_page": false
  }
}

Here we have 2 requests waiting for approval. You can have more info on those 2 objects via

GET /users/13
GET /transactions/3681