Associate tags with a metadata object
POST/metalakes/:metalake/objects/:metadataObjectType/:metadataObjectFullName/tags
Attaches tags to a metadata object and detaches others in one request, and returns the names of the tags attached directly to the object afterward. A tag listed in both tagsToAdd and tagsToRemove is left unchanged.
Sign in with a bearer token or a local user's password; see Authentication.
Request
Path Parameters
The name of the metalake
Possible values: [CATALOG, SCHEMA, FILESET, TABLE, VIEW, TOPIC, COLUMN, MODEL, FUNCTION]
The type of the metadata object. Tags can be associated with these types only; associating a tag with any other type fails with IllegalArgumentException. The server matches the value case-insensitively.
The full name of the metadata object
- application/json
Body
The names of the tags to attach
The names of the tags to detach
Responses
- 200
- 404
- 409
- 5xx
The names of the tags attached directly to the object after the change.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NameListResponse
Schema
Possible values: [0]
Status code of the response
{
"code": 0,
"names": [
"string"
]
}
{
"code": 0,
"names": [
"my_tag1",
"my_tag2"
]
}
The metalake or the metadata object does not exist.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NoSuchMetalakeException
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1003,
"type": "NoSuchMetalakeException",
"message": "Failed to operate metalake(s) [test] operation [LOAD], reason [NoSuchMetalakeException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchMetalakeException: Metalake test does not exist",
"..."
]
}
One of the tags to add is already attached to the object.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- TagAlreadyAssociatedException
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1004,
"type": "TagAlreadyAssociatedException",
"message": "Failed to operate tag(s) [my_tag] operation [ASSOCIATE] under metalake [my_test_metalake], reason [TagAlreadyAssociatedException]",
"stack": [
"org.apache.gravitino.exceptions.TagAlreadyAssociatedException: Tag my_tag already associated",
"..."
]
}
The server hit an internal error that the client usually cannot fix by changing the request.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1002,
"type": "RuntimeException",
"message": "Internal Server Error",
"stack": [
"java.lang.RuntimeException: Internal Server Error"
]
}