| GET | /articles/types | Query article types | Query article types |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@ValidateRequest(Validator="IsAuthenticated")
public static class ArticleTypeQuery implements ICompany
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
@ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
public UUID CompanyId = null;
public UUID getCompanyId() { return CompanyId; }
public ArticleTypeQuery setCompanyId(UUID value) { this.CompanyId = value; return this; }
}
public static class ArticleTypesQueryResponse
{
/**
* The article type id
*/
@ApiMember(Description="The article type id")
public Integer Id = null;
/**
* The article type name
*/
@ApiMember(Description="The article type name")
public String Name = null;
/**
* The article type description
*/
@ApiMember(Description="The article type description")
public String Description = null;
public Integer getId() { return Id; }
public ArticleTypesQueryResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public ArticleTypesQueryResponse setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public ArticleTypesQueryResponse setDescription(String value) { this.Description = value; return this; }
}
}
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 /articles/types HTTP/1.1 Host: api.bokamera.se Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Id":0,"Name":"String","Description":"String"}