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

Are you using a user with the appropriate access? Since you do get an ACL error.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Remember I am using the Developer edition..with a user/password that have been provided to me by email...I guess the access control is limited for that user.  Also, can you try this /api/sn_chg_rest/v1/change"  instead you table/change_request ?

With developer edition you mean PDI right? Personal Developer Instance?

 

So the user you are using has an admin role? Did you verify?

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Just tried with below, works fine.

 

curl "https://dev12345.service-now.com/api/sn_chg_rest/change" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{\"chg_model\":\"Standard\",\"type\":\"Standard\",\"description\":\"Test\",\"short_description\":\"Test\"}" \
--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

Still no luck..with yours that doesn't have /v1/ . I can assume you are not using a Developer edition of Snow for your API calls.