Hello,
I can't figure out how to call /rpc/json-rpc/confluenceservice-v2/setSpaceStatus. I don't know how to send data. I want to set space as ARCHIVED. I've read the documentation https://developer.atlassian.com/confdev/confluence-rest-api/confluence-xml-rpc-and-soap-apis/remote-confluence-methods but still no luck.
Thanks for help
Community moderators have prevented the ability to post new answers.
Here's how you would do it in the browser console using jQuery:
jQuery.ajax({ contentType: 'application/json', type: 'POST', url: '/rpc/json-rpc/confluenceservice-v2/setSpaceStatus', data: '["SPACE_KEY", "ARCHIVED"]', success: function(response) { console.log(response); }, error: function(response) { console.log(response); } });
Where SPACE_KEY is the key of the space that you want to set as archived.
If you are doing it outside of the browser, you will need to include the login token before the space key.
Hello Stephen,
Thank you very much this is working like a charm
Best regards,
Roman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Stephen Deutsch
I managed to archived a space in Confluence using the jQuery above in browser console. There is a possibility to archive many spaces using this jQuery? From Atlasian documentation the Confluence method setSpaceStatus have parameters((String token, String spaceKey, String status).
Thanks for your help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.