I am wondering if it is possible to add an existing content type to a document library using the SharePoint Send HTTP Request? I have a flow that gets a list of new sites, and I would like to automatically cycle through those and add a content type to their default document library.
If this is not possible, is it possible to add an existing managed metadata column to a document library using the Send HTTP Request?
Thanks for the help. Always appreciated.
If the content type already exists on the site and on the library the management of content types is allowed you could use the addavailablecontenttype method to add it.
Below is an example of that:
It might be possible via the uniqueContentTypeOrder method:
But I haven't tried that myself to be honest.
Has anyone recently been able to add content types using addavailablecontenttypes rest api ?
Looks like this will no longer works since microsoft has updated the way content types are now published and pulled(On-Demand) instead of pushed to all site collections.
Is there a new rest api that can be used now to add a content type from content type hub to a list or library ?
Just retested my previous setup. Does not look like it is working anymore.
However, it does look like there is a new method which you can use in a $batch with the v2.1 API, addCopyFromContentTypeHub
Thank you very much for pointing that out. Yes, I saw the same in the network trace but I was not able to look at the Request part of the trace. May be I will have to use a different tool other than developer tools in Edge.
Let me test it out, hopefully this will resolve my concern.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.