POST /approvals call returns 400 status when sent with restricted page id - even though API key should be executed as user with access to the page
Description
When a page has restricted access, the approval cannot be started with REST API, unless app’s technical user also received at least View page permission.
This happens even if the “allow change performer origin” option is used and a user with access to the page is chosen as call origin in the API Key setup.
Expected result:
-
When a user with access to the restricted page is selected as change performer origin, the approvals can be started using this API key. Adding permission to app’s technical user should not be required.
Actual response of the API request:
400 Bad Request
{"errorMessage": "Page[id: 196902915] not found","url": "https://app.approval-path.com/webapi/v2/approvals","timestamp": "2026-02-20T10:51:17.018+0000"}
Change
-
When Approval Path for Confluence cannot see a restricted page, the Web API reads the page as the API key owner. Approvals can then be started, read, decided, deleted, archived and unarchived on that page without giving the app user access to it, as long as the key owner can view the page.
-
API keys of both apps work only on what their owner can see. The key owner must be able to view the page (Confluence) or browse the work item (Jira); with "Allow change performer origin" the performer must be able to see it too. A performer who can see a page the owner cannot does not make the key work on it.
-
For a key, something its owner cannot see is answered exactly like something that does not exist. A key whose owner is not an admin gets "Resource not found" for every page, work item, project, space, approval and user.
-
Label conditions on a page the app cannot see are checked with the labels the key owner sees, read only when the definition has a label condition.
Decisions
-
The key owner must be able to view the page. A page the app cannot see is read as the key owner only, never as the change performer or a user named in the call. This differs from the expected result above on purpose: otherwise any admin who can edit a key could set a performer to reach pages the admin is not allowed to see.
-
The key owner's admin check comes before anything else in every call. It is cached for 60 seconds in Jira, as Confluence already caches it.
-
Lists without a project or space only return approvals in the projects and spaces the key owner can see, filtered in the search itself. Pages can still come back short, with a total that is only an upper bound, when a Jira work item has an issue security level the owner is not in, a Confluence page is restricted away from the owner, or the change performer cannot see an approval. Without a user token for the key owner, spaces that could not be checked stay in the search and each listed page is checked instead.
-
Approvals that finished before their page moved keep their old space and are listed under it.
-
Definition calls that take a project or space also require the key owner to see it.
Fixes included
-
GET, list, versions, step links, delete, archive and unarchive work on a restricted Confluence page that both the key owner and the performer can view.
-
Web API decisions work on a restricted page the deciding person and the key owner can view. Before, they were refused with USER_HAS_NO_ACCESS and an instance error blaming the user.
-
Definitions with label conditions start through the Web API on a restricted page the app cannot see. Before: 403 "failed to fetch labels".
-
A page created and then started right away by an automation is no longer refused because Confluence search had not indexed it yet.
-
Keys whose owner is not an admin can no longer tell whether a work item, page, project, space, approval or user exists.
-
GET /webapi/v2/approvals/<id>, its versions and step links answer 404 "Approval not found" for an approval on a page or work item the key owner cannot see, the same as for an unknown id. Before, they answered "Page[id: …] not found" or "Work item[…] not found".
-
Delete, archive and unarchive by approval id with performer origin "Page creator" or "Last modifier" no longer answer "Page[id: …] not found" for a page the key owner cannot see; they answer like an unknown id and add "API key owner has no access" to Instance errors.
-
POST /webapi/v2/approvals/<id>/decisions answers 404 "Approval not found" when the deciding user cannot see the approval's page or work item, before any answer about the approval's state; the same as for an unknown id. Before, it answered 409 (no active step / already completed) or 403 USER_HAS_NO_ACCESS.
-
With a key whose owner is not an admin, GET/PUT/DELETE /definitions/<id> (and its versions) and /conditions/<id> answer 404 "Resource not found" for existing and made-up ids alike.
Manual tester notes
-
Restrict a Confluence page so only you can view it (do not add Approval Path for Confluence). Create an API key as yourself with all privileges and call POST /webapi/v2/approvals with the page id: the approval starts and shows in the page's Approval Path panel.
-
On the same page: GET /webapi/v2/approvals?reference=<page id> lists it; PATCH /webapi/v2/approvals/<id>/archive and then /unarchive work; DELETE /webapi/v2/approvals?reference=<page id> deletes it; POST /webapi/v2/approvals/<id>/decisions decides it (definition allowing Web API decisions, you as approver).
-
Add a start label condition (for example, page has label "finance") to the definition and the label to the page; start through the API: it starts. Remove the label: it is refused for the label, not with "failed to fetch labels".
-
Restrict a page so the key owner cannot view it, even with Approval Path added to the restriction: create returns 400 "Page[id: …] not found", the same as for a made-up page id; GET by reference returns 404 "Page[id: …] not found"; delete or archive of an existing approval by its id does nothing, and Global settings > Instance errors shows "API key owner has no access". GET /webapi/v2/approvals/<id> of that approval returns 404 "Approval not found", the same as for a made-up id.
-
Use a key with "Allow change performer origin" and performer origin "User" set to someone who can view a page the owner cannot: the start is still refused. The owner must be able to view the page.
-
Jira: put a work item under an issue security level the key owner is not in. Create returns 400 "Work item[id or key: …] not found", the same as for a made-up key; GET by reference returns 404 "Work item[key: …] not found"; GET by approval id, deciding, archiving and unarchiving by approval id return 404 "Approval not found", and delete by approval id returns an empty list, the same as for a made-up approval id. Archive, unarchive and delete by approval id add "API key owner has no access" to Global settings > Instance errors. Remove the security level: the same calls work.
-
Use a key whose owner is not a Jira or Confluence admin: every call returns 404 Resource not found, for existing and made-up ids alike.
-
GET /webapi/v2/approvals without a reference lists only approvals in projects or spaces the key owner can see.
-
Performer origin User with a performer who cannot view the page: POST /decisions on an ongoing, a completed and a made-up approval all answer 404 APPROVAL_NOT_FOUND. Key whose owner is not an admin: GET /definitions/<existing id> and /definitions/<made-up id> (and /versions) both answer 404 Resource not found.
Before release
-
Release note: API keys now act only on what their owner can see. Keys whose owner cannot view some Confluence pages or spaces, or cannot browse some Jira projects or work items, stop working on them. For example, keys owned by Jira admins without BROWSE_PROJECTS on a JSM project (not agents there) stop working on its work items. They get the same answer as for something that does not exist (mostly 404); delete, archive and unarchive by approval id also add an instance error naming the owner. Fix: give the owner access, or recreate the key as someone who has it. The same applies to definition calls on such a project or space. Web API decisions no longer answer USER_HAS_NO_ACCESS; a deciding user who cannot see the approval gets APPROVAL_NOT_FOUND (404).