Call HTTP Web Service

Add action

Use context menu or action toolbox to add Call HTTP Web Service action to workflow scheme.

  • Click on the area with (Edit) icon on the scheme and:
  • Select category Integration;
  • Choose Call HTTP Web Service.
  • In action toolbox:
  • Select category Integration;
  • Drag and drop Call HTTP Web Service action to the area with (Edit) icon on the workflow scheme.

Configure action

Open action configuration dialog to edit action properties:

  • Open action context menu on the scheme and choose Edit;
  • Or double click the action on the scheme.

Action properties

Use configuration dialog to edit action properties:

Property Description
Title Defines action title.
By default the title is action type name.
Address URL-address of the service.
Lookups are available for this property.
Request
Type Type of HTTP-request:

  • GET;
  • POST;
  • PUT;
  • DELETE.
Headers Variable which contains HTTP-request headers.
Only variables of type Dictionary are available for this property.
Content Variable which contains HTTP-request body.
Only variables of type Dictionary are available for this property.
Response
Headers Variable to store HTTP-response headers.
Only variables of type Dictionary are available for this property.
Content Variable to store HTTP-response body.
Only variables of type Dictionary are available for this property.
Status code Variable to store HTTP-response status code.
Only variables of type Choice, Hyperlink or Text are available for this property.

Examples

Get the site name:

Two steps are required to obtain the site name by using an HTTP web service call.

1. Call HTTP web service:

 

 

Example of the resulting value in the dictionaryReponseBody variable:

{
odata.metadata“:”https://doctrix.sharepoint.com/sites/systemz-hd/_api/$metadata#SP.ApiData.Webs/@Element&$select=Title”,
odata.type“:”SP.Web”,
odata.id“:”https://doctrix.sharepoint.com/sites/systemz-hd/_api/Web”,
odata.editLink“:”Web”,
Title“:”Support & Maintenance Helpdesk”
}

 

2. Get dictionary item:

 

Example of the value obtained in the textWebTitle variable: “Support & Maintenance Helpdesk”.

Get user login by ID:

Two steps are required to obtain the user’s login by ID using an HTTP web service call.

 

1. Call an HTTP web request:

 

 

 

Example of the resulting value in the dictionaryReponseBody variable:
{
odata.metadata“:”https://doctrix.sharepoint.com/sites/systemz-hd/_api/$metadata#SP.ApiData.Users1/@Element”,
odata.type“:”SP.User”,
odata.id“:”https://doctrix.sharepoint.com/sites/systemz-hd/_api/Web/GetUserById(10)”,
odata.editLink“:”Web/GetUserById(10)”,
Id“:10,
IsHiddenInUI“:false,
LoginName“:”i:0#.f|membership|support@systemz.io”,
Title“:”SYSTEMZ Support”,
PrincipalType“:1,
Email“:”support@systemz.io”,
IsEmailAuthenticationGuestUser“:false,
IsShareByEmailGuestUser“:false,
IsSiteAdmin“:false,
UserId“:{
NameId“:”100320003425dbc1”,
NameIdIssuer“:”urn:federation:microsoftonline”
}
}

 

2. Get dictionary item:

 

 

An example of the value obtained in the variable textLoginName: “i: 0 # .f | membership | support @ systemz.io`”

Create list item:

Four steps are required for creating list item by using an HTTP web service call:

 

1. Build dictionary of request headers

 

 

2. Build intermediate query type dictionary:

 

 

 

The value of the “type” key is “SP.Data. < ListName > ListItem”, where < ListName > is the internal name of the target list.

 

3. Build query body dictionary:

 

 

For the _metadata key, the value of the Dictionary type is used with variable substitution from item 2. The Title and IssueStatus keys are the internal names of the fields of the created item.

 

4. Call HTTP web request: