Get metadata definition namespace resource type association schema

Overview

Gets a JSON schema document that represents a metadata definition namespace resource type association entity.

Classification

  • Show

API Operation Object

  • schemas

Synchronous / Asynchronous

  • -

Request

HTTP Request Method

  • GET

HTTP Request Path

{api_endpoint}/v2/schemas/metadefs/resource_type

HTTP Request Header

Format

Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: <token_id>
Content-Type: application/json

HTTP Request Body

Format

  • none

Request Parameter

Request Parameters
name style format description required/optional
none - - - -

Response

HTTP Response Header

Format

HTTP/1.1 <response_code> <message>       (ex. 200 OK)
  • <response_code>: see "HTTP Responses" section

  • <message>: message based on the response code

    • skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"

Response Code

Response Codes
response code condition
200 normal end
* Follow a Common Error Code

HTTP Response Body

Format

{
    "additionalProperties": false,
    "name": "resource_type_association",
    "properties": {
        "created_at": {
            "description": "<description>",
            "format": "<format>",
            "type": "<type>"
        },
        "name": {
            "description": "<description>",
            "maxLength": <maxLength>,
            "type": "<type>"
        },
        "prefix": {
            "description": "<description>",
            "maxLength": <maxLength>,
            "type": "<type>"
        },
        "properties_target": {
            "description": "<description>",
            "maxLength": <maxLength>,
            "type": "<type>"
        },
        "updated_at": {
            "description": "<description>",
            "format": "<format>",
            "type": "<type>"
        }
    },
    "required": [
        "name"
    ]
}

Response Parameter

Response Parameters
item format description
name String Name of the resource type.
prefix String Prefix for the resource type. If you specify a prefix, you must use this value followed by a prefix separator, such as the colon (:) character, to prefix any properties in the namespace that you want to apply to the resource type.
properties_target String Some resource types allow more than one key and value pair for each instance. For example, the Image service allows both user and image metadata on volumes. The properties_target parameter enables a namespace target to remove the ambiguity.
created_at time/date Date and time of resource type association.
updated_at time/date Date and time of the last resource type association modification.

Sample API Request and Response

Sample API Request

Request URI

https://example.com/v2/schemas/metadefs/resource_type

Request Header

Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02
Content-Type: application/json

Request Body

  • none

Sample API Response

Response Header

HTTP/1.1 200 OK
  • <response_code>: see "HTTP Responses" section

  • <message>: message based on the response code

    • skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"

Response Body

{
    "additionalProperties": false,
    "name": "resource_type_association",
    "properties": {
        "created_at": {
            "description": "Date and time of resource type association (READ-ONLY)",
            "format": "date-time",
            "type": "string"
        },
        "name": {
            "description": "Resource type names should be aligned with Heat resource types whenever possible: http://docs.openstack.org/developer/heat/template_guide/openstack.html",
            "maxLength": 80,
            "type": "string"
        },
        "prefix": {
            "description": "Specifies the prefix to use for the given resource type. Any properties in the namespace should be prefixed with this prefix when being applied to the specified resource type. Must include prefix separator (e.g. a colon :). It is important to note that the same base property key can require different prefixes depending on the target resource type. For example: The desired virtual CPU topology can be set on both images and flavors via metadata. The keys have different prefixes on images than on flavors On flavors keys are prefixed with 'hw:', but on images the keys are prefixed with 'hw_'.",
            "maxLength": 80,
            "type": "string"
        },
        "properties_target": {
            "description": "Some resource types allow more than one key / value pair per instance.  For example, Cinder allows user and image metadata on volumes. Only the image properties metadata is evaluated by Nova (scheduling or drivers). This property allows a namespace target to remove the ambiguity.",
            "maxLength": 80,
            "type": "string"
        },
        "updated_at": {
            "description": "Date and time of the last resource type association modification (READ-ONLY)",
            "format": "date-time",
            "type": "string"
        }
    },
    "required": [
        "name"
    ]
}

Execution Example

HTTP Request

GET /v2/schemas/metadefs/resource_type HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:9292
Accept: */*
X-Auth-Token: fcc83cd12e134e76856478a226a8baa2

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 1250
X-Openstack-Request-Id: req-90317b34-ca50-435b-80b1-cfece2337541
Date: Thu, 15 Oct 2015 14:42:53 GMT

{"additionalProperties": false, "required": ["name"], "name": "resource_type_association", "properties": {"created_at": {"type": "string", "description": "Date and time of resource type association (READ-ONLY)", "format": "date-time"}, "prefix": {"type": "string", "description": "Specifies the prefix to use for the given resource type. Any properties in the namespace should be prefixed with this prefix when being applied to the specified resource type. Must include prefix separator (e.g. a colon :).", "maxLength": 80}, "properties_target": {"type": "string", "description": "Some resource types allow more than one key / value pair per instance.  For example, Cinder allows user and image metadata on volumes. Only the image properties metadata is evaluated by Nova (scheduling or drivers). This property allows a namespace target to remove the ambiguity.", "maxLength": 80}, "name": {"type": "string", "description": "Resource type names should be aligned with Heat resource types whenever possible: http://docs.openstack.org/developer/heat/template_guide/openstack.html", "maxLength": 80}, "updated_at": {"type": "string", "description": "Date and time of the last resource type association modification (READ-ONLY)", "format": "date-time"}}}

Error Execution Example

HTTP Request

GET /v2/schema/metadefs/resource_type HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:9292
Accept: */*
X-Auth-Token: 7d14e25e0f1e4eaebbc922c69757e573

HTTP Response

HTTP/1.1 404 Not Found
Content-Length: 154
Content-Type: text/html; charset=UTF-8
X-Openstack-Request-Id: req-e4bf354a-60fe-43b6-a2e9-994747f21f06
Date: Thu, 15 Oct 2015 17:56:07 GMT

404 Not Found
The resource could not be found.