Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 7.13
Sv translation
languageru

Описание : Список всех возможных типов контактов персоны

Метод:  GET

Ресурс: person/contact_type

Параметры:

  • start — – с какой позиции начать отдавать элементы, по умолчанию 0;
  • limit — – сколько элементов отдавать, по умолчанию 100, не может быть больше 1000.

Ответ: Список типов, описанный следующей JSON-Schema:

Блок кода
languagetext
titleJSON схема отдачи списка контактов
 
collapsetrue
{

    "$schema": "http://json-schema.org/draft-04/schema#",

    "type": "object",

    "properties": {

        "data": {

            "description": "Массив типов контактов",

            "type": "array",

            "items": {

                "description": "Тип контакта",

                "type": "object",

                "properties": {

                    "CONTACT_TYPE_ID": {

                        "description": "Уникальный идентификатор типа контактов",

                        "type": "string"

                    },

                    "DISPLAY_NAME": {

                        "description": "Название типа контакта",

                        "type": "string"

                    },

                    "LANGUAGE": {

                        "description": "Язык перевода",

                        "type": "string"

                    },

                    "MNEMO": {

                        "description": "Мнемонический идентификатор (используется в сущности контактов)",

                        "type": "string"

                    }

                }

            }

        },

        "meta": {

            "description": "Дополнительные данные",

            "type": "object",

            "required": [

                "totalCount",

                "start",

                "limit"

            ],

            "properties": {

                "totalCount": {

                    "description": "Общее количество",

                    "type": "integer"

                },

                "start": {

                    "description": "С какой позиции началось отдаваться",

                    "type": "integer"

                },

                "limit": {

                    "description": "Сколько всего отдалось",

                    "type": "integer"

                }

            }

        }

    }

}

Пример:

Блок кода
languagetext
titleЗапрос
collapsetrue
GET /xapi/person/contact_type?start=0&limit=10
Sv translation
languageen

Description: The list of all possible contact types

Method:  GET

Resource: person/contact_type

Parameters:

  • start — a – a start position for returning items, the default value is 0;
  • limit — how – how many items to return (the default value is 100, cannot be more than 1000).

Response: The list of types described with the following JSON Schema:

Блок кода
languagetext
titleJSON schema of returning the list of contacts
  
collapse
 
true
{

     "$schema" :  "http://json-schema.org/draft-04/schema#" ,

     "type" :  "object" ,

     "properties" : {

         "data" : {

             "description" :  "Array of contact types" ,

             "type" :  "array" ,

             "items" : {

                 "description" :  "Contact type" ,

                 "type" :  "object" ,

                 "properties" : {

                     "CONTACT_TYPE_ID" : {

                         "description" :  "A unique identifier of the contact type" ,

                         "type" :  "string"

                     },

                     "DISPLAY_NAME" : {

                         "description" :  "Contact type name" ,

                         "type" :  "string"

                     },

                     "LANGUAGE" : {

                         "description" :  "Translation language" ,

                         "type" :  "string"

                     },

                     "MNEMO" : {

                         "description" :  "Mnemonic identifier (is used in contact entity)" ,

                         "type" :  "string"

                     }

                 }

             }

         },

         "meta" : {

             "description" :  "Additional data" ,

             "type" :  "object" ,

             "required" : [

                 "totalCount" ,

                 "start" ,

                 "limit"

             ],

             "properties" : {

                 "totalCount" : {

                     "description" :  "Total number" ,

                     "type" :  "integer"

                 },

                 "start" : {

                     "description" :  "A position where to start returning items" ,

                     "type" :  "integer"

                 },

                 "limit" : {

                     "description" :  "Total number of returned items" ,

                     "type" :  "integer"

                 }

             }

         }

     }

}
 

Example:

Блок кода
languagetext
titleQuery
 
collapsetrue
GET /xapi/person/contact_type?start= 0 &limit= 10