cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
wimvdv
Nintex Newbie

Call HTTP Web Service: REST call to update an item

Jump to solution

For a Nintex for O365 workflow,

I'm looking for an example to update an item in a list via the HTTP Web Service action.

Started with the below settings of the used dictionaries but run into an error.

Any ideas?

 

Thanks!

 

Address:

https://<tenant>/sites/DocuSign/_api/lists/getbytitle('MyList')/items?$filter=(Title%20eq%20'itemtoselect')

 

Request Type: POST

Request Headers:

 

Request Content:

 

 

 

Log:

Labels: (1)
0 Kudos
Reply
8 Replies
fhunth
Nintex Newbie

Re: Call HTTP Web Service: REST call to update an item

Jump to solution
0 Kudos
Reply
wimvdv
Nintex Newbie

Re: Call HTTP Web Service: REST call to update an item

Jump to solution

Hi Fernando,

Thanks for the feedback but the value I want to update is just a list column not a managed metadata field

0 Kudos
Reply
janeyres
Nintex Newbie

Re: Call HTTP Web Service: REST call to update an item

Jump to solution

Hi,

I found this link really helpful when I was doing this, How to execute a REST API request with Nintex Workflow

Jan

0 Kudos
Reply
wimvdv
Nintex Newbie

Re: Call HTTP Web Service: REST call to update an item

Jump to solution

I also found that info and it's definitely a good start, only this is for Nintex for O365 where the actions are different...

0 Kudos
Reply
Automation Master
Automation Master

Re: Call HTTP Web Service: REST call to update an item

Jump to solution
Reply
damien_l
Nintex Newbie

Re: Call HTTP Web Service: REST call to update an item

Jump to solution

Hi,

 

For updating an item the X-RequestDigest field is mandatory. Make a first web request on the url : Web URL/_api/contextinfo (POST / Content type : text/xml) and store result in a multiline text. Extract the digest value with an action Query XML on the result with XPATH /d:GetContextWebInformation/d:FormDigestValue. Now you have your digest value.

 

Make your second web request on the following URL : siteURL/_api/lists/workflowtasks/items(itemID)?$select=ID

And put all this headers for the POST method :

    - Accept: "application/json;odata=verbose"

    - Content-Type : "application/json;odata=verbose"

    - IF-MATCH : "*"

    - X-HTTP-Method : "MERGE"

    - X-RequestDigest : your digest value

 

Set the body of your request, for exemple :

     '__metadata': { 'type': 'SP.Data.WorkflowTasksItem' },

       'DueDate':newDueDate.toISOString()

View solution in original post

Reply
supermankelz
Nintex Newbie

Re: Call HTTP Web Service: REST call to update an item

Jump to solution

What would need to change to use this to update the Internal Name of the Name field within the current list that workflow is running on?  I can get the Request Digest Value but when attempting post it's failing.

{

'_metadata" : {'type' : {WorkflowVariable: ListItemEntityTypeFullName}'},

'FileLeafRef' : {ItemProperty:NewFolderName}

}

0 Kudos
Reply
Automation Master
Automation Master

Re: Call HTTP Web Service: REST call to update an item

Jump to solution

Hi,

Can you share the url of your query?

Regarding the body of your query :

  • there should be two underscore '_' before 'metadata'
  • you've added two single quotes after 'metadata' instead of one
  • a single quote is missing before your reference to your workflow variable ListItemEntityTypeFullName
  • you should add a single quote before and after your reference to your workflow variable NewFolderName

The body should look like this :

{

'__metadata' : {'type' : '{WorkflowVariable:ListItemEntityTypeFullName}'},

'FileLeafRef' : '{ItemProperty:NewFolderName}'

}

Hope this helps

0 Kudos
Reply