Sorry I haven't read the last version of your post .
Have you tried to get and then upload the file content using this web request:
http://site url/_api/web/lists/getbytitle('list title')/items(item id)
/
AttachmentFiles('file name')/$value
Thank you for the quick response, Caroline. I think I am getting close with the documents you have sent me, but I am really new to REST (I hadn’t even heard of it before last Friday). How do I “translate” this into the Web Request action of a Nintex workflow? How do I get “content-length”?
Actually this web request works without "content-length" header.
Do you use Nintex for O365 or for SharePoint?
We are using Nintex for SharePoint.
I used the links you sent to retrieve the attachment using the /$value, and saved it to a string variable. When I tried to do the POST Web request using that variable and the /$value, it gave me an error that the Uri string is too long. When I retrieve the attachment, should I be saving it to a string variable or doing something else with it when it is returned?
I can’t tell you how much I appreciate you helping me with this. Thank you!
If you get an error regarding a too long url, then you need to increase the maxUrlLength attribute of httpRuntime element in the web.config of the SharePoint web application executing your workflow (if the workflow is scheduled it's the
OWSTIMER.EXE.config instead of the web.config): https://msdn.microsoft.com/en-us/library/e1f13641(v=vs.100).aspx.
The string variable should be ok to store the attachment content.
Hope this helps
Hey,
Thanks a lot for this post.
Any idea to call a API with a OAuth authentication ?
Thanks,
Damien
Caroline, I have read this thread with great interest. I've have been trying to get the "accept-language" header value in workflow using the Web Call action with no success. We need to use the result to set the language for labels on task forms and notifications. I must be missing something simple. My response contains no reference to the "accept-language" header.
Any suggestions?
-Ken
Hi Ken,
It seems that SharePoint REST API calls don't return any accept-language header.
What do you want to do exactly? Maybe we can find a workaround...
Thanks Caroline, but we decided to scrap the function involved.
Regards,
Ken
Hi Caroline,
Thank you for the nice blog. I have followed all the steps to update a document in library. The REST API call to fetch the item was excuted without any error. But I don't see that column s are updated. No error in the logs as well.
The body looks like as follows. None of the column is updated.
'__metadata' : { 'type' : '{WorkflowVariable:ListName}'},
'Textcolumn' : 'Complete',
'choicecolumn' : 'No',
'Date Column' : '{Common:CurrentDate}'
}
Any help?
Hi Rashmi,
Can you share the url that you're using to perform the request?
Hi Caroline,
I am looking for help to understand the chekcout, update and checkin REST API calls for a document in the document library.
1. I want to know how do we overide the checkout. I am using a site collection workflow. Does the just checkout REST API call will override the checkout?
2. I am checking out the document and updating the metadata using update REST API and checkin using REST API.
But I don't see the meta data is getting updated.
If I use only UPDATE REST API without any checkout and checkin, it works - metadata gets updated
Any idea about this behavior. What should I be doing to update the metadata along with checkout and checkin. I should be able to update the document from the workflow even if it is already checked out.
Thanks
Rashmi
Hi Rashmi,
Unfortunately, I haven't worked so far with check-in and check-out REST API calls.
I'm afraid I can't help you a lot with that.
Did you finally get a solution?
Hi Caroline,
I was able to resolve the check out and check in requirements using REST API calls. Here is the example for the REST API URL,
Checkout -
{WorkflowVariable:WebURL}/_api/web/GetFileByServerRelativeUrl('/sites/WorkflowVariable:ServerRealtiveURLofPage}')/CheckOut()
Update Item by REST API
Checkin - {WorkflowVariable:WebURL}/_api/web/GetFileByServerRelativeUrl'/sites/WorkflowVariable:ServerRealtiveURLofPage}')/CheckIn(checkintype=1)
Great
Thanks for sharing this !
Hi Caroline,
I'm getting an issue during GET operation stating : Workflow Status
Below is the screen shot of the configuration which I did to achieve the same.
Please let me know what I'm doing wrong here.
Regards,
Akram
Hi Akram,
I think that this error is related to server/network configuration. If you try to execute this request directly from the SharePoint server, I think that you will get the same error.
Does the SharePoint farm have multiple front servers? If yes, is there a load balancer?
The better way to solve this issue is to check with an administrator in the event viewer of the SharePoint server if there are more details.
Hope this helps,
Caroline
Hi Caroline, I am working on a web request to the REST API that will update a Hyperlink Column. I went through all of the steps that both you and Tomasz laid out SAML Request, Response Message, but there's no BinaryRequestToken element in the response.
SAML RESPONSE
So I tried grabbing the innerXML from the X509SKI element instead. Sent that in and get the Response Headers back. The I log them all out to find the Cookie Header (which accoring to Tomaz is Index Item #6) and it's not there. Is this solution still valid?
Thanks,
Mario
Hi Mario,
I'm afraid I can't help with that but I'm sure that can
What env. are you working in? I see a SPO term in your screenshots, so possibly this is O365
This is not a BinaryRequestToken, but BinarySecurityToken:
Try to post your SAML Request Security Token using Postman for example, to see the response. I just did it and I've been received that token.
Also using Postman you will have the possibility to preview, whether this way of authentication is even allowed - I have access to three tenants, on two of them this is disallowed. Possibly because of some policy settings or MFA.
Regards,
Tomasz
Thanks Tomasz,
The client has a dedicated Office 365 tenant and they indeed have MFA enabled. Thanks for the reply I will pass this along.
Mario
Hi Caroline,
I need your help please. I wanted to update the datefield, but its throwing some error
{
"__metadata": { "type": getItemTypeForListName(listName) },
"Title": "firsdt",
"ApplicatinDate" : "{ItemProperty:ApplicationDate}"
}
i tried converting iso format and assign it, but in vein
{
"__metadata": { "type": getItemTypeForListName(listName) },
"Title": "firsdt",
"ApplicatinDate" : "{WorkflowVariable:ISOConvertedDate}"
}
getting below error
Pelase suggest to me how to save date field and person or group
Hi Vijay,
Can you send me the complete error message? In the workflow, you can send you an email with the error message in the body and set the body to be in plain text instead of rich text.
To update a date column, the json should look like this :
'StartDate':'2014-01-29T08:00:00Z'
Can you send me the value of the variable "ISOConvertedDate"?