Metadata APIs

Get Metadata Node List

OVERVIEW



Overview

Get a list of metadata nodes from Publisher

This API call is used to retrieve a list of metadata nodes from the system.

Since v5.1

HTTP Request

GET  /api/2/metadata?{parameters}

URL Parameters
Parameter Format Description
search String

Will search across all metadata node names or display names for a matching string. This should be the same search as at the top of the metadata admin page

Note: This search will duplicate the existing search in the metadata admin page. We will consider multi-lingual metadata search in the future.

sort String

Allow ascending and descending sorting of a single field.

GET /metadata?sort=+created

This returns a list of metadata nodes sorted by ascending created date.

possible fields: name, display name, status, level, created

limit String

Limits the number of metadata nodes returned. 

GET /metadata?offset=10&limit=5

Default: 20

offset String Allows paging of metadata nodes. e.g.

GET /metadata?offset=10&limit=5
Default: 0
fields String

If no fields are specified, a Metadata summary Object will be returned for all nodes (default behaviour)

If "all" is specified, the full Metadata node Object will be returned for all metadata nodes

GET /api/2/metadata?fields=all

HTTP Headers
HTTP Request Header Description Example
Authorization The API Authorisation token "Bearer XXXXXXXXXXXXX"
Accept

The format of the expected response. 

  • "application/json"
  • "application/xml"

If no parameter is set, JSON is the default response given.

"application/xml"
Content-Type

The format of the provided content.

  • "application/json"
  • "application/xml"

If no parameter is set, JSON is the expected content by default.

"application/json"

 

HTTP Response

Success

HTTP response 200 with a list of Metadata node summary Objects 

(Example below)

 

Error

See API Error messages

 

Example HTTP Request & Response

Query String:  (sort by name)

GET http://example.com/context/api/2/metadata?sort=+name

 

 

JSON Response

{

    "totalcount": 23,

    "total": 4,   

    "currentpage": 0,  

    "metadatas": [

        {

            "id": 3,

            "name": "Risk rating",

            "link": "http://example.com/context/api/2/metadata/3"

        },

        {

            "id": 4,

            "name": "Department",

            "link": "http://example.com/context/api/2/metadata/4"

        },

        {

            ....

        }

    ]

}

 

 

Comments


0 Comments

Last Updated: Jun 09,2023