Showing error 404

Suvarna Vashistha June 18, 2020

Hi,

When I have the latest version of jira which is 8.9.1 and when I am using the resource: rest/api/3/issue/  it is showing error 404 not found so I thought may be I should try rest/api/2/issue/  then it is showing 400 bad request error.

HTTP/1.1 404
X-AREQUESTID: 298x398x1
X-ASESSIONID: 1g9n4s4
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
X-ASEN: SEN-L15559509
X-Seraph-LoginReason: OK
Set-Cookie: atlassian.xsrf.token=B4N1-HIR7-238B-31N1_9a73bacfd482bdaef85d52065328e29e387a924b_lin; Path=/
X-AUSERNAME: Suvarna
Content-Type: text/html;charset=UTF-8
Content-Length: 2475
Date: Thu, 18 Jun 2020 23:28:07 GMT
Keep-Alive: timeout=20
Connection: keep-alive

 

now when using rest/api/2/issue

 

HTTP/1.1 400
X-AREQUESTID: 321x404x1
X-ASESSIONID: 1q1qwti
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
X-ASEN: SEN-L15559509
X-Seraph-LoginReason: OK
Set-Cookie: atlassian.xsrf.token=B4N1-HIR7-238B-31N1_42324569d86adabc0863968a0c833994da2d2091_lin; Path=/
X-AUSERNAME: Suvarna
Cache-Control: no-cache, no-store, no-transform
Content-Encoding: gzip
Vary: User-Agent
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 18 Jun 2020 23:51:29 GMT
Connection: close

{
"errorMessages": [
"Can not instantiate value of type [simple type, class com.atlassian.jira.issue.fields.rest.json.beans.CommentJsonBean] from JSON String; no single-String constructor/factory method"
]
}
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils (file:/C:/Users/This%20Pc/Downloads/BasicTestProject/libs/groovy-3.0.2.jar) to constructor java.lang.AssertionError(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.ReflectionUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.AssertionError: 1 expectation failed.
Expected status code <201> but was <400>.

1 answer

0 votes
said kouzibry
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.
August 24, 2021

The current version of Rest API is version 2, which is why trying to access version 3 will give a 404 error,

As for your other error, what action are you attempting to do are you trying to create an issue ?

 

This page might be of help : https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/ 

Suggest an answer

Log in or Sign up to answer