from metadata.sdk import configurefrom metadata.sdk.entities import Classificationsfrom metadata.generated.schema.api.classification.createClassification import CreateClassificationRequestconfigure( host="https://your-company.getcollate.io/api", jwt_token="your-jwt-token")request = CreateClassificationRequest( name="Certification", description="Certifying Data Asset will provide the users with a clear idea of...", mutuallyExclusive=True)classification = Classifications.create(request)print(f"Created: {classification.fullyQualifiedName}")
Copy
Ask AI
{ "id": "06d90883-6be9-4f7e-9475-753f10a95e94", "name": "Certification", "fullyQualifiedName": "Certification", "description": "Certifying Data Asset will provide the users with a clear idea of...", "version": 0.1, "updatedAt": 1769982619610, "updatedBy": "admin", "deleted": false, "owners": [], "provider": "system", "mutuallyExclusive": true}
from metadata.sdk import configurefrom metadata.sdk.entities import Classificationsfrom metadata.generated.schema.api.classification.createClassification import CreateClassificationRequestconfigure( host="https://your-company.getcollate.io/api", jwt_token="your-jwt-token")request = CreateClassificationRequest( name="Certification", description="Certifying Data Asset will provide the users with a clear idea of...", mutuallyExclusive=True)classification = Classifications.create(request)print(f"Created: {classification.fullyQualifiedName}")
Copy
Ask AI
{ "id": "06d90883-6be9-4f7e-9475-753f10a95e94", "name": "Certification", "fullyQualifiedName": "Certification", "description": "Certifying Data Asset will provide the users with a clear idea of...", "version": 0.1, "updatedAt": 1769982619610, "updatedBy": "admin", "deleted": false, "owners": [], "provider": "system", "mutuallyExclusive": true}
Provider of the classification: user (custom) or system (built-in).
POST /v1/classifications
Copy
Ask AI
from metadata.sdk import configurefrom metadata.sdk.entities import Classificationsfrom metadata.generated.schema.api.classification.createClassification import CreateClassificationRequestconfigure( host="https://your-company.getcollate.io/api", jwt_token="your-jwt-token")request = CreateClassificationRequest( name="Certification", description="Certifying Data Asset will provide the users with a clear idea of...", mutuallyExclusive=True)classification = Classifications.create(request)print(f"Created: {classification.fullyQualifiedName}")
Copy
Ask AI
{ "id": "06d90883-6be9-4f7e-9475-753f10a95e94", "name": "Certification", "fullyQualifiedName": "Certification", "description": "Certifying Data Asset will provide the users with a clear idea of...", "version": 0.1, "updatedAt": 1769982619610, "updatedBy": "admin", "deleted": false, "owners": [], "provider": "system", "mutuallyExclusive": true}
Use PUT /v1/classifications instead of POST to perform an upsert. If a classification with the same fullyQualifiedName already exists, it will be updated; otherwise, a new classification is created. The request body is the same as POST.
Copy
Ask AI
curl -X PUT "{base_url}/api/v1/classifications" \ -H "Authorization: Bearer {access_token}" \ -H "Content-Type: application/json" \ -d '{ ... same body as POST ... }'
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.