I have recently received a request from a customer to break the inherited permissions of a SharePoint document library folder, as of now there is no Power Automate action to break the permission of a folder but with the action Send an HTTP request to SharePoint you can call any SP REST API endpoint. Then I started exploring the Rest API endpoint to break the permission, have found the API endpoint
_api/lists/getbytitle(‘Documents’)/items(itemID)/breakroleinheritance()
I was trying to understand the method breakroleinheritance() in the endpoint and its parameters. This method passes two Boolean parameters, copyRoleAssignments and clearSubScopes.
- copyRoleAssignments parameter specifies whether to maintain the current role assignments already inherited from the parent site collection or Web site or List/Library,
- clearSubScopes parameter specifies whether to clear unique permissions of child objects so that they will subsequently inherit permissions from the parent Web site or list
So how to know that the method breakroleinheritance() accepts two parameters
- Documentation from Microsoft
- API Metadata document
The metadata document ($metadata) is published at the service root for SharePoint & Graph API (v1.0 & beta versions). It describes about endpoints, methods, parameters, properties, associations etc
SharePoint Online API Metadata:
To access the metadata document for SharePoint REST service, hit the following URL from the browser after authentication
https://yourdomain.sharepoint.com/sites/sitename/_api/$metadata
The response to the request will be an XML document. If I search on the XML file for breakroleinheritance, I found the following information

It will not give you information about the HTTP method [GET, POST, PUT etc] to use but it will provide you some insights on the API metadata. I understand it is difficult to search the XML document, a big shout out to Sergei Sergeev who has created an excellent project SharePoint REST API Metadata Explorer to handle the difficulty. Find the link below to access the project
https://s-kainet.github.io/sp-rest-explorer
As per the information on the project, the metadata is getting updated daily.
MS Graph API Metadata:
To access the metadata document for MS Graph service, make a GET request in MS Graph Explorer to the following URL based on the versions you would like to get the metadata
Microsoft Graph API v1.0 metadata
https://graph.microsoft.com/v1.0/$metadata
Microsoft Graph API beta metadata
https://graph.microsoft.com/beta/$metadata

The response metadata will be in JSON.
Reference: https://docs.microsoft.com/en-us/graph/traverse-the-graph
Hope this helps someone. Sharing is Caring.