AnsweredAssumed Answered

Setting Change approvers through JSON API

Question asked by jharder@foxworldtravel.com on Aug 31, 2016
Latest reply on Dec 5, 2016 by Chad Brown

I'm trying to build a workflow in SharePoint to create a change request when an item is created.  I've got it working down to the approvers.  I've used the payload recommended in the API documentation (Which needs to be updated.  There are some pretty glaring errors in that.) and what I believe to the correct code, but nothing seems to be working.  Below is the section of code that I'm having issues with.

 

{

"change":{

"name":"Full JSON Change Test",

"requester":{"email":"jharder@foxworldtravel.com"},

"state":"Open",

"description":"The description of the request will go here.\nTesting line two.",

"priority":"Medium",

"assignee":{"email":"jharder@foxworldtravel.com"},

"change_plan":"Here is the change plan.",

"test_plan":"The test plan has a step.\nDoes it have a step two?",

"rollback_plan":"Rollback plan.",

"planned_start":"dec 12,2016",

"planned_end":"dec 13,2016",

"site":{"name":"Oshkosh"},

"department":{"name":"IT"},

"approvers":{"approver":{"email":"jharder@foxworldtravel.com"}}

}

}

 

I've tried adding the brackets as shown in the documentation, but that doesn't even pass a check on any JSON parser I've found.  The reply is below as well.  The user account does work, as it has been used in other fields here.

 

{

"base":

[

 

1]

0:  "Approver: Cannot find with approver={"email"=>"jharder@foxworldtravel.com"}"

-

}

 

Any help would be appreciated.

Outcomes