cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MrAl
Frequent Visitor

Creating a Flow to create subsite using a template - Send an HTTP Request to Sharepoint

I have a Flow with the "Send an HTTP Request to SharePoint" action where I need to create a subsite using a custom template.  When I test it, I get the following error:

{
"message": "Invalid JSON. More than one value was found at the root of the JSON content. JSON content can only have one value at the root level, which is an array, an object or a primitive value.\r\nclientRequestId: bb846147-95bd-4190-8e97-616c870d2e8a\r\nserviceRequestId: 9a12109f-b0fd-a000-89f2-6cced1f9e6b7",
"status": 400,
"source": "https://xxxxxxx.sharepoint.com/sites/xxxxxxxx/_api/web/webinfos/add",
"errors": [
"-1",
"Microsoft.Data.OData.ODataException"
]
}

 

Here's the info I'm sending:
Method: Post
Uri: /api/web/webinfos/add
Headers:
{
"Accept":"application/json;oData=verbose",
"Content-Type":"application/json;oData=verbose"
}
Body:
{ 'parameters':
{ '__metadata':
{ 'type': 'SP.WebInfoCreationInformation' },
'Url':'test',
'Title':'test',
'Description':'test',
'Language':'1033',
'WebTemplate':'{5DE10BE9-0119-4B26-B630-5B35D969F4FB}#Test Template',
'UseUniquePermissions':false
}
}​

 

Any ideas? TIA

1 ACCEPTED SOLUTION

Accepted Solutions
MrAl
Frequent Visitor

Weird...I deleted the body of the json and re-typed it, now it works.  Must have had something extra in there that I didn't see.

 

All is good, carry on.

View solution in original post

1 REPLY 1
MrAl
Frequent Visitor

Weird...I deleted the body of the json and re-typed it, now it works.  Must have had something extra in there that I didn't see.

 

All is good, carry on.

View solution in original post

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (47,926)