Artifacts

Update artifact

Changed on

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.

put/groups/{groupId}/artifacts/{artifactId}

Request

  • The document declares no server URL.
  • Auth
    none declared

Headers

X-Registry-Versionstring

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.

Example:"3.1.6"

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.

X-Registry-Namestring

Name of the artifact.

Example:"Artifact name"

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.

X-Registry-Name-Encodedstring

Base64 encoded name of the artifact.

Example:"QXJ0aWZhY3QgbmFtZQo="

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.

X-Registry-Descriptionstring

Description of the artifact.

Example:"Artifact description"

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.

X-Registry-Description-Encodedstring

Base64 encoded description of the artifact.

Example:"QXJ0aWZhY3QgZGVzY3JpcHRpb24K"

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.

Request body

contentstring required

Raw content of the artifact or a valid (and accessible) URL where the content can be found.

Example request

{
  "references": [
    {
      "groupId": "mygroup",
      "artifactId": "13842090-2ce3-11ec-8d3d-0242ac130003",
      "version": "2",
      "name": "foo.bar.Open"
    }
  ]
}

Response

When successful, returns the updated artifact metadata.

namestring
descriptionstring
createdBystring required
createdOnstring date-time required
modifiedBystring required
modifiedOnstring date-time required
idstring required

The ID of a single artifact.

versionstring required
typestring required
globalIdinteger required
state'ENABLED' | 'DISABLED' | 'DEPRECATED' required

Describes the state of an artifact or artifact version. The following states are possible:

  • ENABLED
  • DISABLED
  • DEPRECATED
labelsstring[]
propertiesProperties

User-defined name-value pairs. Name and value must be strings.

groupIdstring

An ID of a single artifact group.

contentIdinteger required

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"
    }
  ]
}

Changes

    • info

      added the media type application/vnd.create.extended+json to the request body

    • info

      the request's body type was generalized from no type to string, and format from no format to binary

    • info

      removed the ASYNCAPI enum value from the response property for the response status

    • info

      removed the AVRO enum value from the response property for the response status

    • info

      removed the GRAPHQL enum value from the response property for the response status

    • info

      removed the JSON enum value from the response property for the response status

    • info

      removed the KCONNECT enum value from the response property for the response status

    • info

      removed the OPENAPI enum value from the response property for the response status

    • info

      removed the PROTOBUF enum value from the response property for the response status

    • info

      removed the WSDL enum value from the response property for the response status

    • info

      removed the XML enum value from the response property for the response status

    • info

      removed the XSD enum value from the response property for the response status