CRUD Control Group
This chapter provides a detailed guide on managing CRUD (Create, Read, Update, Delete) operations for control groups within OCS.io. It covers the necessary APIs and their usage for creating, retrieving, updating, and deleting control groups. The following sections are included:
-
Create Control Group: The
CreateControlGroup
API is used to create a new control group in OCS.io. This section details the required fields, request body, and the expected outcome of the API call. -
Get All Control Groups: The
GetAllControlGroups
API retrieves all control groups in OCS.io. This section provides the request format and the expected outcome, which is a list of all control groups. -
Get Control Group: The
GetControlGroup
API retrieves a specific control group by its refId. This section includes the request format and the expected outcome, which is the details of the specified control group. -
Update Control Group: The
UpdateControlGroup
API updates a specific control group in OCS.io. This section details the required fields, request body, and the expected outcome of the API call. -
Delete Control Group: The
DeleteControlGroup
API deletes a specific control group by its refId. This section provides the request format and the expected outcome, which is the deletion of the specified control group.
Each section provides detailed information on the respective API, including usage examples, parameters, and expected responses. This guide aims to equip developers with the knowledge and tools necessary to effectively manage control groups within OCS.io.
Create Control Group
Fields Required for Creation new Control Group
The following table lists and describes the fields required to create a control group:
Field | Description |
---|---|
name |
Name of the Control Group. |
description |
Description of the Control Group. |
internalCode |
Internal Code of the Control Group. |
Request Body for Creation of new Control Group
{
"name": "control_group_name",
"description": "control_group_description",
"internalCode": "internal_code"
}
The outcome of the API call is as follows:
-
A new Control Group is created with the provided name, description, and internal code.
-
The system generates a unique refId for the new Control Group.
Detailed API documentation and endpoint specifics are available here. |
Get All Control Groups
Request for Retrieving All Control Groups
curl -X GET "https://api.ocs.io/crud/v1/control-groups" -H "accept: application/json"
The outcome of the API call is as follows:
-
A list of all Control Groups in the system is returned.
Detailed API documentation and endpoint specifics are available here. |
Get Control Group
The GetControlGroup
API is used to retrieve a specific control group in OCS.io.
Request for Retrieving a Specific Control Group
curl -X GET "https://api.ocs.io/crud/v1/control-groups/{refId}" -H "accept: application/json"
The outcome of the API call is as follows:
-
The details of the Control Group with the provided refId are returned.
Detailed API documentation and endpoint specifics are available here. |
Update Control Group
Fields Required for Updating Control Group
The following table lists and describes the fields required to update a control group:
Field | Description |
---|---|
name |
Name of the Control Group. |
description |
Description of the Control Group. |
internalCode |
Internal Code of the Control Group. |
Request Body for Updating a Control Group
{
"name": "control_group_name",
"description": "control_group_description",
"internalCode": "internal_code"
}
The outcome of the API call is as follows:
-
The Control Group with the provided refId is updated with the new name, description, and internal code.
Detailed API documentation and endpoint specifics are available here. |
Delete Control Group
Request for Deleting a Specific Control Group
curl -X DELETE "https://api.ocs.io/crud/v1/control-groups/{refId}" -H "accept: application/json"
The outcome of the API call is as follows:
-
The Control Group with the provided refId is deleted from the system.
Detailed API documentation and endpoint specifics are available here. |