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

/AppSpiderEnterprise/rest/v1/Account/GetAccount?accountId=<accountId>

Description

Retrieves a user account

Parameters

NameTypeRequiredDescription
accountIdguidYrequest parameter id of the account to return

Response Messages

Response Status CodeReasonDescription
200SuccessResponse contains the account info
400FailureNo 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" ] }

/AppSpiderEnterprise/rest/v1/Account/GetAccount?userName=<userName> Description Retrieves the account for the username

Parameters

ParametersTypeRequiredDescription
userNamestringYThe username

Response Messages

Response status codeReasonDescription
200SuccessResponse contains the account info for that username
400FailureNo 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" ] }

/AppSpiderEnterprise/rest/v1/Account/AddAccount

Description

Add a new user account.

Parameters

NameTypeRequiredDescription
UsernamestringYusername
PasswordstringYpassword ( this is encrypted on server)
FirstNamestringNfirstname
LastNamestringNlastName
DefaultTimeZonestringNdefault time zone
EmailstringNemail
EnabledbooelanYenable (true / false)
LockedbooelanYlocked (true / false)
ExternalbooelanYExternal (true / false)
ClientsarrayYlist of user’s clients (role,groups,notinroles)
RolearrayYclient roles
RoleIdguidYrole id
RoleNamestringYrole name
NotInRolesarrayYclient’s not in roles
RoleIdguidNrole id
RoleNamestringNrole name
GroupsarrayYclient’s groups
GroupIdguidNgroup id
GroupNamestringNgroup name
ClientInfoobjectYAccount client
ClientIdguidYclient id
ClientNamestringYclient 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 CodeReasonDescription
200Successaccount added
400FailureRequired 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" ] }

/AppSpiderEnterprise/rest/v1/Account/UpdateAccount?accountId=<accountId>

Description

Update a new user account.

Parameters

NameTypeRequiredDescription
UsernamestringYusername
PasswordstringYpassword ( this is encrypted on server)
FirstNamestringNfirstname
LastNamestringNlastName
DefaultTimeZonestringNdefault time zone
EmailstringNemail
EnabledbooelanYenable (true / false)
LockedbooelanYlocked (true / false)
ExternalbooelanYExternal (true / false)
ClientsarrayYlist of user’s clients (role,groups,notinroles)
RolearrayYclient roles
RoleIdguidYrole id
RoleNamestringYrole name
NotInRolesarrayYclient’s not in roles
RoleIdguidNrole id
RoleNamestringNrole name
GroupsarrayYclient’s groups
GroupIdguidNgroup id
GroupNamestringNgroup name
ClientInfoobjectYAccount client
ClientIdguidYclient id
ClientNamestringYclient 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 CodeReasonDescription
200Successaccount updated
400FailureRequired 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" ] }

/AppSpiderEnterprise/rest/v1/Group/DeleteAccount?accountId=<accountId>

Description

Deletes a user.

Parameters

No parameters

Response Messages

Response Status CodeReasonDescription
200SuccessUser 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" ] }

/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

NameTypeRequiredDescription
accountIdguidYrequest parameter id of the account

Response Messages

Response Status CodeReasonDescription
200SuccessResponse contains the account client(s) info
400FailureNo 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" ] }

/AppSpiderEnterprise/rest/v1/Account/AddClients?accountId=<accountId>

Description

Add a new client to a user account. Sys admin only

Parameters

NameTypeRequiredDescription
ClientsarrayYlist of user’s clients (role,groups,notinroles)
RolearrayYclient roles
RoleIdguidYrole id
RoleNamestringYrole name
NotInRolesarrayYclient’s not in roles
RoleIdguidNrole id
RoleNamestringNrole name
GroupsarrayYclient’s groups
GroupIdguidNgroup id
GroupNamestringNgroup name
ClientInfoobjectYAccount client
ClientIdguidYclient id
ClientNamestringYclient 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 CodeReasonDescription
200Successaccount client(s) added
400FailureRequired 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" ] }

/AppSpiderEnterprise/rest/v1/Account/UpdateClients?accountId=<accountId>

Description

Updates a user’s client(s)

Parameters

NameTypeRequiredDescription
ClientsarrayYlist of user’s clients (role,groups,notinroles)
RolearrayYclient roles
RoleIdguidYrole id
RoleNamestringYrole name
NotInRolesarrayYclient’s not in roles
RoleIdguidNrole id
RoleNamestringNrole name
GroupsarrayYclient’s groups
GroupIdguidNgroup id
GroupNamestringNgroup name
ClientInfoobjectYAccount client
ClientIdguidYclient id
ClientNamestringYclient 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 CodeReasonDescription
200Successaccount client(s) uddated
400FailureRequired 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" ] }

/AppSpiderEnterprise/rest/v1/Group/DeleteClients?accountId=<accountId>

Description

Deletes a user’s client(s) Sys admin only

Parameters

NameTypeRequiredDescription
accountIdguidYrequest parameter id of the account to return
ClientIdstringYClient Id
ClientNamestringYClient Name

Response Messages

Response Status CodeReasonDescription
200SuccessUser’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" ] }