| GET,OPTIONS | /v1/Roles/{RoleId} |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class GetRoleByIdRequest
{
public Integer RoleId = null;
public Integer getRoleId() { return RoleId; }
public GetRoleByIdRequest setRoleId(Integer value) { this.RoleId = value; return this; }
}
public static class Role
{
public Integer RoleId = null;
public UUID TenantId = null;
public String Code = null;
public String Name = null;
public String Description = null;
public Boolean IsSystem = null;
public Boolean IsActive = null;
public Date CreatedUtc = null;
public ArrayList<Permission> Permissions = new ArrayList<Permission>();
public Integer getRoleId() { return RoleId; }
public Role setRoleId(Integer value) { this.RoleId = value; return this; }
public UUID getTenantId() { return TenantId; }
public Role setTenantId(UUID value) { this.TenantId = value; return this; }
public String getCode() { return Code; }
public Role setCode(String value) { this.Code = value; return this; }
public String getName() { return Name; }
public Role setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public Role setDescription(String value) { this.Description = value; return this; }
public Boolean getIsSystem() { return IsSystem; }
public Role setIsSystem(Boolean value) { this.IsSystem = value; return this; }
public Boolean getIsActive() { return IsActive; }
public Role setIsActive(Boolean value) { this.IsActive = value; return this; }
public Date getCreatedUtc() { return CreatedUtc; }
public Role setCreatedUtc(Date value) { this.CreatedUtc = value; return this; }
public ArrayList<Permission> getPermissions() { return Permissions; }
public Role setPermissions(ArrayList<Permission> value) { this.Permissions = value; return this; }
}
public static class Permission
{
public Integer PermissionId = null;
public String Module = null;
public String Resource = null;
public String Action = null;
public String Name = null;
public String Description = null;
public String Tags = null;
public Integer SortOrder = null;
public Boolean IsActive = null;
public Date CreatedUtc = null;
public String Code = null;
public Integer getPermissionId() { return PermissionId; }
public Permission setPermissionId(Integer value) { this.PermissionId = value; return this; }
public String getModule() { return Module; }
public Permission setModule(String value) { this.Module = value; return this; }
public String getResource() { return Resource; }
public Permission setResource(String value) { this.Resource = value; return this; }
public String getAction() { return Action; }
public Permission setAction(String value) { this.Action = value; return this; }
public String getName() { return Name; }
public Permission setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public Permission setDescription(String value) { this.Description = value; return this; }
public String getTags() { return Tags; }
public Permission setTags(String value) { this.Tags = value; return this; }
public Integer getSortOrder() { return SortOrder; }
public Permission setSortOrder(Integer value) { this.SortOrder = value; return this; }
public Boolean getIsActive() { return IsActive; }
public Permission setIsActive(Boolean value) { this.IsActive = value; return this; }
public Date getCreatedUtc() { return CreatedUtc; }
public Permission setCreatedUtc(Date value) { this.CreatedUtc = value; return this; }
public String getCode() { return Code; }
public Permission setCode(String value) { this.Code = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Roles/{RoleId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"RoleId":0,"TenantId":"00000000000000000000000000000000","Code":"String","Name":"String","Description":"String","IsSystem":false,"IsActive":false,"CreatedUtc":"0001-01-01T00:00:00.0000000","Permissions":[{"PermissionId":0,"Module":"String","Resource":"String","Action":"String","Name":"String","Description":"String","Tags":"String","SortOrder":0,"IsActive":false,"CreatedUtc":"0001-01-01T00:00:00.0000000","Code":"String"}]}