Skip to content

Retrieve Component Type Metadata


Retrieve metadata of a specific component type.

GET/api/{version}/metadata/components/{component_type}
NameDescription
Acceptapplication/json (default) or application/xml
NameDescription
{component_type}The component type name (Picklist, Docfield, Doctype, etc.).
curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v21.1/metadata/components/Picklist
{
    "responseStatus": "SUCCESS",
    "data": {
        "name": "Picklist",
        "class": "metadata",
        "abbreviation": "PIL",
        "active": true,
        "attributes": [
            {
                "name": "label",
                "type": "String",
                "requiredness": "required",
                "max_length": 40,
                "editable": true,
                "multi_value": false
            },
            {
                "name": "active",
                "type": "Boolean",
                "requiredness": "required",
                "editable": false,
                "multi_value": false
            }
        ],
        "sub_components": [
            {
                "name": "Picklistentry",
                "json_collection_name": "Picklistentry",
                "attributes": [
                    {
                        "name": "value",
                        "type": "String",
                        "requiredness": "required",
                        "max_length": 128,
                        "editable": true,
                        "multi_value": false
                    },
                    {
                        "name": "order",
                        "type": "Number",
                        "requiredness": "required",
                        "max_value": 9223372036854775807,
                        "min_value": 0,
                        "scale": 0,
                        "editable": true,
                        "multi_value": false
                    },
                    {
                        "name": "active",
                        "type": "Boolean",
                        "requiredness": "required",
                        "editable": false,
                        "multi_value": false
                    }
                ]
            }
        ]
    }
}

On SUCCESS, the response contains metadata for the specified component type. Metadata returned varies for each component and subcomponent type. See Component Types for more information.

Note that some attributes return a default_cap value. This is the default edibility of a field and is for internal Veeva use only.