Request information
Request content
Retrieve content from a specific request by querying the GET request by Id endpoint:
curl --request GET \
--url https://api.vault.ledger.com/requests/{{request_id}} \
--header 'authorization: Bearer {{access_token}}' \
--header 'content-type: application/json' \
--header 'x-ledger-workspace: minivault'{
"created_by": 24,
"created_on": "2024-01-24T08:07:08.007892+00:00",
"expires_at": "2024-01-31T08:07:08.007837+00:00",
"id": 29,
"status": "PENDING_APPROVAL",
"target_id": 305,
"target_type": "TRANSACTION",
"type": "CREATE_TRANSACTION"
}Target ID
The attribute target_id of a request in our example of type CREATE_TRANSACTION provides the id of the transaction.
You can search for requests by type, such as CREATE_TRANSACTION, or by status, like PENDING_APPROVAL, to obtain a list of requests awaiting operator approval.
curl --location 'https://blue-badger-433.minivault.ledger-sbx.com/api-gateway/requests?status=PENDING_APPROVAL&type=CREATE_TRANSACTION' \
--header 'X-Ledger-Workspace: minivault' \
--header 'authorization: Bearer {{access_token}}'{
"edges": [
{
"cursor": 0,
"node": {
"created_by": 24,
"created_on": "2024-01-24T08:07:08.007892+00:00",
"expires_at": "2024-01-31T08:07:08.007837+00:00",
"id": 29,
"status": "PENDING_APPROVAL",
"target_id": 305,
"target_type": "TRANSACTION",
"type": "CREATE_TRANSACTION"
}
}
],
"page_info": {
"count": 1,
"has_next_page": false
}
}See who already approved a request
To get the number of request approvers, call the following endpoint:
curl --request GET \
--url https://api.vault.ledger.com/requests/{{request_id}}/governance-status \
--header 'authorization: Bearer {{access_token}}' \
--header 'content-type: application/json' \
--header 'x-ledger-workspace: minivault'{
"governance_steps": [
{
"approvals": [
{
"created_on": "2024-01-25T13:17:27.083210+00:00",
"type": "APPROVE",
"user": {
"id": null
}
}
],
"approvers": [
{
"id": null
},
{
"id": 27
},
{
"id": null
},
{
"id": null
},
{
"id": null
}
],
"group": {
"id": 11
},
"quorum": 1,
"step_index": 0
}
],
"is_complete": true,
"request": {
"created_by": {
"id": null
},
"created_on": "2024-01-25T13:15:10.322027+00:00",
"current_step_index": 1,
"expired_at": "2024-02-01T13:15:10.321913+00:00",
"id": 62,
"status": "SUBMITTED",
"target_id": 435,
"target_type": "ETHEREUM_LIKE_TRANSACTION",
"type": "CREATE_TRANSACTION"
}
}In the JSON data, request ID 62 is completely approved ("is_complete": true). It includes one approval from an operator whose identity is anonymized from my view. The approvers array shows that there were 4 potential approvers for this request, all members of group 11. With a "quorum": 1 and "step_index": 0, we understand that only one approval was needed from all group members for submission.
Last updated