create_glossary

CatalogApi.create_glossary(role_id, content_type=None, action=None, create_glossary_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Create a glossary or start bulk upload

Without action, creates a single glossary and makes the caller its owner; a request body is required. With action=get-presigned-url, returns an upload URL for a bulk-upload JSON file and reads no body. With action=upload-glossaries, starts background creation from the uploaded file and requires a body containing S3Key.

Parameters:
  • role_id (str) – User role id (required)

  • content_type (str) – Must be application/json when a request body is sent.

  • action (str) – Omit to create a single glossary. Use get-presigned-url to obtain an upload URL, then upload-glossaries to start bulk creation from it.

  • create_glossary_request (CreateGlossaryRequest) – Required when creating a single glossary, and when action=upload-glossaries. Not required for action=get-presigned-url.

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

CreateGlossary200Response

Returns:

Returns the result object.

Request and Response Examples

HTTP: POST /glossaries

Request

Required when creating a single glossary, and when action=upload-glossaries. Not required for action=get-presigned-url.

The request body is optional.

Create a glossary

{
  "GlossaryName": "CustomerMetrics",
  "Description": "Business terms for customer analytics"
}

action=upload-glossaries, after uploading the JSON to the presigned URL

{
  "S3Key": "glossaries/bulk-upload/jdoe_1785146328_glossaries.json"
}

Success (HTTP 200)

Returns the new glossary’s identifier when creating a single glossary, an upload URL and file key for action=get-presigned-url, or confirmation that bulk creation has started for action=upload-glossaries.

action=upload-glossaries

{
  "Message": "Successfully triggered bulk upload of glossaries."
}

Errors

Documented error codes: IPV-1008, GE-1034, IPV-1001, GE-1020.

HTTP 400

Invalid input glossary body

Required fields omitted

{
  "Message": "IPV-1008 - Invalid request body, missing key(s) - {'GlossaryName', 'Description'}"
}

A supplied field is blank

{
  "Message": "GE-1034 - Description cannot be empty"
}

S3Key omitted on bulk upload

{
  "Message": "IPV-1001 - Parameter S3Key is a required value."
}

HTTP 500

Something went wrong at backend

Request / response example

{
  "Message": "GE-1020 - Unable to update Glossary table, please retry or contact administrator"
}