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

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
Highlighted
Community Support
Community Support

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

4 REPLIES 4
Highlighted
Community Support
Community Support

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

Highlighted
Frequent Visitor

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

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

 

Highlighted
Community Support
Community Support

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.
Highlighted
Helper I
Helper I

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

Hi, I am hoping you can help me with a similar issue I am having 

 

library: Pictures 

column: thumbnail 

 

here's my error - 

{

  "error": {

    "code": 500,

    "source": "flow-apim-msmanaged-na-centralus-01.azure-apim.net",

    "clientRequestId": "46fa3dfd-a726-4cf4-a04c-bceb870fc41b",

    "message": "BadGateway",

    "innerError": {

      "status": 500,

      "message": "The format of value 'application/json;\nodata=verbose' is invalid.\r\nclientRequestId: 46fa3dfd-a726-4cf4-a04c-bceb870fc41b",

      "source": "sharepointonline-ncus.azconn-ncus.p.azurewebsites.net"

    }

  }

}

 

 

FlowError.PNG

 

 

 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (6,146)