Forums

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

Body of project api endpoint is not being returned as a JSON array

William Timlen
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 8, 2023

I am sending a get request to the project rest api endpoint (https://domain-url/rest/api/2/project/projectKey)

I am using the unirest framework and confirmed that the user has administrator permissions to the project in question.

When I run locally, I am able to get the body of the request as an array. (See Below)

 

"body":{"array":{



However when I run from our jenkins server, when I read the body, array is set to false (See Below)

"body":{"array":false,"object":{

 

This is how I have my api call set up (in Java) :

 

HttpResponse<JsonNodeproject = null;
        .basicAuth(...)
        .header("Accept","application/json")
        .header("Content-Type""application/json")
        .asJson();

I was wondering if there are certain headers that need to be explicitly put in that is causing the call to set the array to false?

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events