Requires the role: | superadmin |
DELETE | /superadmin/administrators/{Id} | Delete a administrator from your company | If you want to delete a administrator from your company. |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@ApiResponse(Description="Returned if there is a validation error on the input parameters", StatusCode=400)
// @ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401)
public static class SuperAdminDeleteCompanyUser implements ICompany
{
/**
* Enter the company and id for the application user, if blank company id and you are an admin, your company id will be used.
*/
@ApiMember(Description="Enter the company and id for the application user, if blank company id and you are an admin, your company id will be used.", ParameterType="query")
public UUID CompanyId = null;
/**
* Enter the user id for the administrator.
*/
@ApiMember(Description="Enter the user id for the administrator.", IsRequired=true, ParameterType="query")
public UUID Id = null;
public UUID getCompanyId() { return CompanyId; }
public SuperAdminDeleteCompanyUser setCompanyId(UUID value) { this.CompanyId = value; return this; }
public UUID getId() { return Id; }
public SuperAdminDeleteCompanyUser setId(UUID value) { this.Id = value; return this; }
}
public static class CompanyUserQueryResponse
{
public UUID Id = null;
public UUID CompanyId = null;
public String Firstname = null;
public String Lastname = null;
public String Email = null;
public String Phone = null;
public String WorkerId = null;
public Integer ResourceId = null;
/**
* The resource information connected to the administrator.
*/
@ApiMember(Description="The resource information connected to the administrator.")
public CompanyUserResource Resource = null;
/**
* The roles that are connected to the administrator.
*/
@ApiMember(Description="The roles that are connected to the administrator.")
public ArrayList<CompanyUserRolesQueryResponse> Roles = null;
public Boolean Active = null;
public Date Created = null;
public Date Updated = null;
public UUID getId() { return Id; }
public CompanyUserQueryResponse setId(UUID value) { this.Id = value; return this; }
public UUID getCompanyId() { return CompanyId; }
public CompanyUserQueryResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
public String getFirstname() { return Firstname; }
public CompanyUserQueryResponse setFirstname(String value) { this.Firstname = value; return this; }
public String getLastname() { return Lastname; }
public CompanyUserQueryResponse setLastname(String value) { this.Lastname = value; return this; }
public String getEmail() { return Email; }
public CompanyUserQueryResponse setEmail(String value) { this.Email = value; return this; }
public String getPhone() { return Phone; }
public CompanyUserQueryResponse setPhone(String value) { this.Phone = value; return this; }
public String getWorkerId() { return WorkerId; }
public CompanyUserQueryResponse setWorkerId(String value) { this.WorkerId = value; return this; }
public Integer getResourceId() { return ResourceId; }
public CompanyUserQueryResponse setResourceId(Integer value) { this.ResourceId = value; return this; }
public CompanyUserResource getResource() { return Resource; }
public CompanyUserQueryResponse setResource(CompanyUserResource value) { this.Resource = value; return this; }
public ArrayList<CompanyUserRolesQueryResponse> getRoles() { return Roles; }
public CompanyUserQueryResponse setRoles(ArrayList<CompanyUserRolesQueryResponse> value) { this.Roles = value; return this; }
public Boolean isActive() { return Active; }
public CompanyUserQueryResponse setActive(Boolean value) { this.Active = value; return this; }
public Date getCreated() { return Created; }
public CompanyUserQueryResponse setCreated(Date value) { this.Created = value; return this; }
public Date getUpdated() { return Updated; }
public CompanyUserQueryResponse setUpdated(Date value) { this.Updated = value; return this; }
}
public static class CompanyUserResource
{
/**
* The resource id
*/
@ApiMember(Description="The resource id")
public Integer Id = null;
/**
* The resource name
*/
@ApiMember(Description="The resource name")
public String Name = null;
/**
* The resource status
*/
@ApiMember(Description="The resource status")
public Boolean Active = null;
/**
* The resource description
*/
@ApiMember(Description="The resource description")
public String Description = null;
/**
* The resource email
*/
@ApiMember(Description="The resource email")
public String Email = null;
/**
* The resource phone
*/
@ApiMember(Description="The resource phone")
public String Phone = null;
/**
* The resource color
*/
@ApiMember(Description="The resource color")
public String Color = null;
/**
* The resource image
*/
@ApiMember(Description="The resource image")
public Uri ImageUrl = null;
/**
* If the resource want to receive email notifications
*/
@ApiMember(Description="If the resource want to receive email notifications")
public Boolean EmailNotification = null;
/**
* If the resource want to receive sms notifications
*/
@ApiMember(Description="If the resource want to receive sms notifications")
public Boolean SMSNotification = null;
/**
* If the resource want to receive email reminders
*/
@ApiMember(Description="If the resource want to receive email reminders")
public Boolean EmailReminder = null;
/**
* If the resource want to receive sms reminders
*/
@ApiMember(Description="If the resource want to receive sms reminders")
public Boolean SMSReminder = null;
public Integer getId() { return Id; }
public CompanyUserResource setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public CompanyUserResource setName(String value) { this.Name = value; return this; }
public Boolean isActive() { return Active; }
public CompanyUserResource setActive(Boolean value) { this.Active = value; return this; }
public String getDescription() { return Description; }
public CompanyUserResource setDescription(String value) { this.Description = value; return this; }
public String getEmail() { return Email; }
public CompanyUserResource setEmail(String value) { this.Email = value; return this; }
public String getPhone() { return Phone; }
public CompanyUserResource setPhone(String value) { this.Phone = value; return this; }
public String getColor() { return Color; }
public CompanyUserResource setColor(String value) { this.Color = value; return this; }
public Uri getImageUrl() { return ImageUrl; }
public CompanyUserResource setImageUrl(Uri value) { this.ImageUrl = value; return this; }
public Boolean isEmailNotification() { return EmailNotification; }
public CompanyUserResource setEmailNotification(Boolean value) { this.EmailNotification = value; return this; }
public Boolean isSmsNotification() { return SMSNotification; }
public CompanyUserResource setSmsNotification(Boolean value) { this.SMSNotification = value; return this; }
public Boolean isEmailReminder() { return EmailReminder; }
public CompanyUserResource setEmailReminder(Boolean value) { this.EmailReminder = value; return this; }
public Boolean isSmsReminder() { return SMSReminder; }
public CompanyUserResource setSmsReminder(Boolean value) { this.SMSReminder = value; return this; }
}
public static class CompanyUserRolesQueryResponse
{
public UUID RoleId = null;
public String Name = null;
public String Description = null;
public UUID getRoleId() { return RoleId; }
public CompanyUserRolesQueryResponse setRoleId(UUID value) { this.RoleId = value; return this; }
public String getName() { return Name; }
public CompanyUserRolesQueryResponse setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public CompanyUserRolesQueryResponse setDescription(String value) { this.Description = value; return this; }
}
}
Java SuperAdminDeleteCompanyUser DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
DELETE /superadmin/administrators/{Id} HTTP/1.1 Host: api.bokamera.se Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Firstname":"String","Lastname":"String","Email":"String","Phone":"String","WorkerId":"String","ResourceId":0,"Resource":{"Id":0,"Name":"String","Active":false,"Description":"String","Email":"String","Phone":"String","Color":"String","EmailNotification":false,"SMSNotification":false,"EmailReminder":false,"SMSReminder":false},"Roles":[{"Name":"String","Description":"String"}],"Active":false}