Metadata

Get artifact version metadata by content

Changed on

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

Request

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

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.

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

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

Changes

    • info

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

    • info

      added the media type application/vnd.get.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