Overview

This document provides guidelines on how to perform Create, Read, Update, and Delete (CRUD) operations with Copyl Integration Platform using API keys .

Prerequisites

See Also

Authentication and Authorization

Setup Copyl Integration Platform in your API (.Net)

https://copyl.developer.azure-api.net/api-details#api=copyl-microservices-api

Authentication

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

Here is a document explaining details of authentication and authorization when calling copyl integration platform.

CRUD Operations Examples on Environments

1. Create (POST)

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>

image.png

2. Read (GET)

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>

image.png

3. Update (PUT)

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>

image.png

image.png

4. Delete (DELETE)

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>

image.png

Error Handling

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

Best Practices