Steps to add this REST call to a SharePoint 2013 workflow
These steps are for the URL, method, header and body entered above!
Add Build Dictionary Action for the header values.
Add a
Build Dictionary action.
Click "this".
Click "Add", enter data and click OK for each of the following.
Click OK.
Click "Variable:dictionary".
Click "Create a new variable".
Enter "requestHeaders".
Click OK.
Add a second Dictionary with these values and save to a variable named dataType.
Name: type
Type: String
Value:
Add a third Dictionary with these values and save to a variable named requestContent.
Name: __metadata
Type: Dictionary
Value: Variable: dataType (from the fx button)
Add a fourth Dictionary with these values and save to a variable named requestContent.
Name: parameters
Type: Dictionary
Value: Variable: requestData
Add Call HTTP Web Service Action.
Add a
Call HTTP Web Service action.
Click "this".
Enter URL with the query string or...
Click "...".
Click "Add or Change Lookup".
From "Data Source" select "Workflow Context".
From "Field from source" select "Current Site URL".
Click OK.
Add the following: (
with the correct site path!)
Set the HTTP method to: HTTP
.
Click OK.
Click the dropdown and click Properties.
Click "RequestHeaders" and select "requestHeaders" from the dropdown.
Click "RequestContent" and select "requestContent" from the dropdown.
Click "ResponseContent" and select "Create New Variable" from the dropdown, enter "responseData" and click OK.
Add a Get an Item from a Dictionary Action so you can display some results.
Add a
Get an Item from a Dictionary action.
Click "item by name or path".
(You will need to know the data that's being returned to complete this.) Example:
test
Click "dictionary" and select "responseData".
Click "item" and enter a variable name for your retrieved data.
Do something with your retrieved data! Log it, add to a list or send as part of an email!