cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Umberto
Level: Powered On

Send an HTTP request to SharePoint for a to create a subsite

Hi people,

i need to create a Flow that will create a subsite. I used the Send an HTTP request to SharePoint  Action with this setup:

2018-12-13 12_06_59-Edit your flow _ Microsoft Flow.png

 

 

 

But i recive back thi error:

 

{
  "message": "Cannot find a supported MIME type corresponding to the content type of the response. No type supported 'application/json;odata=minimalmetadata;streaming=true, application/json;odata=minimalmetadata;streaming=false, application/json;odata=minimalmetadata, application/json;odata=fullmetadata;streaming=true, application/json;odata=fullmetadata;streaming=false, application/json;odata=fullmetadata, application/json;odata=name;streaming=true, application/json;odata=name;streaming=false, application/json;odata=name, application/json;streaming=true, application/json;streaming=false, application/json;odata=verbose, application/json' corresponds to the type of content 'application/jason; odata=verbose'.\r\nclientRequestId: d8b938b0-f8dc-40a1-8217-4f3c8b37e638\r\nserviceRequestId: 0697ab9e-b028-7000-8bb8-5b27478c6abc",
  "Status: 400,
  "source": "my url/Management%20projects/_api/web/webinfos/add",
  "errors: [
    "-1",
    "Microsoft.Data.OData.ODataContentTypeException"
  ]
}
Any suggestions?
Thank you
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Send an HTTP request to SharePoint for a to create a subsite

Hi @Umberto,

 

I noticed an error in the "Accept" and "Content-Type" of your Headers configuration. You seem to have configured json as jason.

Try verifying the errors on these formats first and checking if the error still exists.

I did a test on my side, you could use it for reference.

Uri:

/_api/web/webinfos/add

Headers:

Accept : application/json;odata=verbose

Content-Type : application/json;odata=verbose

Body:

 

{ 
   'parameters':{ 
      '__metadata':{ 
         'type':'SP.WebInfoCreationInformation'
      },
      'Url':'Test1',
      'Title':'Test1',
      'Description':'My Description',
      'Language':'1033',
      'WebTemplate':'STS#0',
      'UseUniquePermissions':false
   }
}

 Image reference:

27.PNG28.PNG

Please take a try again.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Send an HTTP request to SharePoint for a to create a subsite

Hi @Umberto,

 

I noticed an error in the "Accept" and "Content-Type" of your Headers configuration. You seem to have configured json as jason.

Try verifying the errors on these formats first and checking if the error still exists.

I did a test on my side, you could use it for reference.

Uri:

/_api/web/webinfos/add

Headers:

Accept : application/json;odata=verbose

Content-Type : application/json;odata=verbose

Body:

 

{ 
   'parameters':{ 
      '__metadata':{ 
         'type':'SP.WebInfoCreationInformation'
      },
      'Url':'Test1',
      'Title':'Test1',
      'Description':'My Description',
      'Language':'1033',
      'WebTemplate':'STS#0',
      'UseUniquePermissions':false
   }
}

 Image reference:

27.PNG28.PNG

Please take a try again.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Umberto
Level: Powered On

Re: Send an HTTP request to SharePoint for a to create a subsite

There was a json formatting error... Smiley Happy Now it's working!Solved.jpg

 

Highlighted
Community Support Team
Community Support Team

Re: Send an HTTP request to SharePoint for a to create a subsite

Hi @Umberto,

 

If my reply solves your problem, please mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 120 members 3,211 guests
Please welcome our newest community members: