Previous Next

Get asset resource metadata

get
/resources/v1/metadata-catalog/aggregates/{siteName}/{assetType}/{assetId}
The resource endpoint returns description of the resource, including the resource name, a link to the json schema of the resource, and a link to the asset resource instance when requested with "application/json". When requested with "application/schema+json", the json schema of the resource is returned. The default is "application/json". Note: This is the metadata URL returned from an OPTIONS request of an asset resource instance.

The following tables summarize the client request.

Path Parameters
Name Description Format
assetId ID of the asset integer int64
assetType Name of the asset type string
siteName Name of the site string

The following tables summarize the server response.

Supported Media Types
  • application/json
  • application/schema+json

200 Response

Resource metadata.

Example 1

The following example shows how to geta description for an asset resource, by submitting a GET request on the REST resource using cURL.

curl -i -H "Accept: application/json" -X GET "http://<host>:<port>/<context>/REST/resources/v1/metadata-catalog/aggregates/avisports/AVIArticle/1328196047241"

Example 1 Response Header

The following example shows the response header.

HTTP/1.1 200 OK
ETag: "bdfa9d1f82b4671b0fbd4f71e7102437cff01f43bce04b714a5590fa625376e7"
Cache-Control: max-age=0
Content-Type: application/json;charset=utf-8

Example 1 Response Body

The following example shows the contents of the response body, in JSON format.

{
  "name": "Aggregated Asset Resource",
  "links": [
    {
      "href": "http://<host>:<port>/<context>/REST/resources/v1/metadata-catalog/aggregates/avisports/AVIArticle/1328196047241",
      "rel": "alternate",
      "templated": false,
      "mediaType": "application/schema+json",
      "method": "GET",
      "profile": ""
    },
    {
      "href": "http://<host>:<port>/<context>/REST/resources/v1/metadata-catalog/aggregates/avisports/AVIArticle/1328196047241",
      "rel": "canonical",
      "templated": false,
      "mediaType": "application/json",
      "method": "GET",
      "profile": ""
    },
    {
      "href": "http://<host>:<port>/<context>/REST/resources/v1/aggregates/avisports/AVIArticle/1328196047241",
      "rel": "describes",
      "templated": false,
      "mediaType": "application/json",
      "method": "GET",
      "profile": ""
    }
  ]
}

Example 2

The following example shows how to get the json schema for an asset resource, by submitting a GET request on the REST resource using cURL.

curl -i -H "Accept: application/schema+json" -X GET "http://<host>:<port>/<context>/REST/resources/v1/metadata-catalog/aggregates/avisports/AVIArticle/1328196047241"

The following example shows the response header.

HTTP/1.1 200 OK
Cache-Control: max-age=0,no-cache,no-store
Content-Type: application/schema+json;charset=utf-8

The following example shows the contents of the response body, in JSON format.

{
  "$schema": "http://<host>:<port>/<context>/schema/singularResource#",
  "title": "Aggregated Asset Schema",
  "allOf": [
    {
      "$ref": "http://<host>:<port>/<context>/schema/singularResource#"
    },
    {
      "$ref": "#/definitions/aggregatedAsset"
    }
  ],
  "definitions": {
    "aggregatedAsset": {
      "additionalProperties": true,
      "properties": {
        "start": {
          "$ref": "http://<host>:<port>/<context>/schema/subSchemas#/definitions/assetId"
        },
        "metadata": {
          "type": "object"
        }
      },
      "patternProperties": {
        ".+?:[0-9]+": {
          "$ref": "http://<host>:<port>/<context>/schema/subSchemas#/definitions/assetProperties"
        }
      },
      "required": [
        "start"
      ]
    }
  }
}