Create artifact version
Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.
The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact's type (for example if the artifact type is AVRO then the content of the request should be an Apache Avro document).
This operation can fail for the following reasons:
- Provided content (request body) was empty (HTTP error 400)
- No artifact with this artifactId exists (HTTP error 404)
- The new content violates one of the rules configured for the artifact (HTTP error 409)
- A server error occurred (HTTP error 500)
Headers
A single version of an artifact. Can be provided by the client when creating a new version, or it can be server-generated. The value can be any string unique to the artifact, but it is recommended to use a simple integer or a semver value.
Specifies the version number of this new version of the artifact content. This would typically be a simple integer or a SemVer value. It must be unique within the artifact. If this is not provided, the server will generate a new, unique version number for this new updated content.
Name of the artifact.
Specifies the artifact name of this new version of the artifact content. Name must be ASCII-only string. If this is not provided, the server will extract the name from the artifact content.
Description of the artifact.
Specifies the artifact description of this new version of the artifact content. Description must be ASCII-only string. If this is not provided, the server will extract the description from the artifact content.
Base64 encoded description of the artifact.
Specifies the artifact description of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the description from the artifact content.
Base64 encoded name of the artifact.
Specifies the artifact name of this new version of the artifact content. Value of this must be Base64 encoded string. If this is not provided, the server will extract the name from the artifact content.
Response
The artifact version was successfully created.
Example response
{
"groupId": "My-Group",
"id": "my-artifact-id",
"version": 1221432,
"type": "PROTOBUF",
"name": "Artifact Name",
"description": "The description of the artifact",
"createdBy": "user1",
"createdOn": "2019-05-17T12:00:00Z",
"globalId": 183282932983,
"contentId": 12347,
"labels": [
"label-1",
"label-2"
],
"properties": {
"custom-1": "foo",
"custom-2": "bar"
},
"references": [
{
"groupId": "mygroup",
"artifactId": "13842090-2ce3-11ec-8d3d-0242ac130003",
"version": 2,
"name": "foo.bar.Open"
}
]
}