Manage Control Group
This chapter provides a detailed guide on managing control groups within OCS.io. It covers the necessary APIs and their usage for adding, removing, and retrieving accounts in control groups. The following sections are included:
-
Add To Control Group: The
AddToControlGroup
API is used to add accounts to a specific control group in OCS.io. This section details the required fields, request body, and the expected outcome of the API call. -
Remove From Control Group: The
RemoveFromControlGroup
API is used to remove accounts from a specific control group in OCS.io. This section provides the request format and the expected outcome, which is the removal of specified accounts from the control group. -
Get All Accounts Belonging to Control Group: The
GetAccountsByControlGroup
API retrieves all accounts belonging to a specific control group in OCS.io. This section includes the request format and the expected outcome, which is a list of all accounts in the specified control group. -
Get All Control Groups where Account is Member: The
GetControlGroupsByAccount
API retrieves all control groups where a specific account is a member in OCS.io. This section details the request format and the expected outcome, which is a list of all control groups containing the specified account. 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.
Add To Control Group
Fields Required for Adding Account to Control Group
The following table lists and describes the fields required to add accounts to a control group:
Field | Description |
---|---|
controlGroup |
Internal Code of the previously created Control Group |
accounts |
List of Account’s IDs to add to Control Group |
validFrom |
Date/Time from when Accounts are assigned to Control Group, if NULL validity is aligned with request Date/Time. |
Detailed API documentation and endpoint specifics are available here. |
Request Body for Adding Account to Control Group
{
"requestId": "{{$guid}}",
"controlGroup": "control_group_code",
"accounts": ["account_ref_id_1", "account_ref_id_2"],
"validFrom": "2024-05-01T00:00:00+02:00"
}
The outcome of the API call is as follows:
-
The specified accounts identified by account Ref IDs are added to the Control Group with the provided internal code.
Remove From Control Group
Fields Required for Removing Account from Control Group
The following table lists and describes the fields required to remove accounts from a control group:
Field | Description |
---|---|
controlGroup |
Internal Code of the previously created Control Group. |
accounts |
List of Account’s IDs to remove from Control Group. |
validFrom |
Date/Time from when Accounts are removed from Control Group, if NULL validity is aligned with request Date/Time. |
Detailed API documentation and endpoint specifics are available here. |
Request Body for Removing Account from Control Group
{
"requestId": "{{$guid}}",
"controlGroup": "control_group_code",
"accounts": ["account_ref_id_1", "account_ref_id_2"],
"validFrom": "2024-05-01T00:00:00+02:00"
}
The outcome of the API call is as follows:
-
The specified accounts are removed from the Control Group with the provided internal code.
Get All Accounts Belonging to Control Group
Request for Retrieving All Accounts Belonging to Control Group
curl -X GET "https://api.ocs.io/crud/v1/control-groups/{control_group_ref_id}/accounts" -H "accept: application/json"
The outcome of the API call is as follows:
-
A list of all Accounts belonging to the specified Control Group in the system is returned.
Detailed API documentation and endpoint specifics are available here. |
Get All Control Groups where Account is member
Request for Retrieving All Control Groups where Account is a Member
curl -X GET "https://api.ocs.io/crud/v1/control-groups/accounts?externalId={account_external_id}" -H "accept: application/json"
The outcome of the API call is as follows:
-
A list of all Control Groups where the specified Account is a member is returned.
Detailed API documentation and endpoint specifics are available here. |