New Confluence V2 Content Permissions REST APIs

Hello everyone,

The Confluence team recently delivered a fundamental rework to our Share Dialog experience. You can read more on the experience updates here: :megaphone: Introducing Confluence’s new live sharing experience

The primary changes introduced were:

  • Live updates: Every change you make is applied instantly – no Save button needed. What you see in the dialog is always the source of truth.

  • Separate controls: General access (overall visibility) and Specific access (people) operate independently. Adjusting one won’t automatically alter the other, giving you more precise control.

  • Persistent access: When you share with someone directly, they stay on your specific access list, so their access is never in doubt.

access-is-retained


How this differs from the old model

While possibly subtle at first glance, one of the more fundamental changes with how the Share Dialog operated has to do with the decoupling of General access & Specific access noted (and visualized in GIF form) above. Before this change, the two were coupled.

Let me show by example:


Changes from a REST API perspective

Confluence recently introduced new V2 APIs that operate in the updated structure described above, and will soon be deprecating the existing V1 APIs.

With the V2 APIs:

  • There are now separate APIs for interacting with the permissions (what widens access, surfaced via “specific access”), and the restriction state (what tightens access, surfaced via “general access”).
  • Developers can now set the full array of content level permissions configurations.
    • With the V1 APIs, developers could not model read or update permissions in an OPEN state, or read permissions in an EDIT_RESTRICTED state.

Additional update

There is one other minor V1 behavior change that is described in its own respective changelog, but is included here for a complete picture. This change targets a subtlety in the internal cutover to the new model.

Context for the change

In the V1 model when a content is “view restricted” - all principals should either hold:

  • read → Can view
  • read & update → Can edit

It was possible to use various surfaces (such as the V1 API for example) to set a particular principal as:

  • update → Can edit

This is technically not a correct restriction configuration for a principal to be in, but historically we have honored this configuration the same as read & update.

Note - holding update alone is a valid configuration, but only when the content is in an “edit restricted” state.

CHANGE-3496 - Update to Confluence Content Restrictions V1 API behavior for read and update operations

We are updating the behavior of the Confluence Cloud REST API V1 content restrictions endpoints to ensure consistency between view and edit access. Previously, it was possible for a principal (user or group) to hold an update (Can edit) restriction without holding the corresponding read (Can view) restriction on content that had view restrictions applied.

After this change:

  • All principals will hold either only the read restriction (Can view) or both the read and update restrictions (Can edit).
  • If a principal holds both read and update restrictions, any API request to remove only the read restriction will result in a rejection.
  • To move content into an “edit restricted” state for these principals, you must request the removal of all read restrictions.

What you need to do

If you’re using the V1 APIs for your marketplace apps, scripts, or automations - our ask is to migrate your usage from the V1 Content Restriction endpoints → V2 Content Permissions endpoints.

The V1 APIs will soon be marked as deprecated with a corresponding changelog.

Also - CHANGE-3496 corrects a minor subtlety in how the V1 API contract works today. While there is a very high likelihood there should be no impact to your usage patterns, it is worth understanding this tweak & sanity checking your usage patterns will not be affected.


Questions?

We want to hear from you! Please let us know if you have any questions about these changes, and if there is anything additional we can do to ease this cutover.

Cheers!
The Confluence Permissions team

Hi @SimonKliewer ,

Thank you for the description. I have some questions:

  1. Can you add examples to the documentation of what shape the payload is when you add/remove permissions and restrictions to the documentation? I did not understand the payload shape in all cases.
  2. Can Atlassian please deprecate the v1 endpoints after the Forge deprecation? We’re busy migrating to Forge, and having this deprecation at the same time would imply we need to change the Forge and the Connect code base while migrating.
  3. Is there interaction of these permissions/restrictions with the Confluence roles? I’m unsure how these interact.

Hi @SimonKliewer

Thanks for posting the announcement.

  1. I note that the new V.2 API group seems to be missing endpoints for the slides and smartlinks contentTypes.

  2. You mentioned that you were going to deprecate the V.1 APIs, with a link to the “Content Restrictions” API group. Can you confirm that this is the only set of APIs that you will be deprecating, and not other V.1 permissions-related APIs (such as https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions/#api-wiki-rest-api-content-id-permission-check-post)? I ask because the new V.2 APIs include “Get [contentType] permissions” endpoints, which would seem to have a scope exceeding that of just content restrictions.

Thanks!

Dear @SimonKliewer ,

thank you for your post.

We run an app that inherits edit permissions from a page down to its descendants (pages, whiteboards, folders). We are migrating now and hit a few questions the docs don’t answer yet:

1. Deprecation scope and bulk reads

  • Does the deprecation also cover the restrictions.* expansions on /wiki/rest/api/content/search (e.g. expand=restrictions.update.restrictions.user,restrictions.update.restrictions.group)? Today that is the only way to read the restrictions of a whole subtree in one paginated pass.
  • Is a bulk read of restriction state and permissions planned (a CQL expansion or a batch endpoint)? With v2 we need at least two requests per content item, which adds up quickly against the rate limits on large trees.

2. v1 behaviour during the transition
What do the v1 restriction GETs and the restrictions expansion return for states v1 can’t model? Specifically:

  • OPEN content that still has “Can edit”/“Can view” entries in Specific access
  • EDIT_RESTRICTED content with read entries

If v1 returns these inactive entries, apps that still run on v1 will treat them as effective restrictions.

3. What entries mean in each state (related to @marc’s question on roles)
The post says permissions “widen access”. Does a read or update entry have any effect on OPEN content? Can a content-level “Can edit” let someone edit whose space role only allows viewing?

4. How state and entries are coupled

  • Is EDIT_RESTRICTED or VIEW_RESTRICTED with zero update entries a valid state, and who can edit then?
  • Does deleting the last update entry change the state?
  • Does PUT …/restriction-state with EDIT_RESTRICTED require existing update entries, or does it add the caller?
  • After PUT … OPEN, are the entries kept, and do they become effective again on the next EDIT_RESTRICTED?

5. allow-self-lockout

  • Does “the calling user’s own edit access” take group membership and space admin permission into account?
  • In Forge, is the impersonated user of api.asUser(accountId) the calling user? Does the check apply to asApp()?
  • Which error code do we get when a request is rejected because of a lockout?

6. Required permissions

  • The docs say “Permission to edit the page or administer the space”. Is the space permission to restrict content still enforced on top of that?
  • Is there a read-only way to check whether user X may change the permissions of content Y? For example, does GET /pages/{id}/operations report something like restrict_content? Today we have to probe with a write.

7. Error codes
404 now means both “not found” and “no permission”. Could you document the stable code values for: no permission, self-lockout rejected, the 500-entry limit exceeded, invalid principal, invalid state transition?

8. Events

  • Does avi:confluence:permissions_updated:page fire for v2 permission and restriction-state changes, including no-op writes?
  • Are there equivalent events for whiteboards, folders and databases?
  • Can the payload tell a state change from an entry change?

Thanks!

andreas1, CHANGE-3496 from yesterday looks relevant to your inheritance case. V1 now rejects an update restriction without the matching read restriction, and it is rolling out tenant by tenant, so the same call can pass on one site and fail on another for a while. Simon, is there a way for a vendor to tell which tenants already have the new behaviour?

Dear @VladymyrPostnov

you are 100% right.

@SimonKliewer : for us it is very important to understand whether we can add an stand-alone update permission for user who can “only” view via a group permission.

Thank you

Andreas

Thanks Andreas. As I read CHANGE-3496, an update restriction now has to come with a matching read restriction, so the open point is whether view access granted through a group counts as that read restriction. Simon, could you confirm how that case is handled?

Help me understand why this breaking change is rolling out a major api behavior change without a deprecation period. Our apps user the v1 api to grant edit (update) access on Confluence pages.

If I understand the change our production customers will start seeing immediately failures on all calls that attempt to grant the update privilege by itself?

If you are changing the v1 API behavior, why doesn’t the API add an (implied) Read when you receive an request for Update operation? That could maintain the new explicit permissions requirement of Read & Update.

Hi @SimonKliewer ,
Just seeing the message of @Chris_at_DigitalRose .

I did not read the announcement as an immediate deprecation of functionality of the v1 API. After re-reading it, I see this is a breaking change.

Atlassian needs to make sure that there is a deprecation period for breaking changes like this. Due to this unannounced change, we now have to work during the weekend to check for the impact this has on our apps. We manage page restrictions within the app.
It seems our test instance is not yet enrolled in the update, so we can’t test the impact.

The announcement is also ambiguous. What happens if an app first reads the restrictions, and then modifies them for some principals for update. In our current instance, no read restrictions are returned for these principals, only update restrictions. This seems to contradict the announcement, and we are now left with a puzzle to solve.
Adding to this is the documentation, which list things like

"details": {},
            "personalSpace": {
              "key": "<string>",
              "name": "<string>",
              "type": "<string>",
              "status": "<string>",
              "_expandable": {},
              "_links": {}
            },
            "_expandable": {
              "operations": "<string>",
              "details": "<string>",
              "personalSpace": "<string>"
            },
            "_links": {}
          }

in the payload for https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-restrictions/#api-wiki-rest-api-content-id-restriction-put . Are these data really needed? Please provide proper documentation.

The solution to automatically add an implied read by @Chris_at_DigitalRose would solve the problem seemingly. I do not understand why a breaking change was introduced.

And I don’t understand why there is no deprecation period.

Hi @SimonKliewer ,

Another thing I don’t understand of https://developer.atlassian.com/cloud/confluence/changelog/#CHANGE-3496 :

If some content has no read restrictions, and I want to just give update restrictions to an accountId, it seems I now have to also add read restrictions. However I want no read restrictions, and just that only select accountIds can update. How can this work if we must add read restrictions in order to get update restrictions? Read restrictions would imply that only select accountIds can read the content.

@andreas1 - your question 1.2 is the one I care about most too, so here are
some numbers from our side. We’re the opposite case from most of this thread:
an app that only reads restrictions and never writes them. CHANGE-3496
doesn’t touch us at all. The v2 move does, and it’s the batch read that does it.

Today we read page restrictions with /wiki/rest/api/content/search, CQL, and
the full expand path:

restrictions.read.restrictions.group
restrictions.read.restrictions.user
restrictions.update.restrictions.group
restrictions.update.restrictions.user
ancestors

50 pages per call, restrictions embedded. We measured about 90ms per call. A
5,000-page site is ~100 calls. That’s nothing.

With v2 it’s /{type}/{id}/restriction-state and /{type}/{id}/permissions,
one item at a time. I went through the v2 OpenAPI spec looking for a way out
and couldn’t find one - no expand or include for restrictions on any list
endpoint. GET /pages takes id, space-id, sort, status, title, body-format, subtype, cursor, limit. The only parameter of that shape in the whole spec is
include-permissions on /spaces/{id}, and that’s space permissions, one
space per call.

So the same site goes from ~100 calls to 5,000, or 10,000 if you need both
endpoints like you said. If I’ve missed an endpoint somewhere I’d be glad to
be wrong about this.

Where it gets worse for us than rate limits:

A restricted page is invisible to asApp(). Not restricted-but-listed -
gone. It doesn’t show up at all, unlike an inaccessible space, which still
appears in listings. On our test site we counted 19 pages as the user against
17 as the app, which is how we found this in the first place.

So the collection has to run as the user. And asUser() only exists in
user-triggered invocations, which cap at 25 seconds. Web triggers get 55s and
the async queue gets up to 900s, but neither has a user context, so neither
can see the content we need to read. We spent a while looking for a way around
that before accepting there isn’t one.

25 seconds at 90ms is roughly 280 sequential calls. With some parallelism we
handle a few thousand pages now. At one or two calls per item we wouldn’t
finish a mid-sized site - and 429 backoff inside a 25 second budget makes
things worse rather than better, so “just retry” isn’t available either.

Three things I’d like to know, @SimonKliewer

  1. Does the deprecation cover the restrictions.* expansions on
    /wiki/rest/api/content/search, or only the dedicated v1 restriction
    endpoints? @andreas1 asked this as well and honestly it’s the whole
    question for us - inconvenience or rewrite.
  2. Is a bulk read planned for v2 at all? CQL expansion, batch endpoint,
    include parameter on the list endpoints, anything.
  3. If it isn’t planned, what would you suggest for an audit app that needs
    restrictions across a whole site inside the asUser budget? Genuinely
    asking - we may be approaching this wrong.

Disclosure: Marketplace partner, On Record Labs. We publish an app that
produces an access record for Confluence, so the batch read is load-bearing
for us.

Hi All! Going to try a batch response here, please feel free to follow up as needed.

To note upfront - there is a key point in the changelog that was not communicated clearly, apologies.

This is that this change only applies to content that has view restrictions applied. This was noted at the end of the first section, but should have been noted throughout.

I’ve updated CHANGE-3496 in the following spots for clarity:

  • After this change → After this change, for content with view restrictions

  • any API request to remove only the read restriction → any API request to remove only the read restriction (but not all read restrictions)

  • review your implementation to ensure: → review your implementation to ensure that content with view restrictions

Also, will note the below for clarity here on CDAC (again, only for view restricted content):

  1. For any principal that only held update previously, they will now automatically hold update & read

  2. For any restriction “additions” ie requests that add only update for a principal, read will now be added automatically as well

  3. The added rejection only applies on the “removal” side, and is intended to make it clearer to the caller that requests that previously put a principal in this “invalid” configuration (update without read) are now being ignored instead of accepted

Examples of operations that will continue to succeed, for view restricted content:

  • V1 POST/PUT that aims to add update for a principal that does not hold read

    • This principal will then hold update & read automatically

Examples of operations that will receive a 400, for view restricted content:

  • V1 DELETE/PUT that removes view for a principal that also holds update, and this view restriction is not the last remaining restriction

Generally in chronological order:

Can you add examples to the documentation of what shape the payload is when you add/remove permissions and restrictions to the documentation? I did not understand the payload shape in all cases.

I fully agree that the existing/V1 docs could use some tightening. I’ll get rolling on this. Please let me know if this is all you had in mind, or if there are shapes from the newly introduced V2 API docs that are unclear.

Can Atlassian please deprecate the v1 endpoints after the Forge deprecation? We’re busy migrating to Forge, and having this deprecation at the same time would imply we need to change the Forge and the Connect code base while migrating.

I’ll need to get back to you on this. So far - we have not announced the firm deprecation for V1 endpoints, but I will make sure this is taken into consideration when it is made.

Is there interaction of these permissions/restrictions with the Confluence roles? I’m unsure how these interact.

There is no overlap between space roles & these changes. Confluence Space roles are related to the Space permission layer, these changes are related to the Content permission layer.

This document has an overview of the different layers: Confluence permissions structure.

However - space roles & content perms are both taken into account when determining a principal’s access to a piece of content, for example.

I note that the new V.2 API group seems to be missing endpoints for the slides and smartlinks contentTypes.

Appreciate the callout. I am discussing with our teams the plan around V2 API support for Slides. I agree that we need to have equivalent support for the Slides content type before we start the deprecation period for the V1 APIs.

Smartlinks does not support content permissions (ref).

Please let me know if you see any angles I might be missing!

Can you confirm that this is the only set of APIs that you will be deprecating, and not other V.1 permissions-related APIs (such as https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions/#api-wiki-rest-api-content-id-permission-check-post)?

Confirmed.

Does the deprecation also cover the restrictions.* expansions on /wiki/rest/api/content/search

It does not. I’m discussing the plan for expansions with my team.

Note - even though there are no changes currently planned, this does mean that the expansions are still on the legacy model - where “redundant” permissions are invisible. Happy to expand on that if it doesn’t make sense.

Is a bulk read of restriction state and permissions planned (a CQL expansion or a batch endpoint)?

Currently, this is not planned.

What do the v1 restriction GETs and the restrictions expansion return for states v1 can’t model?

They will not return these entries.

“Can edit” entries in a non-”Open” state, or “Can view” entries in an “Edit restricted” state are only model-able & return in the V2 model.

Does a read or update entry have any effect on OPEN content?

No - any permissions on an “OPEN” content are redundant when it comes to “effective” access.

Can a content-level “Can edit” let someone edit whose space role only allows viewing?

No - in order to edit content in a space, holding the necessary access at the Space level is still required.

Is EDIT_RESTRICTED or VIEW_RESTRICTED with zero update entries a valid state, and who can edit then?

It is possible to end up in this state due to:

  1. All principals who had access being deleted

  2. Leveraging allow-self-lockout param

  3. A few other historical paths..

In order to move the content out of this state, generally one of the below can be used:

  1. Space Admin just using share dialog to change to OPEN state (in case of edit restricted)

  2. Org Admins on Premium+ → Admin Key to share dialog (in the case of view restricted)

  3. Space Admins → Restricted UX (wiki/pages/listpermissionpages.action?key=)

    1. Note - currently limited to page type
  4. Space Admins → Using V2 Set restriction state API

Does deleting the last update entry change the state?

It depends.

If interacting through the old model (V1) - then generally, yes. For example - removing all update entries should move a content from EDIT_RESTRICTED to OPEN.

If interacting through the new model (V2) - then no, they are decoupled.

Hopefully the visual/comparison table gives a good overview of the comparison, but please let me know if I can provide more examples/explanations. I realize that it might not be very intuitive at first.

Does PUT …/restriction-state with EDIT_RESTRICTED require existing update entries, or does it add the caller?

It generally requires existing update entries, and does not add the caller. This can be overridden with allow-self-lockout.

After PUT … OPEN, are the entries kept, and do they become effective again on the next EDIT_RESTRICTED?

Yes to both. This is because in the V2/updated model, the these are decoupled.

Does “the calling user’s own edit access” take group membership and space admin permission into account?

The user’s group membership is taken into account, but not Space Admin permissions. The Space Admin’s ability to manage content restrictions should be thought of as an ability to override if needed (think Restricted UI at wiki/pages/listpermissionpages.action?key=spacekey).

In Forge, is the impersonated user of api.asUser(accountId) the calling user? Does the check apply to asApp()?

Put simply, asUser uses the users permissions. asApp uses the apps permissions.

Which error code do we get when a request is rejected because of a lockout?

The docs say “Permission to edit the page or administer the space”. Is the space permission to restrict content still enforced on top of that?

Yes - good callout. At this granularity - the docs are noting the “Admin” role, which contain both “Manage all content in space” & “Manage access to individual content” space permissions.

If you are in RBAC transition mode, only “Manage access to individual content” is required.

There are some more notes here: What are Confluence’s roles?, specifically under the Manage all content in space permission.

Is there a read-only way to check whether user X may change the permissions of content Y? For example, does GET /pages/{id}/operations report something like restrict_content? Today we have to probe with a write.

The operations endpoint should return restrict_content. Though note - this endpoint does return 404 when the content is view restricted from the caller.

404 now means both “not found” and “no permission”. Could you document the stable code values for: no permission, self-lockout rejected, the 500-entry limit exceeded, invalid principal, invalid state transition?

I’ll get the V2 API doc updated shortly! In the meantime - generally all the cases you noted (self-lockout rejected, 500-entry limit exceeded, invalid principal, invalid state) will return 400.

“Events” questions

There are no changes to events yet. Events will continue to fire on “effective only” changes to permissions.

Example:

  • Adding UserA & UserB as update restrictions to OPEN Page1 will fire no events

  • Transitioning OPEN Page1 to EDIT_RESTRICTED after the above will fire 2 events

    • One for UserA ↔︎ update, One for UserB ↔︎ update

Simon, is there a way for a vendor to tell which tenants already have the new behaviour?

Double checked here, there is no API or else exposed that could tell you that the change has hit a tenant, the only route would be simply observing the change in the API behavior.

for us it is very important to understand whether we can add an stand-alone update permission for user who can “only” view via a group permission.

You will still be able to add an update restriction for a user who can only view via a group permission. However - note the request will add both the update & read restriction for this user.

As I read CHANGE-3496, an update restriction now has to come with a matching read restriction, so the open point is whether view access granted through a group counts as that read restriction. Simon, could you confirm how that case is handled?

&

If I understand the change our production customers will start seeing immediately failures on all calls that attempt to grant the update privilege by itself?

If you are changing the v1 API behavior, why doesn’t the API add an (implied) Read when you receive an request for Update operation? That could maintain the new explicit permissions requirement of Read & Update.

(batching these together since same idea)

Apologies for the unclear wording. Hopefully the blurb at the top of this reply helps.

To clarify here as well - a request to add an update restriction for a view restricted content should be sent with a matching read restriction, but if it is not, a read restriction will automatically be granted.

It is like how you noted in last part of the message above.

What happens if an app first reads the restrictions, and then modifies them for some principals for update. In our current instance, no read restrictions are returned for these principals, only update restrictions.

&

If some content has no read restrictions, and I want to just give update restrictions to an accountId, it seems I now have to also add read restrictions. However I want no read restrictions, and just that only select accountIds can update. How can this work if we must add read restrictions in order to get update restrictions? Read restrictions would imply that only select accountIds can read the content.

Similar to previous responses - apologies for the unclear wording. These changes only apply to “view restricted” content, so they would not apply for content where there are no read restrictions for the content (“edit restricted”).

Principals who previously only held update on view restricted content will now automatically get read.

Does the deprecation cover the restrictions.* expansions on
/wiki/rest/api/content/search, or only the dedicated v1 restriction
endpoints? @andreas1 asked this as well and honestly it’s the whole
question for us - inconvenience or rewrite.

Is a bulk read planned for v2 at all? CQL expansion, batch endpoint,
include parameter on the list endpoints, anything.

If it isn’t planned, what would you suggest for an audit app that needs
restrictions across a whole site inside the asUser budget? Genuinely
asking - we may be approaching this wrong.

These expansions are currently not in scope. I’ll talk to my team about bulk calls.

Ok - hopefully this reply helps respond to the first round of questions, totally understand if there are more. Happy to provide more examples for any questions. Appreciate everyone’s feedback on this topic. And please feel free to let me know if missed anything.


Thanks Simon, that answers both of mine. Since there is no flag, the simplest check for a vendor seems to be a view restricted test page: add update only for a user, read the restrictions back, and if a read entry shows up the tenant has the new behaviour. Does that match what you would expect?

Hi @VladymyrPostnov! That checks out to me.

One note - as of last Friday (Oct 23) - all non-Fed Ramp customers should now have this change.

Thanks Simon, that settles it. So for andreas1’s app, any non-FedRAMP tenant now rejects an update restriction sent without the matching read one, and the inheritance logic has to send both. Is FedRAMP on its own timeline, or should vendors assume those tenants keep the old behaviour for now?

any non-FedRAMP tenant now rejects an update restriction sent without the matching read one

For view restricted content, API requests that aim to add update restrictions without matching read restrictions will continue to succeed, but the principals will then hold update & read automatically.

The added 400 response is on the removal side - this is returned for API requests that try to remove read while leaving update.

There is a very high likelihood there should be no change to given app’s flow, but happy to support on any further questions if it does seem necessary.

These changes are on track for FedRamp customers on November 3rd.

Hi @SimonKliewer ,

We’ve got a question about the new read/update permission combo and the separate controls for General access and Specific access.

It seems in the UI I can have General edit access for a page, and also add Specific edit access for a user.
However when I use the API and I add specific update access for a user, it seems the General access will be set to “read”.

This seems like a discrepancy? Any thoughts appreciated.

Hey @marc!

However when I use the API and I add specific update access for a user, it seems the General access will be set to “read”.

To confirm - are you using V1?

If so - this is because in the “V1” model, “General” & “Specific” access were coupled. These were both backed by lists of “restrictions”.

Therefore - when you add an “edit” restriction, it then implies the “General” access state is “edit restricted”. This is likely what you are observing.

However - please let me know if I am misunderstanding, or maybe send a series of example API requests what you are seeing. In V2, manipulation of “general” & “specific” access should generally be separate.

Hi @SimonKliewer ,

Thanks for the fast reply.
Indeed we are using the v1 API. We set update access for some users, and then the General access goes to edit restricted or read only.

Does this mean with the v2 API we must set both update access for specific users and General access to edit restricted / read to have an equivalent end state to the API v1 endpoints?

As a follow up after reading the v2 API documentation in more detail:

It seems we would need 2 API calls to change a page from being General edit to General view with some users having edit permission. Is this so?

If so, this is problematic, as the change in permissions/restrictions is not atomic.