Служебные инструменты · rest

Приложения и интеграции сайта · изменения · Изменение · rest_application_access_change

rest_site_rest_applications_m015_writeИзменение

Действия модуля rest.

Действия

В tools/call передайте имя инструмента, значение action и параметры действия во вложенном объекте arguments.

Изменение прав доступа REST-приложения

rest_application_access_change

Действия модуля rest.

application_id
целое число · обязательный параметр
action
строка · обязательный параметр
access_codes
массив · обязательный параметр
expected_revision
строка · обязательный параметр
request_id
строка · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "application_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "action": {
      "type": "string",
      "enum": [
        "set",
        "delete",
        "reset"
      ]
    },
    "access_codes": {
      "type": "array",
      "maxItems": 50,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "^[A-Za-z][A-Za-z0-9_.:|=-]{0,63}$"
      }
    },
    "expected_revision": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "maxLength": 64
    },
    "request_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "maxLength": 32
    },
    "confirm": {
      "type": "boolean"
    }
  },
  "required": [
    "application_id",
    "action",
    "access_codes",
    "expected_revision",
    "request_id",
    "confirm"
  ],
  "additionalProperties": false
}

Скачать исходное примечание

Создание REST-приложения

rest_application_create

Действия модуля rest.

name
строка · обязательный параметр
url
строка · обязательный параметр
scopes
массив · обязательный параметр
expected_revision
строка · обязательный параметр
request_id
строка · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 250,
      "minLength": 1
    },
    "url": {
      "type": "string",
      "maxLength": 1000,
      "minLength": 1
    },
    "scopes": {
      "type": "array",
      "minItems": 1,
      "maxItems": 40,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "maxLength": 64,
        "pattern": "^[a-z][a-z0-9_.]*$"
      }
    },
    "expected_revision": {
      "type": "string",
      "maxLength": 64,
      "pattern": "^[a-f0-9]{64}$"
    },
    "request_id": {
      "type": "string",
      "maxLength": 32,
      "pattern": "^[a-f0-9]{32}$"
    },
    "confirm": {
      "type": "boolean"
    }
  },
  "required": [
    "name",
    "url",
    "scopes",
    "expected_revision",
    "request_id",
    "confirm"
  ],
  "additionalProperties": false
}

Скачать исходное примечание

Изменение состояния REST-приложения

rest_application_lifecycle

Действия модуля rest.

application_id
целое число · обязательный параметр
action
строка · обязательный параметр

Install supports empty URL_INSTALL or the exact existing-prebound own API-only installer profile; missing/unknown bindings refuse and callback delivery is not observed. Uninstall invokes ordinary local clean=0 cleanup and callbacks, with revision-bound bindings, placements and system-user state; callback delivery is not observed. Delete requires an already uninstalled local application. rebind_callbacks restores the original two API-only event row constructions on an existing inactive own application using its unchanged current URL_INSTALL; it does not install or observe delivery.

expected_revision
строка · обязательный параметр
request_id
строка · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "application_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "action": {
      "type": "string",
      "enum": [
        "install",
        "uninstall",
        "delete",
        "rebind_callbacks"
      ],
      "description": "Install supports empty URL_INSTALL or the exact existing-prebound own API-only installer profile; missing/unknown bindings refuse and callback delivery is not observed. Uninstall invokes ordinary local clean=0 cleanup and callbacks, with revision-bound bindings, placements and system-user state; callback delivery is not observed. Delete requires an already uninstalled local application. rebind_callbacks restores the original two API-only event row constructions on an existing inactive own application using its unchanged current URL_INSTALL; it does not install or observe delivery."
    },
    "expected_revision": {
      "type": "string",
      "maxLength": 64,
      "pattern": "^[a-f0-9]{64}$"
    },
    "request_id": {
      "type": "string",
      "maxLength": 32,
      "pattern": "^[a-f0-9]{32}$"
    },
    "confirm": {
      "type": "boolean"
    }
  },
  "required": [
    "application_id",
    "action",
    "expected_revision",
    "request_id",
    "confirm"
  ],
  "additionalProperties": false
}

Скачать исходное примечание

Изменение REST-приложения

rest_application_update

Действия модуля rest.

application_id
целое число · обязательный параметр
patch
объект · обязательный параметр
expected_revision
строка · обязательный параметр
request_id
строка · обязательный параметр
confirm
логическое значение · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "application_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "patch": {
      "type": "object",
      "additionalProperties": false,
      "minProperties": 1,
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 250,
          "minLength": 1
        },
        "url": {
          "type": "string",
          "maxLength": 1000,
          "minLength": 1
        },
        "scopes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 40,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.]*$"
          }
        }
      }
    },
    "expected_revision": {
      "type": "string",
      "maxLength": 64,
      "pattern": "^[a-f0-9]{64}$"
    },
    "request_id": {
      "type": "string",
      "maxLength": 32,
      "pattern": "^[a-f0-9]{32}$"
    },
    "confirm": {
      "type": "boolean"
    }
  },
  "required": [
    "application_id",
    "patch",
    "expected_revision",
    "request_id",
    "confirm"
  ],
  "additionalProperties": false
}

Скачать исходное примечание