tvpl.api

<back to all web services

GetAllRoleReqest

Lấy tất cả các Role

Requires Authentication
Required role:super-admin
The following routes are available for this service:
GET/roles
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Lấy tất cả các Role
    */
    public static class GetAllRoleReqest implements IGet
    {
        
    }

    public static class GetAllRoleResponse implements IResponseRequest
    {
        public ArrayList<Roles> roles = null;
        public Integer code = null;
        public String message = null;
        
        public ArrayList<Roles> getRoles() { return roles; }
        public GetAllRoleResponse setRoles(ArrayList<Roles> value) { this.roles = value; return this; }
        public Integer getCode() { return code; }
        public GetAllRoleResponse setCode(Integer value) { this.code = value; return this; }
        public String getMessage() { return message; }
        public GetAllRoleResponse setMessage(String value) { this.message = value; return this; }
    }

    public static class Roles
    {
        public Integer id = null;
        @StringLength(50)
        public String name = null;

        public Date createdAt = null;
        public Date deletedAt = null;
        public Date updatedAt = null;
        public Integer updatedBy = null;
        public Integer deletedBy = null;
        public Integer createdBy = null;
        @Ignore()
        public ArrayList<String> permission = null;
        
        public Integer getId() { return id; }
        public Roles setId(Integer value) { this.id = value; return this; }
        public String getName() { return name; }
        public Roles setName(String value) { this.name = value; return this; }
        public Date getCreatedAt() { return createdAt; }
        public Roles setCreatedAt(Date value) { this.createdAt = value; return this; }
        public Date getDeletedAt() { return deletedAt; }
        public Roles setDeletedAt(Date value) { this.deletedAt = value; return this; }
        public Date getUpdatedAt() { return updatedAt; }
        public Roles setUpdatedAt(Date value) { this.updatedAt = value; return this; }
        public Integer getUpdatedBy() { return updatedBy; }
        public Roles setUpdatedBy(Integer value) { this.updatedBy = value; return this; }
        public Integer getDeletedBy() { return deletedBy; }
        public Roles setDeletedBy(Integer value) { this.deletedBy = value; return this; }
        public Integer getCreatedBy() { return createdBy; }
        public Roles setCreatedBy(Integer value) { this.createdBy = value; return this; }
        public ArrayList<String> getPermission() { return permission; }
        public Roles setPermission(ArrayList<String> value) { this.permission = value; return this; }
    }

}

Java GetAllRoleReqest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /roles HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"roles":[{"id":0,"name":"String","createdAt":"0001-01-01T00:00:00.0000000+07:06","deletedAt":"0001-01-01T00:00:00.0000000+07:06","updatedAt":"0001-01-01T00:00:00.0000000+07:06","updatedBy":0,"deletedBy":0,"createdBy":0,"permission":["String"]}],"code":0,"message":"String"}