Confluence REST API v2: Updating v1 deprecation timeline and announcing v2 additions

Hello everyone,

We are extending the deprecation for the v1 endpoints referenced in this changelog by four months. The end of the deprecation period will now be 1 January 2024. This exception to our normal deprecation notice policy will allow additional time to transition from v1 APIs to the new v2 APIs. For more background, see this post.

Additionally, we are announcing a number of updates to our REST API v2. Among these updates are both new endpoints and additions to existing endpoints.

For details on all the changes, please reference our changelog entry here.

And reference our public documentation here.

We are eager to get your feedback on these updates, please leave a comment on this post or post your question with the rest-api-v2 tag to surface them to our team.

11 Likes

Not sure if here is the right place for this, but the v1 Get space endpoint is marked for deprecation and replacement with the v2 Get spaces and Get space properties endpoints.

I just tried the to get the properties of a space using the v2 endpoint and it returned an empty results array, but the v1 endpoint still works as expected and returns all the properties of the same space.

For v1:
GET https://{{Instance}}/wiki/rest/api/space/~496279867

{
    "id": 254705666,
    "key": "~496279867",
    "name": "David Bakkers",
    "type": "personal",
    "status": "current",
    "_expandable": {
        "settings": "/rest/api/space/~496279867/settings",
        "metadata": "",
        "operations": "",
        "lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=~496279867",
        "identifiers": "",
        "permissions": "",
        "icon": "",
        "description": "",
        "theme": "/rest/api/space/~496279867/theme",
        "history": "",
        "homepage": "/rest/api/content/254705737"
    },
    "_links": {
        "context": "/wiki",
        "self": "https://solidinterface.atlassian.net/wiki/rest/api/space/~496279867",
        "collection": "/rest/api/space",
        "webui": "/spaces/~496279867",
        "base": "https://solidinterface.atlassian.net/wiki"
    }
}

For v2:
GET https://{{Instance}}/wiki/api/v2/spaces/254705666

{
    "name": "David Bakkers",
    "key": "~496279867",
    "id": 254705666,
    "type": "personal",
    "homepageId": 254705737,
    "icon": null,
    "description": null,
    "status": "current"
}

GET https://{{Instance}}/wiki/api/v2/spaces/254705666/properties

{
    "results": [],
    "_links": {}
}

:wave: Hi @sunnyape -

The equivalent way to get this in V1 would be using this endpoint: Get space properties.

Would you be able to check and see if the V1 endpoint also shows empty space properties for this space?

These properties are basically key-value properties that are stored on the space, and are set by an app or user using the API.

Hi @SimonKliewer

Yes, the v1 Get space properties endpoint is correctly returning the same test property key:values that I created and can get via the v2 equivalent endpoints. It was a mis-understanding by me as to what a ‘property’ was.

GET https://{{Instance}}/wiki/rest/api/space/~496279867/property

{
    "results": [
        {
            "id": "887029761",
            "key": "Test property",
            "value": "This is a test",
            "version": {
                "when": "2023-05-02T21:26:31.746Z",
                "message": "",
                "number": 1,
                "minorEdit": false,
                "contentTypeModified": false
            },
            "_expandable": {
                "space": "/rest/api/space/~496279867"
            }
        }
    ],
    "start": 0,
    "limit": 10,
    "size": 1,
    "_links": {
        "base": "https://solidinterface.atlassian.net/wiki",
        "context": "/wiki"
    }
}

All good now.

As a side notes it’s not really explained in the documentation what the purpose of these properties are for. I can’t see that data being surfaced anywhere in the GUI, so their purpose is a bit vague other than storing abstract metadata about the space.

1 Like