Access to all the endpoints requires passing an Authorization header. Two methods of authorization are supported:
Bearer token in the Authorization header.Authorization header and provide the EnterpriseId header for verification. The API Key will impersonate a selected User in Copyl.Both methods require correct configuration to ensure successful access. Each approach is described below in detail.
Endpoint: Get All Integrations
/integrationsGETAuthorization: Bearer <JWT token> or ApiKey <API Key>Ocp-Apim-Subscription-Key: API Management subscription keyEnterpriseId: (Required for API Key authentication) The unique identifier of the enterprise in GUID format.GET /integrations HTTP/1.1
Host: [<https://api.copyl.com/ms/Integrations>](<https://copylservicesapi.delightfulflower-7dbed4bd.westeurope.azurecontainerapps.io/Integrations>)
[](<https://copylservicesapi.delightfulflower-7dbed4bd.westeurope.azurecontainerapps.io/>)Authorization: Bearer <JWT Token>
Ocp-Apim-Subscription-Key: <Subscription Key>
GET /integrations HTTP/1.1
Host: [<https://api.copyl.com/ms/Integrations>](<https://copylservicesapi.delightfulflower-7dbed4bd.westeurope.azurecontainerapps.io/Integrations>)
Authorization: ApiKey <Your API Key>
Ocp-Apim-Subscription-Key: <Subscription Key>
EnterpriseId: <Enterprise GUID>
The JWTandApiKeyAuthorization filter validates the authorization header. The validation process differs based on whether a JWT or API Key is provided:
Authorization: Bearer <JWT Token>.IsValidToken().AuthStatus: Authorized and storeAccessiblity: Authorized are added to the response.Authorization: ApiKey <API Key>.EnterpriseId header must also be included, containing the GUID of the enterprise.EnterpriseId by checking cached enterprise data or querying the enterprise service if not cached.AuthStatus: Authorized and storeAccessiblity: Authorized headers are appended.In case of authentication failures, the API returns an appropriate error message in JSON format: