Approvals
Endpoints for working with approval processes and requests
GET /approvals/processes
Get a list of approval processes. Response includes any
Query Parameters
- order — Optional — enum
-
Return the approval processes in ascending or descending order by approval_processid. Defaults to ASC.
Possible Values:
- ASC
- DESC
- offset — Optional — integer
-
The number of approval processes to skip from the beginning. Defaults to 0.
- limit — Optional — integer
-
The maximum number of approval processes to include in the response. Range: [1, 200]. Defaults to 20.
Response
Status: 200 OK
[ { "approval_processid": 1, "name": "My Approval Process", "allow_repeated_signatures": true, "status": "enabled", "stages": [ { "approval_process_stageid": 2, "team": { "teamid": 1, "image": null, "name": "Team A", "description": "An example team", "owner": 3, "location": null, "latitude": null, "longitude": null, "reputation": 215, "member_count": 2, "new_member_since": 1608075042 }, "num_required": 2, "is_satisfiable": true }, { "approval_process_stageid": 3, "user": { "userid": 6, "username": "User Name", "unique_username": "username", "join_date": 1611096985, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01", "mini": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.mini", "thumbnail": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.thumbnail", "140x105": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.140x105", "200x150": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.200x150", "standard": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.standard", "440x330": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.440x330", "medium": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.medium", "large": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.large" }, "reputation": 1, "url": "https:\/\/mysite.dozuki.com\/User\/6\/username", "teams": [], "privileges": [ "Admin" ] }, "is_satisfiable": true } ], "is_satisfiable": true, "is_default": false, "num_guides": 0, "num_requests": 0 } ]
GET /approvals/process/search/{search_phrase}
Search for approval processes by name.
Route Parameters
- search_phrase — Required — string
-
The phrase to search approval process names by. Processes will match if the phrase matches any part of the name.
Query Parameters
- offset — Optional — integer
-
The number of approval processes to skip from the beginning. Defaults to 0.
- limit — Optional — integer
-
The maximum number of approval processes to include in the response. Range: [1, 200]. Defaults to 20.
Response
Status: 200 OK
{ "limit": 20, "offset": 0, "totalResults": 1, "moreResults": false, "search": "my", "results": [ { "approval_processid": 1, "name": "My Approval Process", "allow_repeated_signatures": true, "status": "enabled", "stages": [ { "approval_process_stageid": 2, "team": { "teamid": 1, "image": null, "name": "Team A", "description": "An example team", "owner": 3, "location": null, "latitude": null, "longitude": null, "reputation": 215, "member_count": 2, "new_member_since": 1608075042 }, "num_required": 2, "is_satisfiable": true }, { "approval_process_stageid": 3, "user": { "userid": 6, "username": "User Name", "unique_username": "username", "join_date": 1611096985, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01", "mini": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.mini", "thumbnail": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.thumbnail", "140x105": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.140x105", "200x150": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.200x150", "standard": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.standard", "440x330": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.440x330", "medium": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.medium", "large": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.large" }, "reputation": 1, "url": "https:\/\/mysite.dozuki.com\/User\/6\/username", "teams": [], "privileges": [ "Admin" ] }, "is_satisfiable": true } ], "is_satisfiable": true, "is_default": false, "num_guides": 0, "num_requests": 0 } ] }
GET /approvals/process/{approval_processid}
Get details for an approval process including any pending approval requests for the process.
Route Parameters
- approval_processid — Required — integer
-
Identifier for the approval process.
Response
Status: 200 Ok
{ "approval_processid": 1, "name": "My Approval Process", "allow_repeated_signatures": true, "status": "enabled", "is_satisfiable": true, "is_default": false, "webhooks_enabled": true, "stages": [ { "approval_process_stageid": 2, "team": { "teamid": 1, "image": null, "name": "Team A", "description": "An example team", "owner": 3, "reputation": 215, "member_count": 2, "new_member_since": 1608075042 }, "num_required": 2, "is_satisfiable": true }, { "approval_process_stageid": 3, "user": { "userid": 6, "username": "User Name", "unique_username": "username", "join_date": 1611096985, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01", "mini": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.mini", "thumbnail": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.thumbnail", "140x105": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.140x105", "200x150": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.200x150", "standard": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.standard", "440x330": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.440x330", "medium": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.medium", "large": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.large" }, "reputation": 1, "url": "https:\/\/mysite.dozuki.com\/User\/6\/username", "teams": [], "privileges": [ "Admin" ] }, "is_satisfiable": true } ], "guides": [ { "guideid": 1, "langid": "en" } ], "requests": [ { "approval_requestid": 2424, "release": { "releaseid": 11208, "guideid": 20877, "langid": "en", "revisionid": 48921, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "removed", "title": "Release Title", "init_date": 1597270790, "release_date": 1597270790, "notes": "", "type": "major", "href": "\/Guide\/Guide_Name\/20877?release=11208", "version": null }, "guide": { "guideid": 20877, "title": "Guide Name", "langid": "en", "img_src": "https:\/\/someurl.example.com" }, "process": { "approval_processid": 62, "name": "Approval Process Name", "allow_repeated_signatures": false, "status": "enabled", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "is_satisfiable": true } ], "is_satisfiable": true, "is_default": false, "num_guides": 0, "num_requests": 0 }, "status": "rejected", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "complete", "signatures": [ { "approval_request_stage_signatureid": 347, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "reject", "sign_date": 1597270790, "notes": "" } ], "approved": false, "rejected": true } ], "init_date": 1597270790, "end_date": 1597270790, "href": "\/User\/approvals\/2424" } ] }
POST /approvals/process
Create a new approval process.
Request Body
- name — Required — string
-
The name of the approval process.
- stages — Required — array of objects
-
The stages of the approval process. Each approval process can have 1 to 10 stages. For each stage a userid or teamid must be set, but not both.
- userid— Optional integer. Use userid if the stage can only be completed by a specific user.
- teamid— Optional integer. Use teamid if the stage can be completed by anyone in the team.
- num_required— Required integer if teamid is set. The number of sign-offs from the team needed to complete the stage.
- allow_repeated_signatures — Optional — boolean
-
Allow users to sign multiple stages of the same approval request. Defaults to false.
- is_default — Optional — boolean
-
When true, the approval process will be automatically set as the default process for new guides. Existing guides will not be affected. Defaults to false.
- webhooks_enabled — Optional — boolean
-
Requires the Webhooks feature. Controls whether Approvals.* webhooks are sent for this approval process. When null, the site default setting is used.
Response
Status: 201 Created
{ "approval_processid": 1, "name": "My Approval Process", "allow_repeated_signatures": true, "status": "enabled", "is_satisfiable": true, "is_default": false, "webhooks_enabled": true, "stages": [ { "approval_process_stageid": 2, "team": { "teamid": 1, "image": null, "name": "Team A", "description": "An example team", "owner": 3, "reputation": 215, "member_count": 2, "new_member_since": 1608075042 }, "num_required": 2, "is_satisfiable": true }, { "approval_process_stageid": 3, "user": { "userid": 6, "username": "User Name", "unique_username": "username", "join_date": 1611096985, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01", "mini": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.mini", "thumbnail": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.thumbnail", "140x105": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.140x105", "200x150": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.200x150", "standard": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.standard", "440x330": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.440x330", "medium": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.medium", "large": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.large" }, "reputation": 1, "url": "https:\/\/mysite.dozuki.com\/User\/6\/username", "teams": [], "privileges": [ "Admin" ] }, "is_satisfiable": true } ], "guides": [ { "guideid": 1, "langid": "en" } ], "requests": [ { "approval_requestid": 2424, "release": { "releaseid": 11208, "guideid": 20877, "langid": "en", "revisionid": 48921, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "removed", "title": "Release Title", "init_date": 1597270790, "release_date": 1597270790, "notes": "", "type": "major", "href": "\/Guide\/Guide_Name\/20877?release=11208", "version": null }, "guide": { "guideid": 20877, "title": "Guide Name", "langid": "en", "img_src": "https:\/\/someurl.example.com" }, "process": { "approval_processid": 62, "name": "Approval Process Name", "allow_repeated_signatures": false, "status": "enabled", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "is_satisfiable": true } ], "is_satisfiable": true, "is_default": false, "num_guides": 0, "num_requests": 0 }, "status": "rejected", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "complete", "signatures": [ { "approval_request_stage_signatureid": 347, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "reject", "sign_date": 1597270790, "notes": "" } ], "approved": false, "rejected": true } ], "init_date": 1597270790, "end_date": 1597270790, "href": "\/User\/approvals\/2424" } ] }
PATCH /approvals/process/{approval_processid}
Edit fields of an approval process. Unspecified fields will not be edited.
Route Parameters
- approval_processid — Required — integer
-
Identifier for the approval process.
Request Body
- name — Optional — string
-
The name of the approval process.
- stages — Optional — array of objects
-
The stages of the approval process. Each approval process can have 1 to 10 stages. For each stage a userid or teamid must be set, but not both. WARNING: When this field is set, the entire list of stages will be replaced by the list sent with the request.
- userid— Optional integer. Use userid if the stage can only be completed by a specific user.
- teamid— Optional integer. Use teamid if the stage can be completed by anyone in the team.
- num_required— Required integer if teamid is set. The number of sign-offs from the team needed to complete the stage.
- status — Optional — enum
-
Enable or disable the approval process.
Possible Values:
- enabled
- disabled
- allow_repeated_signatures — Optional — boolean
-
Allow users to sign multiple stages of the same approval request.
- is_default — Optional — boolean
-
When true, the approval process will automatically be set as the default process for new guides. Existing guides will not be affected. Set to false to remove the process from being the default.
- webhooks_enabled — Optional — boolean
-
Requires the Webhooks feature. Controls whether Approvals.* webhooks are sent for this approval process. When null, the site default setting is used.
Response
Status: 200 OK
{ "approval_processid": 1, "name": "My Approval Process", "allow_repeated_signatures": true, "status": "enabled", "is_satisfiable": true, "is_default": false, "webhooks_enabled": true, "stages": [ { "approval_process_stageid": 2, "team": { "teamid": 1, "image": null, "name": "Team A", "description": "An example team", "owner": 3, "reputation": 215, "member_count": 2, "new_member_since": 1608075042 }, "num_required": 2, "is_satisfiable": true }, { "approval_process_stageid": 3, "user": { "userid": 6, "username": "User Name", "unique_username": "username", "join_date": 1611096985, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01", "mini": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.mini", "thumbnail": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.thumbnail", "140x105": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.140x105", "200x150": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.200x150", "standard": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.standard", "440x330": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.440x330", "medium": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.medium", "large": "https:\/\/www.example.com\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-01.large" }, "reputation": 1, "url": "https:\/\/mysite.dozuki.com\/User\/6\/username", "teams": [], "privileges": [ "Admin" ] }, "is_satisfiable": true } ], "guides": [ { "guideid": 1, "langid": "en" } ], "requests": [ { "approval_requestid": 2424, "release": { "releaseid": 11208, "guideid": 20877, "langid": "en", "revisionid": 48921, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "removed", "title": "Release Title", "init_date": 1597270790, "release_date": 1597270790, "notes": "", "type": "major", "href": "\/Guide\/Guide_Name\/20877?release=11208", "version": null }, "guide": { "guideid": 20877, "title": "Guide Name", "langid": "en", "img_src": "https:\/\/someurl.example.com" }, "process": { "approval_processid": 62, "name": "Approval Process Name", "allow_repeated_signatures": false, "status": "enabled", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "is_satisfiable": true } ], "is_satisfiable": true, "is_default": false, "num_guides": 0, "num_requests": 0 }, "status": "rejected", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "complete", "signatures": [ { "approval_request_stage_signatureid": 347, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "reject", "sign_date": 1597270790, "notes": "" } ], "approved": false, "rejected": true } ], "init_date": 1597270790, "end_date": 1597270790, "href": "\/User\/approvals\/2424" } ] }
PUT /approvals/{wikiid}/{approval_processid}
Assign the default approval process by category. New guides under the specified category will automatically use the approval process. Existing guides will not be affected.
Route Parameters
- wikiid — Required — integer
-
Identifier for the category wiki.
- approval_processid — Required — integer
-
Identifier for the approval process.
Response
Status: 204 No Content
Status: 403 Forbidden
User must have sufficient privileges to assign approval processes to guides.
DELETE /approvals/{wikiid}
Remove the default approval process from a category. New guides under the specified category will no longer automatically use the approval process. Existing guides will not be affected.
Route Parameters
- wikiid — Required — integer
-
Identifier for the category wiki.
Response
Status: 204 No Content
Status: 403 Forbidden
User must have sufficient privileges to assign approval processes to guides.
GET /approvals/requests
Get a list of approval requests. The response body is an array of approval requests. See docs for /approvals/request/{approval_requestid} for the shape of an approval request.
Query Parameters
- order — Optional — enum
-
Return the approval requests in ascending or descending order by approval_requestid. Defaults to DESC.
Possible Values:
- ASC
- DESC
- offset — Optional — integer
-
The number of approval requests to skip from the beginning. Defaults to 0.
- limit — Optional — integer
-
The maximum number of approval requests to include in the response. Range: [1, 25]. Defaults to 20.
- status — Optional — enum
-
Filter approval requests by status.
Possible Values:
- pending
- approved
- rejected
- cancelled
- eligibility — Optional — enum
-
Filter approval requests based on eligibility. Use 'mine' to get requests that you have signed or you are eligible to sign. Use 'eligible' to get unsigned requests that you are eligible to sign. Defaults to 'mine' for non-admins. Defaults to all requests regardless of eligibility for admins.
Possible Values:
- mine
- eligible
- includeDeletedGuides — Optional — boolean
-
This parameter is deprecated. Use includeDeletedDocuments instead.
- includeDeletedDocuments — Optional — boolean
-
Use this parameter to include approval requests that are on deleted guides and wikis. The value is set to true if the parameter is used, so exclude the parameter if you want the value to be false.
Response
Status: 200 OK
GET /approvals/request/{approval_requestid}
Get an approval request along with data about the approval process and stages.
Route Parameters
- approval_requestid — Required — integer
-
Identifier for the approval request.
Response
Status: 200 Ok
{ "approval_requestid": 2424, "release": { "releaseid": 11208, "guideid": 20877, "langid": "en", "revisionid": 48921, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "removed", "title": "Release Title", "init_date": 1597270790, "release_date": 1597270790, "publish_date": 1597270790, "notes": "", "type": "major", "href": "\/Guide\/Guide_Name\/20877?release=11208", "version": null }, "guide": { "guideid": 20877, "title": "Guide Name", "langid": "en", "img_src": "https:\/\/someurl.example.com" }, "process": { "approval_processid": 62, "name": "Approval Process Name", "allow_repeated_signatures": false, "status": "enabled", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "is_satisfiable": true } ], "is_satisfiable": true, "is_default": false, "num_guides": 0, "num_requests": 0 }, "status": "rejected", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "complete", "signatures": [ { "approval_request_stage_signatureid": 347, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "reject", "sign_date": 1597270790, "notes": "" } ], "approved": false, "rejected": true } ], "init_date": 1597270790, "end_date": 1597270790, "href": "\/User\/approvals\/2424" }
Status: 403 Forbidden
Users can only access requests for approval process stages they are assigned to. Admins can access any request.
POST /approvals/request/sign/{approval_requestid}
Approve or reject an approval request using a Dozuki password.
Route Parameters
- approval_requestid — Required — integer
-
Identifier for the approval request.
Request Body
- password — Required — string
-
The Dozuki password of the user making the API request.
- status — Required — enum
-
The status marking the approval process stage as either approved or rejected.
Possible Values:
- approve
- reject
- notes — Optional — string
-
Optional notes for additional details about the approval decision.
- approval_request_stageid — Optional — integer
-
Identifier for a specific stage of the approval request to approve or reject. If this parameter is unset then the stage will be whichever one is current.
Response
Status: 200 Ok
{ "approval_requestid": 2424, "release": { "releaseid": 11208, "guideid": 20877, "langid": "en", "revisionid": 48921, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "removed", "title": "Release Title", "init_date": 1597270790, "release_date": 1597270790, "publish_date": 1597270790, "notes": "", "type": "major", "href": "\/Guide\/Guide_Name\/20877?release=11208", "version": null }, "guide": { "guideid": 20877, "title": "Guide Name", "langid": "en", "img_src": "https:\/\/someurl.example.com" }, "process": { "approval_processid": 62, "name": "Approval Process Name", "allow_repeated_signatures": false, "status": "enabled", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "is_satisfiable": true } ], "is_satisfiable": true, "is_default": false, "num_guides": 0, "num_requests": 0 }, "status": "rejected", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "complete", "signatures": [ { "approval_request_stage_signatureid": 347, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "reject", "sign_date": 1597270790, "notes": "" } ], "approved": false, "rejected": true } ], "init_date": 1597270790, "end_date": 1597270790, "href": "\/User\/approvals\/2424" }
Status: 403 Forbidden
Users can only sign requests for approval process stages they are assigned to.
POST /approvals/request/sign/{approval_requestid}/token
Approve or reject an approval request using SAML 2 Single Sign On (SSO) instead of a Dozuki user password
Route Parameters
- approval_requestid — Required — integer
-
Identifier for the approval request.
Request Body
- token — Required — string
-
The signed token retrieved via an SSO re-authentication.
- status — Required — enum
-
The status marking the approval process stage as either approved or rejected.
Possible Values:
- approve
- reject
- notes — Optional — string
-
Optional notes for additional details about the approval decision.
- approval_request_stageid — Optional — integer
-
Identifier for a specific stage of the approval request to approve or reject. If this parameter is unset then the stage will be whichever one is current.
Response
Status: 200 Ok
{ "approval_requestid": 2424, "release": { "releaseid": 11208, "guideid": 20877, "langid": "en", "revisionid": 48921, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "removed", "title": "Release Title", "init_date": 1597270790, "release_date": 1597270790, "publish_date": 1597270790, "notes": "", "type": "major", "href": "\/Guide\/Guide_Name\/20877?release=11208", "version": null }, "guide": { "guideid": 20877, "title": "Guide Name", "langid": "en", "img_src": "https:\/\/someurl.example.com" }, "process": { "approval_processid": 62, "name": "Approval Process Name", "allow_repeated_signatures": false, "status": "enabled", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "is_satisfiable": true } ], "is_satisfiable": true, "is_default": false, "num_guides": 0, "num_requests": 0 }, "status": "rejected", "stages": [ { "approval_process_stageid": 24979, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "complete", "signatures": [ { "approval_request_stage_signatureid": 347, "user": { "userid": 64751, "username": "Tester904716511", "unique_username": "tester904716511", "join_date": 1597270789, "image": { "id": 32, "guid": "default_avatar_placeholder_guid", "original": "https:\/\/someurl.example.com", "mini": "https:\/\/someurl.example.com", "thumbnail": "https:\/\/someurl.example.com", "140x105": "https:\/\/someurl.example.com", "200x150": "https:\/\/someurl.example.com", "standard": "https:\/\/someurl.example.com", "440x330": "https:\/\/someurl.example.com", "medium": "https:\/\/someurl.example.com", "large": "https:\/\/someurl.example.com" }, "reputation": 1, "url": "https:\/\/someurl.example.com", "teams": [], "privileges": [ "User" ] }, "status": "reject", "sign_date": 1597270790, "notes": "" } ], "approved": false, "rejected": true } ], "init_date": 1597270790, "end_date": 1597270790, "href": "\/User\/approvals\/2424" }
Status: 403 Forbidden
Users can only sign requests for approval process stages they are assigned to.