This article deals with WAPI commands related to the WEDOS Global members. For information on how to set up WAPI and troubleshoot common issues, see the article 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 = new member’s email address or existing WEDOS account login – required
- policies = array of permissions for all domains (*) or specific domains; values are 1 for ReadOnly, 0 for full access. See template for details.
Return Values
- 1000 = OK
- 2223 = invalid email format or address doesn’t exist
- 2274 = internal error – missing user_id
- 2400 = internal error – unknown response code
- 2419 = invitation not found
- 2420 = invalid policy array
- 4000 = system error
Response Data
- email = email receiving the invitation
- url = invitation confirmation URL address
- policies_count = number of activated policies (the system automatically scraps invalid domains)
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 = member’s email address or existing WEDOS account login – required
Return Values
- 1000 = OK
- 2223 = invalid email format or address doesn’t exist
- 2274 = internal error – missing user_id
- 2400 = internal error – unknown response code
- 2419 = invitation not found
- 4000 = system error
Response Data
- email = email receiving the invitation
- url = invitation confirmation URL address
- policies_count = number of activated policies (the system automatically scraps invalid domains)
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 = member’s email address or existing WEDOS account login – required
Return Values
- 1000 = OK
- 2223 = invalid email format or address doesn’t exist
- 2274 = internal error – missing user_id
- 2400 = internal error – unknown response code
- 2419 = invitation not found
- 4000 = system error
Response Data
- email = member’s login email
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)"
}
}
}
Was this helpful?
Thanks for your feedback!