Account Operations
Credential Warning
Note: Sys Admin or Client Admin account permissions required to execute account operations. Sys Admin have full control over operations Client Admin can only administer their accounts within their client and cannot add or remove a user’s clients
get /AppSpiderEnterprise/rest/v1/Account/GetAccount?accountId=<accountId>
Description
Retrieves a user account
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| accountId | guid | Y | request parameter id of the account to return |
Response Messages
| Response Status Code | Reason | Description |
|---|---|---|
| 200 | Success | Response contains the account info |
| 400 | Failure | No account found |
Response example
{
"type": "object",
"properties": {
"Account": {
"type": "object",
"properties": {
"UserName": {
"type": "string"
},
"Password": {
"type": "null"
},
"FirstName": {
"type": "string"
},
"LastName": {
"type": "string"
},
"DefaultTimeZone": {
"type": "string"
},
"Email": {
"type": "string"
},
"Enabled": {
"type": "boolean"
},
"Locked": {
"type": "boolean"
},
"External": {
"type": "boolean"
},
"Clients": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Roles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"NotInRoles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"Groups": {
"type": "array",
"items": {}
},
"ClientInfo": {
"type": "object",
"properties": {
"ClientId": {
"type": "string"
},
"ClientName": {
"type": "string"
}
},
"required": [
"ClientId",
"ClientName"
]
}
},
"required": [
"Roles",
"NotInRoles",
"Groups",
"ClientInfo"
]
}
]
},
"UserId": {
"type": "string"
}
},
"required": [
"UserName",
"Password",
"FirstName",
"LastName",
"DefaultTimeZone",
"Email",
"Enabled",
"Locked",
"External",
"Clients",
"UserId"
]
},
"IsSuccess": {
"type": "boolean"
},
"Reason": {
"type": "null"
},
"ErrorMessage": {
"type": "null"
},
"Links": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Rel": {
"type": "string"
},
"Href": {
"type": "string"
}
},
"required": [
"Rel",
"Href"
]
}
]
}
},
"required": [
"Account",
"IsSuccess",
"Reason",
"ErrorMessage",
"Links"
]
}get /AppSpiderEnterprise/rest/v1/Account/GetAccount?userName=<userName>
Description
Retrieves the account for the username
Parameters
| Parameters | Type | Required | Description |
|---|---|---|---|
| userName | string | Y | The username |
Response Messages
| Response status code | Reason | Description |
|---|---|---|
| 200 | Success | Response contains the account info for that username |
| 400 | Failure | No account found |
Response example:
{
"type": "object",
"properties": {
"Account": {
"type": "object",
"properties": {
"UserName": {
"type": "string"
},
"Password": {
"type": "null"
},
"FirstName": {
"type": "string"
},
"LastName": {
"type": "string"
},
"DefaultTimeZone": {
"type": "string"
},
"Email": {
"type": "string"
},
"Enabled": {
"type": "boolean"
},
"Locked": {
"type": "boolean"
},
"External": {
"type": "boolean"
},
"Clients": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Roles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"NotInRoles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"Groups": {
"type": "array",
"items": {}
},
"ClientInfo": {
"type": "object",
"properties": {
"ClientId": {
"type": "string"
},
"ClientName": {
"type": "string"
}
},
"required": [
"ClientId",
"ClientName"
]
}
},
"required": [
"Roles",
"NotInRoles",
"Groups",
"ClientInfo"
]
}
]
},
"UserId": {
"type": "string"
}
},
"required": [
"UserName",
"Password",
"FirstName",
"LastName",
"DefaultTimeZone",
"Email",
"Enabled",
"Locked",
"External",
"Clients",
"UserId"
]
},
"IsSuccess": {
"type": "boolean"
},
"Reason": {
"type": "null"
},
"ErrorMessage": {
"type": "null"
},
"Links": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Rel": {
"type": "string"
},
"Href": {
"type": "string"
}
},
"required": [
"Rel",
"Href"
]
}
]
}
},
"required": [
"Account",
"IsSuccess",
"Reason",
"ErrorMessage",
"Links"
]
}post /AppSpiderEnterprise/rest/v1/Account/AddAccount
Description
Add a new user account.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Username | string | Y | username |
| Password | string | Y | password ( this is encrypted on server) |
| FirstName | string | N | firstname |
| LastName | string | N | lastName |
| DefaultTimeZone | string | N | default time zone |
| string | N | ||
| Enabled | booelan | Y | enable (true / false) |
| Locked | booelan | Y | locked (true / false) |
| External | booelan | Y | External (true / false) |
| Clients | array | Y | list of user’s clients (role,groups,notinroles) |
| Role | array | Y | client roles |
| RoleId | guid | Y | role id |
| RoleName | string | Y | role name |
| NotInRoles | array | Y | client’s not in roles |
| RoleId | guid | N | role id |
| RoleName | string | N | role name |
| Groups | array | Y | client’s groups |
| GroupId | guid | N | group id |
| GroupName | string | N | group name |
| ClientInfo | object | Y | Account client |
| ClientId | guid | Y | client id |
| ClientName | string | Y | client name |
Request example
{
"type": "object",
"properties": {
"Username": {
"type": "string"
},
"Password": {
"type": "string"
},
"FirstName": {
"type": "string"
},
"LastName": {
"type": "string"
},
"DefaultTimeZone": {
"type": "string"
},
"Email": {
"type": "string"
},
"Enabled": {
"type": "boolean"
},
"Locked": {
"type": "boolean"
},
"External": {
"type": "boolean"
},
"Clients": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Roles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"NotInRoles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"Groups": {
"type": "array",
"items": {}
},
"ClientInfo": {
"type": "object",
"properties": {
"ClientId": {
"type": "string"
},
"ClientName": {
"type": "string"
}
},
"required": [
"ClientId",
"ClientName"
]
}
},
"required": [
"Roles",
"NotInRoles",
"Groups",
"ClientInfo"
]
}
]
}
},
"required": [
"Username",
"Password",
"FirstName",
"LastName",
"DefaultTimeZone",
"Email",
"Enabled",
"Locked",
"External",
"Clients"
]
}Response Messages
| Response Status Code | Reason | Description |
|---|---|---|
| 200 | Success | account added |
| 400 | Failure | Required parameters not provided |
Response example
{
"type": "object",
"properties": {
"Account": {
"type": "object",
"properties": {
"UserId": {
"type": "string"
}
},
"required": [
"UserId"
]
},
"IsSuccess": {
"type": "boolean"
},
"Reason": {
"type": "null"
},
"ErrorMessage": {
"type": "string"
},
"Links": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Rel": {
"type": "string"
},
"Href": {
"type": "string"
}
},
"required": [
"Rel",
"Href"
]
}
]
}
},
"required": [
"Account",
"IsSuccess",
"Reason",
"ErrorMessage",
"Links"
]
}put /AppSpiderEnterprise/rest/v1/Account/UpdateAccount?accountId=<accountId>
Description
Update a new user account.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Username | string | Y | username |
| Password | string | Y | password ( this is encrypted on server) |
| FirstName | string | N | firstname |
| LastName | string | N | lastName |
| DefaultTimeZone | string | N | default time zone |
| string | N | ||
| Enabled | booelan | Y | enable (true / false) |
| Locked | booelan | Y | locked (true / false) |
| External | booelan | Y | External (true / false) |
| Clients | array | Y | list of user’s clients (role,groups,notinroles) |
| Role | array | Y | client roles |
| RoleId | guid | Y | role id |
| RoleName | string | Y | role name |
| NotInRoles | array | Y | client’s not in roles |
| RoleId | guid | N | role id |
| RoleName | string | N | role name |
| Groups | array | Y | client’s groups |
| GroupId | guid | N | group id |
| GroupName | string | N | group name |
| ClientInfo | object | Y | Account client |
| ClientId | guid | Y | client id |
| ClientName | string | Y | client name |
Request example
{
"type": "object",
"properties": {
"Username": {
"type": "string"
},
"Password": {
"type": "string"
},
"FirstName": {
"type": "string"
},
"LastName": {
"type": "string"
},
"DefaultTimeZone": {
"type": "string"
},
"Email": {
"type": "string"
},
"Enabled": {
"type": "boolean"
},
"Locked": {
"type": "boolean"
},
"External": {
"type": "boolean"
},
"Clients": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Roles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"NotInRoles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"Groups": {
"type": "array",
"items": {}
},
"ClientInfo": {
"type": "object",
"properties": {
"ClientId": {
"type": "string"
},
"ClientName": {
"type": "string"
}
},
"required": [
"ClientId",
"ClientName"
]
}
},
"required": [
"Roles",
"NotInRoles",
"Groups",
"ClientInfo"
]
}
]
}
},
"required": [
"Username",
"Password",
"FirstName",
"LastName",
"DefaultTimeZone",
"Email",
"Enabled",
"Locked",
"External",
"Clients"
]
}Response Messages
| Response Status Code | Reason | Description |
|---|---|---|
| 200 | Success | account updated |
| 400 | Failure | Required parameters not provided |
Response example
{
"type": "object",
"properties": {
"Account": {
"type": "object",
"properties": {
"UserId": {
"type": "string"
}
},
"required": [
"UserId"
]
},
"IsSuccess": {
"type": "boolean"
},
"Reason": {
"type": "null"
},
"ErrorMessage": {
"type": "string"
},
"Links": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Rel": {
"type": "string"
},
"Href": {
"type": "string"
}
},
"required": [
"Rel",
"Href"
]
}
]
}
},
"required": [
"Account",
"IsSuccess",
"Reason",
"ErrorMessage",
"Links"
]
}delete /AppSpiderEnterprise/rest/v1/Group/DeleteAccount?accountId=<accountId>
Description
Deletes a user.
Parameters
No parameters
Response Messages
| Response Status Code | Reason | Description |
|---|---|---|
| 200 | Success | User has been deleted |
Response example
{
"type": "object",
"properties": {
"IsSuccess": {
"type": "boolean"
},
"Reason": {
"type": "null"
},
"ErrorMessage": {
"type": "null"
},
"Links": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Rel": {
"type": "string"
},
"Href": {
"type": "string"
}
},
"required": [
"Rel",
"Href"
]
}
]
}
},
"required": [
"IsSuccess",
"Reason",
"ErrorMessage",
"Links"
]
}get /AppSpiderEnterprise/rest/v1/Account/GetClients?accountId=<accountId>
Description
Retrieves all clients accounts Client Admin will only see the client they are associated with or authenticated to System Admins will see all user’s clients
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| accountId | guid | Y | request parameter id of the account |
Response Messages
| Response Status Code | Reason | Description |
|---|---|---|
| 200 | Success | Response contains the account client(s) info |
| 400 | Failure | No client info found |
Response example
{
"type": "object",
"properties": {
"Account": {
"type": "object",
"properties": {
"Clients": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Roles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"NotInRoles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"Groups": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"GroupId": {
"type": "string"
},
"GroupName": {
"type": "string"
}
},
"required": [
"GroupId",
"GroupName"
]
}
]
},
"ClientInfo": {
"type": "object",
"properties": {
"ClientId": {
"type": "string"
},
"ClientName": {
"type": "string"
}
},
"required": [
"ClientId",
"ClientName"
]
}
},
"required": [
"Roles",
"NotInRoles",
"Groups",
"ClientInfo"
]
},
{
"type": "object",
"properties": {
"Roles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"NotInRoles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"Groups": {
"type": "array",
"items": {}
},
"ClientInfo": {
"type": "object",
"properties": {
"ClientId": {
"type": "string"
},
"ClientName": {
"type": "string"
}
},
"required": [
"ClientId",
"ClientName"
]
}
},
"required": [
"Roles",
"NotInRoles",
"Groups",
"ClientInfo"
]
}
]
},
"UserId": {
"type": "string"
}
},
"required": [
"Clients",
"UserId"
]
},
"IsSuccess": {
"type": "boolean"
},
"Reason": {
"type": "null"
},
"ErrorMessage": {
"type": "null"
},
"Links": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Rel": {
"type": "string"
},
"Href": {
"type": "string"
}
},
"required": [
"Rel",
"Href"
]
}
]
}
},
"required": [
"Account",
"IsSuccess",
"Reason",
"ErrorMessage",
"Links"
]
}post /AppSpiderEnterprise/rest/v1/Account/AddClients?accountId=<accountId>
Description
Add a new client to a user account. Sys admin only
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Clients | array | Y | list of user’s clients (role,groups,notinroles) |
| Role | array | Y | client roles |
| RoleId | guid | Y | role id |
| RoleName | string | Y | role name |
| NotInRoles | array | Y | client’s not in roles |
| RoleId | guid | N | role id |
| RoleName | string | N | role name |
| Groups | array | Y | client’s groups |
| GroupId | guid | N | group id |
| GroupName | string | N | group name |
| ClientInfo | object | Y | Account client |
| ClientId | guid | Y | client id |
| ClientName | string | Y | client name |
Request example
{
"type": "object",
"properties": {
"Clients": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Roles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"NotInRoles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"Groups": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"GroupId": {
"type": "string"
},
"GroupName": {
"type": "string"
}
},
"required": [
"GroupId",
"GroupName"
]
}
]
},
"ClientInfo": {
"type": "object",
"properties": {
"ClientId": {
"type": "string"
},
"ClientName": {
"type": "string"
}
},
"required": [
"ClientId",
"ClientName"
]
}
},
"required": [
"Roles",
"NotInRoles",
"Groups",
"ClientInfo"
]
}
]
}
},
"required": [
"Clients"
]
}Response Messages
| Response Status Code | Reason | Description |
|---|---|---|
| 200 | Success | account client(s) added |
| 400 | Failure | Required parameters not provided |
Response example
{
"type": "object",
"properties": {
"Account": {
"type": "object",
"properties": {
"UserId": {
"type": "string"
}
},
"required": [
"UserId"
]
},
"IsSuccess": {
"type": "boolean"
},
"Reason": {
"type": "null"
},
"ErrorMessage": {
"type": "null"
},
"Links": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Rel": {
"type": "string"
},
"Href": {
"type": "string"
}
},
"required": [
"Rel",
"Href"
]
}
]
}
},
"required": [
"Account",
"IsSuccess",
"Reason",
"ErrorMessage",
"Links"
]
}
put /AppSpiderEnterprise/rest/v1/Account/UpdateClients?accountId=<accountId>
Description
Updates a user’s client(s)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Clients | array | Y | list of user’s clients (role,groups,notinroles) |
| Role | array | Y | client roles |
| RoleId | guid | Y | role id |
| RoleName | string | Y | role name |
| NotInRoles | array | Y | client’s not in roles |
| RoleId | guid | N | role id |
| RoleName | string | N | role name |
| Groups | array | Y | client’s groups |
| GroupId | guid | N | group id |
| GroupName | string | N | group name |
| ClientInfo | object | Y | Account client |
| ClientId | guid | Y | client id |
| ClientName | string | Y | client name |
Request example
{
"type": "object",
"properties": {
"Clients": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Roles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"NotInRoles": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RoleId": {
"type": "string"
},
"RoleName": {
"type": "string"
}
},
"required": [
"RoleId",
"RoleName"
]
}
]
},
"Groups": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"GroupId": {
"type": "string"
},
"GroupName": {
"type": "string"
}
},
"required": [
"GroupId",
"GroupName"
]
}
]
},
"ClientInfo": {
"type": "object",
"properties": {
"ClientId": {
"type": "string"
},
"ClientName": {
"type": "string"
}
},
"required": [
"ClientId",
"ClientName"
]
}
},
"required": [
"Roles",
"NotInRoles",
"Groups",
"ClientInfo"
]
}
]
}
},
"required": [
"Clients"
]
}Response Messages
| Response Status Code | Reason | Description |
|---|---|---|
| 200 | Success | account client(s) uddated |
| 400 | Failure | Required parameters not provided |
Response example
{
"type": "object",
"properties": {
"Account": {
"type": "object",
"properties": {
"UserId": {
"type": "string"
}
},
"required": [
"UserId"
]
},
"IsSuccess": {
"type": "boolean"
},
"Reason": {
"type": "null"
},
"ErrorMessage": {
"type": "null"
},
"Links": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Rel": {
"type": "string"
},
"Href": {
"type": "string"
}
},
"required": [
"Rel",
"Href"
]
}
]
}
},
"required": [
"Account",
"IsSuccess",
"Reason",
"ErrorMessage",
"Links"
]
}
delete /AppSpiderEnterprise/rest/v1/Group/DeleteClients?accountId=<accountId>
Description
Deletes a user’s client(s) Sys admin only
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| accountId | guid | Y | request parameter id of the account to return |
| ClientId | string | Y | Client Id |
| ClientName | string | Y | Client Name |
Response Messages
| Response Status Code | Reason | Description |
|---|---|---|
| 200 | Success | User’s client(s) has been deleted |
Request example
{
"type": "array",
"items": [
{
"type": "object",
"properties": {
"ClientId": {
"type": "string"
},
"ClientName": {
"type": "string"
}
},
"required": [
"ClientId",
"ClientName"
]
},
{
"type": "object",
"properties": {
"ClientId": {
"type": "string"
},
"ClientName": {
"type": "string"
}
},
"required": [
"ClientId",
"ClientName"
]
}
]
}Response example
{
"type": "object",
"properties": {
"IsSuccess": {
"type": "boolean"
},
"Reason": {
"type": "null"
},
"ErrorMessage": {
"type": "null"
},
"Links": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Rel": {
"type": "string"
},
"Href": {
"type": "string"
}
},
"required": [
"Rel",
"Href"
]
}
]
}
},
"required": [
"IsSuccess",
"Reason",
"ErrorMessage",
"Links"
]
}