Hi,
I'm nruning Confluence Data Center 7.19 and I need to retrieve Spaces creation date and the user that created it with Resti API.
I was checking this post, but I don't get useful informations from that endpoint:
curl -k -X GET https://confluence.site.com/rest/api/space?status=current
{
"id": 281444356,
"key": "PRJ0011599",
"name": "CRM & Marketing Platform",
"type": "global",
"_links": {
"webui": "/display/PRJ0011599",
"self": "https://confluence.si.tecom/rest/api/space/PRJ0011599"
},
"_expandable": {
"metadata": "",
"icon": "",
"description": "",
"retentionPolicy": "",
"homepage": "/rest/api/content/278664854"
}
}
I also tried to check documentation of Rest api, but seems like the documentation for the endpoints property and property/{key} are identical.
Could someone share some insights? Thank you in advance
Hi @Elia Rampi
In the Expand you should have access to the "history" in which you will have the createdDate
... "history": { "createdDate": "<string>", ....
Regards
Hi, could you provide more details please? in the Expand of which Endpoint? what is the exact query on the endpoint?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In your case for DC :
http://example.com/confluence/rest/api/space?spaceKey=xxx
You will have in return
{ "id": "https://docs.atlassian.com/jira/REST/schema/page-response-of-space#", "title": "Page Response of Space", "type": "array", "items": { "$ref": "#/definitions/space" }, "definitions": { "anonymous": { "title": "Anonymous", "type": "object", "properties": { "profilePicture": { "$ref": "#/definitions/icon" }, "displayName": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "content": { "title": "Content", "type": "object", "properties": { "id": { "title": "Content Id", "type": "object" }, "type": { "title": "Content Type", "type": "object" }, "status": { "title": "Content Status", "type": "object" }, "title": { "type": "string" }, "space": { "type": "array", "items": { "$ref": "#/definitions/space" } }, "history": { "type": "array", "items": { "title": "History", "type": "object", "properties": { "previousVersion": { "type": "array", "items": { "$ref": "#/definitions/version" } }, "nextVersion": { "type": "array", "items": { "$ref": "#/definitions/version" } }, "lastUpdated": { "type": "array", "items": { "$ref": "#/definitions/version" } }, "latest": { "type": "boolean" }, "createdBy": { "$ref": "#/definitions/person" }, "createdDate": { "type": "string"
Structure :
Definitions -> Content -> properties -> history -> items -> properties -> createdDate
link to the documentation : https://docs.atlassian.com/ConfluenceServer/rest/8.7.2/#api/space-spaces
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, problem is that it doesn't:
curl -s -k -X GET https://confluence.site.com/rest/api/space?spaceKey=Change | jq
{
"results": [
{
"id": 4554755,
"key": "Change",
"name": "ChangeManagement",
"type": "global",
"_links": {
"webui": "/display/Change",
"self": "https://confluence.site.com/rest/api/space/Change"
},
"_expandable": {
"metadata": "",
"icon": "",
"description": "",
"retentionPolicy": "",
"homepage": "/rest/api/content/4522249"
}
}
],
"start": 0,
"limit": 25,
"size": 1,
"_links": {
"self": "https://confluence.site.com/rest/api/space?spaceKey=Change",
"base": "https://confluence.site.com",
"context": ""
}
}
I'm using 7.19, not the latest, as previously stated.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok,
Did you try to make this call ?
curl -s -k -X GET https://confluence.site.com/rest/api/space/{spaceKey}/property?expand=history
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, yes, but it's not returning anything:
curl -s -k -X GET https://confluence.site.com/rest/api/space?spaceKey=Change/property?expand=history | jq
{
"results": [],
"start": 0,
"limit": 25,
"size": 0,
"_links": {
"self": "https://confluence.site.com/rest/api/space?spaceKey=Change/property?expand=history",
"base": "https://confluence.site.com",
"context": ""
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.