| Required permission: | view-role |
| GET | /roles |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
public static class RoleRequest extends PagingRequest
{
public String search = null;
public String getSearch() { return search; }
public RoleRequest setSearch(String value) { this.search = value; return this; }
}
public static class PagingRequest
{
public Integer page = null;
public Integer limit = null;
public Integer offSet = null;
public Integer getPage() { return page; }
public PagingRequest setPage(Integer value) { this.page = value; return this; }
public Integer getLimit() { return limit; }
public PagingRequest setLimit(Integer value) { this.limit = value; return this; }
public Integer getOffSet() { return offSet; }
public PagingRequest setOffSet(Integer value) { this.offSet = value; return this; }
}
public static class PageResponse<SystemConfig> implements IResponseRequest
{
public Integer code = null;
public Long totalValue = null;
public String message = null;
public ArrayList<SystemConfig> data = null;
public Pagination pagination = null;
public Integer getCode() { return code; }
public PageResponse<SystemConfig> setCode(Integer value) { this.code = value; return this; }
public Long getTotalValue() { return totalValue; }
public PageResponse<SystemConfig> setTotalValue(Long value) { this.totalValue = value; return this; }
public String getMessage() { return message; }
public PageResponse<SystemConfig> setMessage(String value) { this.message = value; return this; }
public ArrayList<SystemConfig> getData() { return data; }
public PageResponse<SystemConfig> setData(ArrayList<SystemConfig> value) { this.data = value; return this; }
public Pagination getPagination() { return pagination; }
public PageResponse<SystemConfig> setPagination(Pagination value) { this.pagination = value; return this; }
}
public static class SystemConfig implements ICreated, IUpdate
{
public Integer id = null;
public String name = null;
public String value = null;
public String description = null;
public Boolean isActive = null;
@Required()
public Date createdDate = null;
@Required()
public Date updatedDate = null;
public Integer getId() { return id; }
public SystemConfig setId(Integer value) { this.id = value; return this; }
public String getName() { return name; }
public SystemConfig setName(String value) { this.name = value; return this; }
public String getValue() { return value; }
public SystemConfig setValue(String value) { this.value = value; return this; }
public String getDescription() { return description; }
public SystemConfig setDescription(String value) { this.description = value; return this; }
public Boolean getIsActive() { return isActive; }
public SystemConfig setIsActive(Boolean value) { this.isActive = value; return this; }
public Date getCreatedDate() { return createdDate; }
public SystemConfig setCreatedDate(Date value) { this.createdDate = value; return this; }
public Date getUpdatedDate() { return updatedDate; }
public SystemConfig setUpdatedDate(Date value) { this.updatedDate = value; return this; }
}
public static class Pagination
{
public Long total = null;
public Integer pages = null;
public Long offset = null;
public Integer limit = null;
public Integer currentPage = null;
public Long getTotal() { return total; }
public Pagination setTotal(Long value) { this.total = value; return this; }
public Integer getPages() { return pages; }
public Pagination setPages(Integer value) { this.pages = value; return this; }
public Long getOffset() { return offset; }
public Pagination setOffset(Long value) { this.offset = value; return this; }
public Integer getLimit() { return limit; }
public Pagination setLimit(Integer value) { this.limit = value; return this; }
public Integer getCurrentPage() { return currentPage; }
public Pagination setCurrentPage(Integer value) { this.currentPage = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /roles HTTP/1.1 Host: chienbinhdevias-admin-api-sandbox.adnx.vn Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
code: 0,
totalValue: 0,
message: String,
data:
[
{
id: 0,
roleName: String,
roleCode: String,
description: String,
showPermission: String,
isActive: 0,
status: 0
}
]
}