creating a confluence space, using a json?

Victor Daniel Tobon Carrizosa February 9, 2021

alguien sabe si existe el cuerpo en formato json para crear un espacio en confluence ?

1 answer

0 votes
Paloma Fondon Araujo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2021

Hi @Victor Daniel Tobon Carrizosa 

What you need is an example of a JSON or with the parameters that must be included in it, is it enough? because on the API documentation page you have the information:

https://developer.atlassian.com/cloud/confluence/rest/api-group-space/#api-api-space-post

If it serves as an example:

{ 
"key":"MRKT",
"name":"Marketing",
"type":"global",
"description":
{
"plain":
{
"value": "Marketing Test",
"representation": "plain"
}
}
}

I hope it helps you

Greetings

Victor Daniel Tobon Carrizosa February 9, 2021

Hello @Paloma Fondon Araujo

Thanks for answering, what I require is an example of the Json since I will use it to create a space automatically.

Paloma Fondon Araujo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2021

Hi @Victor Daniel Tobon Carrizosa 

As an idea, if you already have that space created in confluence, and it is the one you are going to use as a template, you can make a Rest API call and use the "GET space" method (https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}), it will return a JSON that you can later use for that automatic creation.

I hope it helps you.
Greeting

Victor Daniel Tobon Carrizosa February 9, 2021

Hi @Paloma Fondon Araujo ,

 

I managed to obtain the JSON data with the Api, which you provided, but when trying to create the space it returns the following failure 415 , do you have any suggestions?SOLICITUD.jpgPost.jpg

Paloma Fondon Araujo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2021

Hi @Victor Daniel Tobon Carrizosa 

In the POST call are you sending the ID? If so, try making the call without the ID parameter.


Greetings

Victor Daniel Tobon Carrizosa February 11, 2021

HI @Paloma Fondon Araujo

Now I managed to create the confluence space, now I am putting a smart variable so that this value can be taken as the KEY for said space.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events