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)
- An invalid version number was provided (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 400)
- A server error occurred (HTTP error 500)
Query parameters
When set to true, the operation will not result in any changes. Instead, it will return a result based on whether the operation would have succeeded.
Request body
Example request
{
"version": "1.0.1",
"content": {
"content": "{\"type\":\"record\",\"name\":\"ExampleType\",\"fields\":[{\"name\":\"foo\",\"type\":\"string\"}]}",
"contentType": "application/json"
},
"name": "Version 1.0.1",
"description": "The latest version of this artifact.",
"isDraft": false
}Response
The artifact version was successfully created.
Example response
{
"groupId": "My-Group",
"artifactId": "my-artifact-id",
"version": 1221432,
"artifactType": "PROTOBUF",
"name": "Artifact Name",
"description": "The description of the artifact",
"owner": "user1",
"createdOn": "2019-05-17T12:00:00Z",
"globalId": 183282932983,
"contentId": 12347,
"labels": {
"custom-1": "foo",
"custom-2": "bar"
}
}