Metadata APIs

Update 2nd Level Metadata Label

OVERVIEW

Overview

Update 2nd level Metadata label of Publisher

This API call is used to modify an individual 2nd level Metadata label belonging to an existing metadata node and category. It cannot perform bulk updates, but will simply update a single node.

Since v5.1

HTTP Request

PUT  /api/2/metadata/<ID>/categories/<CATEGORYID>/labels/<LABELID>

OR

PUT /api/2/metadata/<NAME>/categories/<CATEGORYID>/labels/<LABELID>

URL Parameters
Parameter Description
ID The ID of the metadata to update
NAME The name of the metadata to update
CATEGORYID The ID of the 1st level category that contains the label to be updated
LABELID The ID of the 2nd level label to update

 

HTTP Request Object

Metadata object, either in JSON or XML format.

 

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 Metadata summary object for the parent metadata object

(Example below)

 

 

Example HTTP Request & Response

PUT http://example.com/context/api/2/metadata/34/categories/284/labels/435

 

{

    "label": {

        "name": "England",

        "status": "active",

        "externalmappingname": "Eng",

        "internalmappingname": "EN",

        "externalids": [

            "england",

            "eng",

        ],

        "imagename": "england-flag",

        "translations": {

            "en_GB": "England",

            "fr_FR": "Angleterre"

        }

    }

}

 

 

JSON Response

{

    "metadata": {

            "id": 34,

            "name": "Countries",

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

    }

}

 

 

Comments


0 Comments

Last Updated: Nov 08,2024