Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence REST API ( Create Space / Update Space)

JangChulhee
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 5, 2019

Hello,

 

I'm receiving an unexpected response value.

I expect the error response below :

{
"statusCode": 400,
"errors": [
{
"message": {
"translation": "Space Name Over Max Characters",
"args": []
}
}

 

Case1)

. [PUT] /rest/api/space/{spaceKey}

. requestBody ( Space name length 200~250 over)

{
"name" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}

. Response 500

. ResponseBody

{"statusCode": 500,"message": "javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute statement","reason": "Internal Server Error"}

 

Case2)

. [POST] /rest/api/space

.requestBody ( Space name length 200~250 over)

{
"key":"TEST",
"name":"BBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABB"
}

 

. Response 500

. ResponseBody

{"statusCode": 500,"message": "org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only","reason": "Internal Server Error"}

 

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2019

Jang Chulhee,

Welcome to Atlassian Community! It's nice to have you.

According to the error, your space name is too long. I assume that you have already tried to correct this. Can you show us what REST API call you were using? The one in your example is too long but I assume this was not the name of the space you intended.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events