How to use UiPath Cloud Orchestrator API?

How to use UiPath Cloud Orchestrator API?

UiPath authentication is more secured with platform.uipath.com becoming a cloud service. This means that the earlier UiPath endpoint – Authenticate (tenancyName, username & password), will not work anymore.  
 
First an access_token needs to be acquired, following the procedure listed in the Orchestrator guide from here
 
Once the token is acquired, it needs to be included in the Authorization parameters: Bearer [access_token] & X-UIPATH-TenantName: [service_instance_logical_name] in header.

The token, ids & logical name can be get from Cloud Orchestrator Service. Please find the screenshot below: