Update artifact
Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. This is typically in JSON format for most of the supported types, but may be in another format for a few (for example, PROTOBUF). The type of the content should be compatible with the artifact's type (it would be an error to update an AVRO artifact with new OPENAPI content, for example).
The update could fail for a number of reasons including:
- Provided content (request body) was empty (HTTP error 400)
- No artifact with the 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)
When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact.
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. If not provided, the server will assign a version number automatically.
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.
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.
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.
Response
When successful, returns the updated artifact metadata.
Example response
{
"groupId": "My-Group",
"id": "Procurement-Invoice",
"name": "Artifact Name",
"description": "Description of the artifact",
"type": "AVRO",
"version": 18,
"createdBy": "user1",
"createdOn": "2019-03-22T12:51:19Z",
"modifiedBy": "user2",
"modifiedOn": "2019-07-19T15:09:00Z",
"globalId": 12984719247,
"contentId": 82736,
"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"
}
]
}