ServiceNow Developer Edition cannot create a Change Request via API -POST

ArmandK
Tera Contributor
The following --> curl "https://devxxxx.service-now.com/api/sn_chg_rest/v1/change" \
     --request POST     --header "Accept:application/json"      --header "Content-Type:application/json" \
     --data  "{ \"chg_model\" : \"Standard\",
            \"description\" : \"Describes the change request.\",
             \"short_description\" : \"My change request\",
         \"type\" : \"Standard\"
         }" \
     --user "XXXX":"YYYY"
RETURNS --> {"error":{"message":"Could not create Change Request.","detail":""},"status":"failure"}
1 ACCEPTED SOLUTION

 

If you are using Snow you are in the wrong place, this is ServiceNow 🙂 I tested this with a Personal Developer Instance, I assume that's what you mean with Developer edition (developer edition is not a ServiceNow terminology, where did you get that terminology from?)

 

As mentioned, do verify the user and its roles where you are testing with.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

10 REPLIES 10

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Is there anything more you can share? Like how you are testing this for example?

 

In theory, the below cURL code sample should work:

 

curl "https://dev12345.service-now.com/api/now/table/change_request" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{\"description\":\"Describes the change request.\",\"short_description\":\"My change request\",\"type\":\"Standard\"}" \
--user 'admin':'admin'

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

I did try --but this instance doesn't exist  https://dev12345.service-now.. Also, for the sake of testing I used admin:admin in my own instance...but nothing. I do believe that  the Dev edition of Snow doesn't provide ITSM tools.

dev12345 is just an example, also admin admin is just an example. Ofcourse you need to provide correct details there yourself.

 

I did try and it works fine. So question remains, how are you testing this. The success on answers to your question, depends on the input you deliver,

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

I am running it with Bash Shell.. I now exactly used your post with 'table' but I got --> {"error":"message":"Operation Failed","detail":"ACL Exception Insert Failed due to security constraints"},"status":"failure"}