| GET | /api/v1/utils/animal-types/{categoryId} |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetAnimalTypesByCategory implements IGet
{
public Integer categoryId = null;
public Integer getCategoryId() { return categoryId; }
public GetAnimalTypesByCategory setCategoryId(Integer value) { this.categoryId = value; return this; }
}
public static class GetAnimalTypesByCategoryResponse extends BaseResponse
{
public ArrayList<AnimalType> animalTypes = null;
public ArrayList<AnimalType> getAnimalTypes() { return animalTypes; }
public GetAnimalTypesByCategoryResponse setAnimalTypes(ArrayList<AnimalType> value) { this.animalTypes = value; return this; }
}
public static class BaseResponse
{
public Status status = null;
public Status getStatus() { return status; }
public BaseResponse setStatus(Status value) { this.status = value; return this; }
}
public static class Status
{
public String message = null;
public Integer statusCode = null;
public String getMessage() { return message; }
public Status setMessage(String value) { this.message = value; return this; }
public Integer getStatusCode() { return statusCode; }
public Status setStatusCode(Integer value) { this.statusCode = value; return this; }
}
public static class AnimalType
{
public Integer id = null;
@Required()
@StringLength(50)
public String name = null;
@References(AnimalCategory.class)
public Integer animalCategoryId = null;
public Integer getId() { return id; }
public AnimalType setId(Integer value) { this.id = value; return this; }
public String getName() { return name; }
public AnimalType setName(String value) { this.name = value; return this; }
public Integer getAnimalCategoryId() { return animalCategoryId; }
public AnimalType setAnimalCategoryId(Integer value) { this.animalCategoryId = value; return this; }
}
}
Java GetAnimalTypesByCategory DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/v1/utils/animal-types/{categoryId} HTTP/1.1
Host: pecuario-backend.develsystems.com
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"animalTypes":[{"id":0,"name":"String","animalCategoryId":0}]}