Calibration groups

This page helps understand how to create new calibration groups, modify existing ones, and fetch all the existing ones from a workspace.

Quickstart

Before invoking the APIs, the client must obtain the clientId and auth token from Deepen AI. If you are a calibration admin, you can create different Access Tokens using the UI and use those instead. clientId is part of the path parameters in most API calls, and the auth token should be prefixed with “Bearer “ and passed to the ‘Authorization’ header in all API requests. How to get Access Tokens can be found on the following link: Access token for APIs

Create a new Calibration Group

This POST api sends the user-provided calibration group name to the server to create a new calibration group and returns calibration_group_name and calibration_group_id.

https://tools.calibrate.deepen.ai/api/v2/external/clients/{clientId}/calibration_group/create

Request

Path parameters

Parameter nameParameter typeDescription

clientId

string

ClientId obtained from Deepen AI

Body

KeyValueDescription

calibration_group_name

string

Name of the calibration group

Response

{
    "calibration_group_name": "demo",
    "calibration_group_id": "XXXXXXXXXXXXXXXXX"
}
KeyDescription

calibration_group_name

Name of the calibration group created

calibration_group_id

A unique value to identify the calibration group. calibration_group_id can be used to add new datasets to the group.

Code snippets

Python

import requests

# workspaceId can be found in the deepen calibration url
workspaceId = ''

# Provide the access token from the deepen calibration website.
# For more information about access tokens, please visit: https://help.deepen.ai/documentation/calibration/api-documentation/access-token-for-apis
authToken = ''

#name of the calibration group to be created.
calibration_group_name = ''

url = 'https://tools.calibrate.deepen.ai/api/v2/external/clients/'+workspaceId+'/calibration_group/create'

payload = {'calibration_group_name': calibration_group_name}
headers = {
  'Authorization': 'Bearer '+authToken
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

cURL

curl --location 'https://tools.calibrate.deepen.ai/api/v2/external/clients/{client_id}/calibration_group/create' \
--header 'Authorization: Bearer {auth_token}' \
--form 'calibration_group_name="group_name"'

Modify existing Calibration Group

This POST api updated the name of the calibration group associated with the calibration_group_id and returns calibration_group_name, calibration_group_id, and calibration_ids

https://tools.calibrate.deepen.ai/api/v2/external/clients/{clientId}/calibration_group/modify

Request

Path parameters

Parameter nameParameter typeDescription

clientId

string

ClientId obtained from Deepen AI

Body

KeyValueDescription

calibration_group_id

string

Id of the calibration group to update

calibration_group_name

string

New name for the calibration group associated with the calibration_group_id

Response

{
    "calibration_group_name": "demo",
    "calibration_group_id": "XXXXXXXXXXXXXXXXX",
    "calibration_ids": [
        "XXXXXXXXXXXXXXXXX",
        "XXXXXXXXXXXXXXXXX"
    ]
}
KeyDescription

calibration_group_name

Updated name of the calibration group associated with the provided calibration_group_id

calibration_group_id

Data provided by the user in the request.

calibration_ids

List of calibrations (datasets) in the calibration group with the user-provided calibration_group_id in the request.

Code snippets

Python

import requests

# workspaceId can be found in the deepen calibration url
workspaceId = ''

# Provide the access token from the deepen calibration website.
# For more information about access tokens, please visit: https://help.deepen.ai/documentation/calibration/api-documentation/access-token-for-apis
authToken = ''

#id of the calibration group to be updated.
calibration_group_id = ''

url = 'https://tools.calibrate.deepen.ai/api/v2/external/clients/'+workspaceId+'/calibration_group/modify"

payload = {'calibration_group_id': calibration_group_id,
'calibration_group_name': 'new name for the calibration group'}

headers = {
  'Authorization': 'Bearer '+authToken
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

cURL

curl --location 'https://tools.calibrate.deepen.ai/api/v2/external/clients/{client_id}/calibration_group/modify' \
--header 'Authorization: Bearer {auth_token}' \
--form 'calibration_group_id="group_id"' \
--form 'calibration_group_name="new name for the calibration group"'

Fetch existing calibration group details

This GET api fetches existing calibration group details. Returns list of groups with details calibration_group_id, calibration_group_name and calibration_ids

https://tools.calibrate.deepen.ai/api/v2/external/clients/{client_id}/calibration_groups

Request

Path parameters

Parameter nameParameter typeDescription

clientId

string

ClientId obtained from Deepen AI

Response

{
    "groups": [
        {
            "calibration_group_id": "xxxxxxxxxxxxx1",
            "calibration_group_name": "xxxxxxxx1",
            "calibration_ids": []
        },
        {
            "calibration_group_id": "xxxxxxxxxxxxx2",
            "calibration_group_name": "xxxxxxxx2",
            "calibration_ids": []
        },
        {
            "calibration_group_id": "xxxxxxxxxxxxx3",
            "calibration_group_name": "xxxxxxxx3",
            "calibration_ids": [
                "xxxxxxxxxx1",
                "xxxxxxxxxx2",
                "xxxxxxxxxx3"
            ]
        }
    ]
}
KeyDescription

calibration_group_name

Name of the calibration group

calibration_group_id

A unique value to identify the calibration group. calibration_group_id can be used to add new datasets to the group.

calibration_ids

List of calibrations (datasets) in the calibration group for the corresponding calibration_group_id.

Code snippets

Python

import requests

# workspaceId can be found in the deepen calibration url
workspaceId = ''

# Provide the access token from the deepen calibration website.
# For more information about access tokens, please visit: https://help.deepen.ai/documentation/calibration/api-documentation/access-token-for-apis
authToken = ''

#id of the calibration group to be updated.
calibration_group_id = ''

url = 'https://tools.calibrate.deepen.ai/api/v2/external/clients/'+workspaceId+'/calibration_groups"

headers = {
  'Authorization': 'Bearer '+authToken
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

cURL

curl --location 'https://tools.calibrate.deepen.ai/api/v2/external/clients/{client_id}/calibration_groups' \
--header 'Authorization: Bearer {auth_token}'

Last updated