v1

latestOpenAPI 3.0.2Apache 2.02026-07-136548173.9 KB
Metadata

Get artifact version metadata by content

Gets the metadata for an artifact that matches the raw content. Searches the registry for a version of the given artifact matching the content provided in the body of the POST.

This operation can fail for the following reasons:

  • Provided content (request body) was empty (HTTP error 400)
  • No artifact with the artifactId exists (HTTP error 404)
  • No artifact version matching the provided content exists (HTTP error 404)
  • A server error occurred (HTTP error 500)
post/groups/{groupId}/artifacts/{artifactId}/meta

Query parameters

canonicalboolean

Parameter that can be set to true to indicate that the server should "canonicalize" the content when searching for a matching version. Canonicalization is unique to each artifact type, but typically involves removing any extra whitespace and formatting the content in a consistent manner.

Response

The metadata of the artifact version matching the provided content.

versionstring required
namestring
descriptionstring
createdBystring required
createdOnstring date-time required
typestring required
globalIdinteger required
state'ENABLED' | 'DISABLED' | 'DEPRECATED'

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

  • ENABLED
  • DISABLED
  • DEPRECATED
idstring required

The ID of a single artifact.

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