This article deals with WAPI commands related to the WEDOS Global members. Інформацію про налаштування WAPI та усунення типових проблем див. у статті WAPI – Manual.
This article provides information on the following requests:
wg-members-create
Use the wgp-members-create command to send an invitation to a new member.
Parameters
- email = e-mail нового учасника або логін наявного облікового запису WEDOS – обов’язково
- policies = масив дозволів для всіх доменів (*) або окремих доменів; значення 1 означає ReadOnly, 0 – повний доступ. Подробиці див. у шаблоні.
Return Values
- 1000 = OK
- 2223 = недійсний e-mail або адреса не існує
- 2274 = внутрішня помилка – відсутній user_id
- 2400 = внутрішня помилка – невідомий код відповіді
- 2419 = запрошення не знайдено
- 2420 = недійсний масив policy
- 2424 = членство вже існує
- 4000 = системна помилка
Response Data
- email = e-mail для отримання запрошення
- url = URL-адреса підтвердження запрошення
- policies_count = кількість активованих політик (система автоматично видаляє недійсні домени)
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "authentication string",
"command": "wg-members-create",
"clTRID": "your ID",
"data": {
"email": "new member email (WEDOS account login)",
"policies": {
"domain01.tld": "0|1",
"domain02.tld": "0|1",
"*": "0|1"
}
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UTF timestamp",
"clTRID": "your ID",
"svTRID": "server ID",
"command": "wg-members-create",
"data": {
"email": "new member email (WEDOS account login)",
"url": "invitation url",
"policies_count": "number of successfully activated policies"
}
}
}
wg-members-show
Use the wgp-members-show return’s a member’s invitation URL.
Parameters
- email = e-mail учасника або логін наявного облікового запису WEDOS – обов’язково
Return Values
- 1000 = OK
- 2223 = недійсний e-mail або адреса не існує
- 2274 = внутрішня помилка – відсутній user_id
- 2400 = внутрішня помилка – невідомий код відповіді
- 2419 = запрошення не знайдено
- 4000 = системна помилка
Response Data
- email = e-mail для отримання запрошення
- url = URL-адреса підтвердження запрошення
- policies_count = кількість активованих політик (система автоматично видаляє недійсні домени)
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "authentication string",
"command": "wg-members-show",
"clTRID": "your ID",
"data": {
"email": "new member email (WEDOS account login)"
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UTF timestamp",
"clTRID": "your ID",
"svTRID": "server ID",
"command": "wg-members-show",
"data": {
"email": "new member email (WEDOS account login)",
"url": "invitation url",
"policies_count": "number of successfully activated policies"
}
}
}
wg-members-delete
Use the wgp-members-delete to remove an existing member and revoke their permissions.
Parameters
- email = e-mail учасника або логін наявного облікового запису WEDOS – обов’язково
Return Values
- 1000 = OK
- 2223 = недійсний e-mail або адреса не існує
- 2274 = внутрішня помилка – відсутній user_id
- 2400 = внутрішня помилка – невідомий код відповіді
- 2419 = запрошення не знайдено
- 4000 = системна помилка
Response Data
- email = e-mail для входу учасника
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "authentication string",
"command": "wg-members-delete",
"clTRID": "your ID",
"data": {
"email": "member email (WEDOS account login)"
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UTF timestamp",
"clTRID": "your ID",
"svTRID": "server ID",
"command": "wg-members-delete",
"data": {
"email": "member email (WEDOS account login)"
}
}
}