Create Table Group

Creates a new table group. This operation requires administrator privileges.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

POST /api/sonar/table-groups

cURL Example

curl -H "Authorization: Bearer <API_KEY>" \
     -d name="table_example" \
     -d description="Table example group" \
     -d parent_guid="54157629-74f7-4d80-be5a-8cb8f0c71087" \
     -X POST "https://HOSTNAME/api/sonar/table-groups"

Request Parameters

KeyRequiredTypeDescriptionNotes
nameYesStringTable group nameMinimum 1 to maximum 50 characters
descriptionNoStringTable group descriptionMaximum 2,000 characters
guidNoStringTable group identifier36-character GUID. Randomly generated if not specified
parent_guidNoStringParent table group GUID36-character GUID

Success Response

{
  "guid": "0157fda0-15ed-49f5-acd8-e0ada14c196a"
}

Error Responses

guid is not in GUID format

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
name parameter is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "name should be not null"
}
name parameter length is invalid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'name' must be 1 to 50 characters, alphanumeric or underscore characters only, and must not start with a number"
}
description parameter length is invalid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'description' must be shorter than or equal to 2000 characters."
}
parent_guid is not in GUID format

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "parent_guid should be guid type."
}
name is duplicated

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "duplicated-name [name: table_example]"
}
parent_guid not found

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "parent-table-group-not-found [guid: 54157629-74f7-4d80-be5a-8cb8f0c71087]"
}
Permission denied

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}