Forums

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

Jira API create meta api giving empty response

Dev Geek June 25, 2021

Hi 

I am facing an issue while using Jira to create meta API using API token. It works fine for one domain but for another domain, it gives an empty response body. anyone has clue about this.

below is the response.

 

Array
(
[username] => email_address
[password] => api_token
[*url] => https://domain_url/rest/api/2/issue/createmeta
[*verb] => GET
[*requestBody] =>
[*requestLength] => 0
[*acceptType] => application/json
[*responseBody] => {"expand":"projects","projects":[]}
[*responseInfo] => Array
(
[url] => https://i-sol.atlassian.net/rest/api/2/issue/createmeta
[content_type] => application/json;charset=UTF-8
[http_code] => 200
[header_size] => 844
[request_size] => 249
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.261731
[namelookup_time] => 0.012322
[connect_time] => 0.013312
[pretransfer_time] => 0.021096
[size_upload] => 0
[size_download] => 35
[speed_download] => 133
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0.258068
[redirect_time] => 0
[redirect_url] =>
[primary_ip] => 18.246.31.139
[certinfo] => Array
(
)

[primary_port] => 443
[local_ip] => 172.31.6.25
[local_port] => 47876
)

[filename] =>
[contentType] => Content-Type: application/json
)

 

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2021

Hi,

I understand that your REST API response here is a 200 HTTP code, but you don't see any results.   There are a couple of possible explanations here.  We can see in the documentation of that endpoint (GET /rest/api/3/issue/createmeta) that:

Note that invalid project, issue type, or project and issue type combinations do not generate errors.

This operation can be accessed anonymously.

Which means that either,

  1. There are no projects your user account can see on that site where you can create issues in.
  2. Or your authentication is somehow broken here, and your call is being made anonymously

 

Since this endpoint is accessible anonymously, even if your credentials were invalid here, you would still get back an HTTP 200 code like here, but just with empty response.

I suggest that you try to confirm if your credentials being supplied to this site are still valid, perhaps by trying another endpoint to say GET an issue that is only accessible to logged in users. This is another way to try to confirm your account being used here is using the correct credentials or not.

Try that and let me know if this helps.

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events