Get metadata/list

Available from CRM.COM R15.0.0

This method returns information related with the existing metadata per entity provided. Multiple metadata are returned by each call

Resource URL

http://host_name/crmapi/rest/$version/metadata/list

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

number_of_results

(optional)

Number

The number of results that can be retrieved through each call

offset

(optional)

Number

Defines the number of entities that should be skipped from the results. If it is set to 0 then none results should be skipped, otherwise the results will begin from the provided offset number

fields_set

(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified

Response Data

Name

Type

Description

id

String

The ID of the retrieved metadata attribute

keyStringThe key of the retrieved metadata attribute
nameStringThe name of the retrieved metadata attribute
descriptionStringThe description of the metadata attribute
typeString

The type of the retrieved metadata. Available values are:

  • STRING
  • INTEGER
  • FLOAT
  • BOOLEAN
  • DATE
value setValue set ObjectThe values available to be set for this metadata attribute. (Configurable)
default_valuedepends on the typeThe default value which is applicable if a value set is defined.

log_information

Log Information Object

The log information related with the retrieved metadata

Referred Objects Response Data

 log_information object response data

Name

Type

Description

created_date

Date

The date that the retrieved record was created

updated_date

Date

The last date that the retrieved record was updated

created_by_unit

Unit Object

The unit that created the retrieved record

From CRM.COM R14.1.0 and onward, group_name and community_name attributes will be returned as empty, if the related legacy compatibility setting is disabled

Deprecated from CRM.COM R18.0.0

created_by_business_unit

Unit Object

The unit that created the retrieved record

From CRM.COM R14.1.0 and onward, group_name and community_name attributes will be returned as empty, if the related legacy compatibility setting is disabled

Available from CRM.COM R18.0.0

created_by_user

User Object

The user that created the retrieved record

From CRM.COM R14.1.0 and onward, person_name and email attributes will be returned as empty, if the related legacy compatibility setting is disabled

updated_by_unit

Unit Object

The last unit that updated the retrieved record

From CRM.COM R14.1.0 and onward, group_name and community_name attributes will be returned as empty, if the related legacy compatibility setting is disabled

Deprecated from CRM.COM R18.0.0

updated_by_business_unit

Unit Object

The last unit that updated the retrieved record

Available from CRM.COM R18.0.0

updated_by_user

User Object

The last user that updated the retrieved record

From CRM.COM R14.1.0 and onward, person_name and email attributes will be returned as empty, if the related legacy compatibility setting is disabled

Referred Objects Response Data

 unit object response data

Name

Type

Description

id

String

The ID of the retrieved unit

name

String

The name of the retrieved unit

group_name

String

The name of the group that the retrieved unit belongs to

community_name

String

The name of the community that the retrieved unit belongs to

alternative_code

String

The alternative code of the retrieved unit

description

String

The description of the retrieved unit

 business unit object response data

Name

Type

Description

id

String

The ID of the retrieved business unit

name

String

The name of the retrieved business unit

codeStringThe code of the retrieved business unit
unified_codeString

The unified code of the retrieved business unit

description

String

The description of the retrieved business unit

parent_business_unit_nameStringThe name of the parent business unit that the retrieved business unit belongs to

 user object response data

Name

Type

Description

id

String

The ID of the retrieved user

username

String

The user name of the retrieved user

person_name

String

The full name of the retrieved user

email

String

The email of the retrieved user

 

Examples

 Example 1

HTTP Method: GET


Request

 {{server}}/crmapi/rest/v2/metadata/list?token={{token}}


Response

 {
    "data": [
        {
            "log_information": {
                "created_by_unit": {
                    "alternative_code": "adminunit",
                    "group_name": "Main Group",
                    "community_name": "Community",
                    "name": "Admin Unit",
                    "description": "admin unit",
                    "id": "1"
                },
                "updated_by_unit": {
                    "alternative_code": "adminunit",
                    "group_name": "Main Group",
                    "community_name": "Community",
                    "name": "Admin Unit",
                    "description": "admin unit",
                    "id": "1"
                },
                "created_date": "2018-05-24T14:52:00",
                "updated_date": "2018-05-24T14:52:00",
                "updated_by_user": {
                    "person_name": "CRM COM",
                    "id": "1",
                    "email": "dev@crm.com",
                    "username": "MPAdministrator"
                },
                "created_by_user": {
                    "person_name": "CRM COM",
                    "id": "1",
                    "email": "dev@crm.com",
                    "username": "MPAdministrator"
                }
            },
            "value_set": null,
            "name": "color",
            "description": null,
            "default_value": null,
            "id": "C901937FC62A49909E39C42931E5E0D8",
            "type": "STRING",
            "key": "COLOR"
        }
    ],
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}