0

I have a SharePoint 2013 workflow for a list in an SPO site that uses an HTTP web service request to grab list items.

I am getting a System.UriFormatException error that states: Invalid URI: The URI scheme is not valid. I added a step to write the URI being used to the workflow history, and it's definitely a valid URI.

In the string builder, this is my URI:

[%Workflow Context: Current Site URL%]_api/web/lists/getbytitle('Team%20Members')/items?$filter=TeamId%20eq%20[%Variable: TeamID%]

The URL logged to the workflow history looks like this:

https://domain.sharepoint.com/teams/teamsite/_api/web/lists/getbytitle('Team%20Members')/items?$filter=TeamId%20eq%207

If I navigate to that URL in my browser, it returns the correct data, so it looks like the URL is correct. If this is the case, why am I getting this invalid URI error?

  • Try specifying select parameters if you have any lookup columns, might resolve the issue. – Amit Jul 25 '17 at 15:53
0

I had the same issue: my REST URL worked fine in the browser, but I received the workflow error "The URI scheme is not valid".

Here is my REST URL: [%Variable: Current Site URL%]_api/web/lists/getbytitle('Some Documents')/items?$filter=Form_x0020_Status eq 'Approvals'

Re-visiting the actual web service call, I found that I had accidentally put the workflow variable "requestHeaders" as the value for "RequestContent". It should have been the value for "RequestHeaders".

The winning combination in the properties box named "Call HTTP Web Service Properties" was:

Parameters for "[this]"

Address - [%Variable: MyRESTURL%]

RequestType - HTTP GET

RequestHeaders - Variable: requestHeaders

Parameters for "[request]"

RequestContent

Parameters for "[response]"

ResponseContent - Variable: responseContent

Parameters for "[responseHeaders]"

ResponseHeaders

Parameters for "[responseCode]"

ResponseStatusCode - Variable: responseCode

Note that the three variables, requestHeaders, responseContent, and responseCode are of type "dictionary".

The contents of requestHeaders, assigned immediately before the web service call, are:

Name: Accept, Type: String, Value: application/json;odata=verbose

Name: Content-Type, Type: String, Value: application/json;odata=verbose

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.