I have created an API in ServiceNow Rome Release and the API data is correct.
My endpoint is https://snow12.atlassian.net/rest/api/3/search?jql=project=bug
but when I issue it through ServiceNow I get 400 {"errorMessages":["The value 'bug' does not exist for the field 'project'."],"warningMessages":[]}
When I post the same endpoint in my web browser it works fine.
{"expand":"names,schema","startAt":0,"maxResults":50,"total":1,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,customfield_10010.requestTypePractice,renderedFields","id":"10004","self":"https://snow12.atlassian.net/rest/api/3/issue/10004","key":"BUG-1","fields":{"statuscategorychangedate":"2022-03-18T15:53:21.608-0400","issuetype":{"self":"https://snow12.atlassian.net/rest/api/3/issuetype/10010","id":"10010","description":"A problem or error.","iconUrl":"https://snow12.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10303?size=medium","name":"Bug","subtask":false,"avatarId":10303,"hierarchyLevel":0},"timespent":null,"project":{"self":"https://snow12.atlassian.net/rest/api/3/project/10001","id":"10001","key":"BUG","name":"Bug","projectTypeKey":"software","simplified":false,"avatarUrls":{"48x48":"https://snow12.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10421","24x24":"https://snow12.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10421?size=small","16x16":"https://snow12.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10421?size=xsmall","32x32":"https://snow12.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10421?size=medium"}},"fixVersions":[],"aggregatetimespent":null,"resolution":null,"resolutiondate":null,"workratio":-1,"lastViewed":"2022-03-18T15:53:47.857-0400","watches":{"self":"https://snow12.atlassian.net/rest/api/3/issue/BUG-1/watchers","watchCount":1,"isWatching":true},"created":"2022-03-18T15:53:21.241-0400","customfield_10020":null,"customfield_10021":null,"customfield_10022":null,"customfield_10023":null,"priority":{"self":"https://snow12.atlassian.net/rest/api/3/priority/3","iconUrl":"https://snow12.atlassian.net/images/icons/priorities/medium.svg","name":"Medium","id":"3"},"customfield_10024":null,"customfield_10025":null,"labels":[],"customfield_10016":null,"customfield_10017":null,"customfield_10018":{"hasEpicLinkFieldDependency":false,"showField":false,"nonEditableReason":{"reason":"PLUGIN_LICENSE_ERROR","message":"The Parent Link is only available to Jira Premium users."}},"customfield_10019":"0|i0000v:","timeestimate":null,"aggregatetimeoriginalestimate":null,"versions":[],"issuelinks":[],"assignee":null,"updated":"2022-03-18T15:53:21.241-0400","status":{"self":"https://snow12.atlassian.net/rest/api/3/status/10003","description":"","iconUrl":"https://snow12.atlassian.net/","name":"To Do","id":"10003","statusCategory":{"self":"https://snow12.atlassian.net/rest/api/3/statuscategory/2","id":2,"key":"new","colorName":"blue-gray","name":"To Do"}},"components":[],"timeoriginalestimate":null,"description":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Test"}]}]},"customfield_10010":null,"customfield_10014":null,"customfield_10015":null,"customfield_10005":null,"customfield_10006":null,"security":null,"customfield_10007":null,"customfield_10008":null,"aggregatetimeestimate":null,"customfield_10009":null,"summary":"New Bug issue","creator":{"self":"https://snow12.atlassian.net/rest/api/3/user?accountId=6233a2f6c3a57b0068e03571","accountId":"6233a2f6c3a57b0068e03571","emailAddress":"wbrown@seic.com","avatarUrls":{"48x48":"https://secure.gravatar.com/avatar/b2b3bd03b311d470d29c25d9db2a0bad?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBB-4.png","24x24":"https://secure.gravatar.com/avatar/b2b3bd03b311d470d29c25d9db2a0bad?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBB-4.png","16x16":"https://secure.gravatar.com/avatar/b2b3bd03b311d470d29c25d9db2a0bad?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBB-4.png","32x32":"https://secure.gravatar.com/avatar/b2b3bd03b311d470d29c25d9db2a0bad?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBB-4.png"},"displayName":"Bill Brown","active":true,"timeZone":"America/New_York","accountType":"atlassian"},"subtasks":[],"reporter":{"self":"https://snow12.atlassian.net/rest/api/3/user?accountId=6233a2f6c3a57b0068e03571","accountId":"6233a2f6c3a57b0068e03571","emailAddress":"wbrown@seic.com","avatarUrls":{"48x48":"https://secure.gravatar.com/avatar/b2b3bd03b311d470d29c25d9db2a0bad?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBB-4.png","24x24":"https://secure.gravatar.com/avatar/b2b3bd03b311d470d29c25d9db2a0bad?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBB-4.png","16x16":"https://secure.gravatar.com/avatar/b2b3bd03b311d470d29c25d9db2a0bad?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBB-4.png","32x32":"https://secure.gravatar.com/avatar/b2b3bd03b311d470d29c25d9db2a0bad?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FBB-4.png"},"displayName":"Bill Brown","active":true,"timeZone":"America/New_York","accountType":"atlassian"},"customfield_10000":"{}","aggregateprogress":{"progress":0,"total":0},"customfield_10001":null,"customfield_10002":null,"customfield_10003":null,"customfield_10004":null,"environment":null,"duedate":null,"progress":{"progress":0,"total":0},"votes":{"self":"https://snow12.atlassian.net/rest/api/3/issue/BUG-1/votes","votes":0,"hasVoted":false}}}]}
Hi @Bill Brown ,
welcome to the Atlassian Community!
probably you are using a wrong JQL (project=bug). Bug should be an issue type and not a project. I don't know if you have a project with a key bug. Probably you want to filter issues with type bug so your JQL should be :
https://snow12.atlassian.net/rest/api/3/search?jql=issuetype=bug
Hope this helps,
Fabio
As you can see from the web response the coding is correct but when I run it through ServiceNow I get the following error 400 {"errorMessages":["The value 'bug' does not exist for the field 'project'."],"warningMessages":[]}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Iam also facing same issue, any update?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No I have not received a response they said I made a mistake but that is not true. It works when I run as HTML.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.