This document provides guidelines on how to perform Create, Read, Update, and Delete (CRUD) operations with Copyl Integration Platform using API keys .
Authentication and Authorization
Setup Copyl Integration Platform in your API (.Net)
https://copyl.developer.azure-api.net/api-details#api=copyl-microservices-api
The API key should be included in the request headers for authentication. Below is an example of how to include it:
Authorization: ApiKey <Your API Key>
****Ocp-Apim-Subscription-Key: <Subscription Key>
EnterpriseId: <Enterprise GUID>
Your organization’s keys are listed here: https://app.copyl.com/en/itops/secrets
To create a new resource, send a POST request with the required payload.
POST /integrations HTTP/1.1
Host: <https://api.copyl.com/ms/Environments>
Authorization: ApiKey <Your API Key>
Ocp-Apim-Subscription-Key: <Subscription Key>
EnterpriseId: <Enterprise GUID>

To retrieve a resource, send a GET request. For example if you want to get all the Environments:
GET /integrations HTTP/1.1
Host: <https://api.copyl.com/ms/Environments>
Authorization: ApiKey <Your API Key>
Ocp-Apim-Subscription-Key: <Subscription Key>
EnterpriseId: <Enterprise GUID>

To update an existing resource, send a PUT request with the payload and resource id to be updated.
PUT /integrations HTTP/1.1
Host: <https://api.copyl.com/ms/Environments/{id}>
Authorization: ApiKey <Your API Key>
Ocp-Apim-Subscription-Key: <Subscription Key>
EnterpriseId: <Enterprise GUID>


To delete a resource, send a DELETE request with the resource ID.
DELETE /integrations HTTP/1.1
Host: <https://api.copyl.com/ms/Environments/{id}>
Authorization: ApiKey <Your API Key>
Ocp-Apim-Subscription-Key: <Subscription Key>
EnterpriseId: <Enterprise GUID>

Common API errors include:
| Status Code | Description |
|---|---|
| 400 | Bad Request - The request contains invalid input parameters |
| 401 | Unauthorized - Authentication failed due to invalid API key |
| 403 | Forbidden - The API key lacks sufficient permissions |
| 404 | Not Found - The requested resource does not exist |
| 500 | Internal Server Error - Something went wrong on our servers |