| GET | /widget/configuration | List or get widget configurations | Returns widget configurations. If slug is provided, returns a single configuration matching that slug. Otherwise returns all configurations for the company. |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
@ValidateRequest(Validator="IsAuthenticated")
public static class WidgetConfigurationQuery 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;
/**
* Optional slug to fetch a single configuration (e.g., 'hairsalon-001'). If provided, ignores other filter parameters.
*/
@ApiMember(Description="Optional slug to fetch a single configuration (e.g., 'hairsalon-001'). If provided, ignores other filter parameters.")
public String Slug = null;
/**
* Filter by schema version.
*/
@ApiMember(Description="Filter by schema version.")
public Integer SchemaVersion = null;
/**
* Number of records to skip
*/
@ApiMember(Description="Number of records to skip")
public Integer Skip = null;
/**
* Number of records to take
*/
@ApiMember(Description="Number of records to take")
public Integer Take = null;
/**
* Sort field
*/
@ApiMember(Description="Sort field")
public String OrderBy = null;
public UUID getCompanyId() { return CompanyId; }
public WidgetConfigurationQuery setCompanyId(UUID value) { this.CompanyId = value; return this; }
public String getSlug() { return Slug; }
public WidgetConfigurationQuery setSlug(String value) { this.Slug = value; return this; }
public Integer getSchemaVersion() { return SchemaVersion; }
public WidgetConfigurationQuery setSchemaVersion(Integer value) { this.SchemaVersion = value; return this; }
public Integer getSkip() { return Skip; }
public WidgetConfigurationQuery setSkip(Integer value) { this.Skip = value; return this; }
public Integer getTake() { return Take; }
public WidgetConfigurationQuery setTake(Integer value) { this.Take = value; return this; }
public String getOrderBy() { return OrderBy; }
public WidgetConfigurationQuery setOrderBy(String value) { this.OrderBy = value; return this; }
}
@DataContract
public static class QueryResponse<T>
{
@DataMember(Order=1)
public Integer Offset = null;
@DataMember(Order=2)
public Integer Total = null;
@DataMember(Order=3)
public ArrayList<AccessKeyTypeResponse> Results = new ArrayList<AccessKeyTypeResponse>();
@DataMember(Order=4)
public HashMap<String,String> Meta = null;
@DataMember(Order=5)
public ResponseStatus ResponseStatus = null;
public Integer getOffset() { return Offset; }
public QueryResponse<T> setOffset(Integer value) { this.Offset = value; return this; }
public Integer getTotal() { return Total; }
public QueryResponse<T> setTotal(Integer value) { this.Total = value; return this; }
public ArrayList<AccessKeyTypeResponse> getResults() { return Results; }
public QueryResponse<T> setResults(ArrayList<AccessKeyTypeResponse> value) { this.Results = value; return this; }
public HashMap<String,String> getMeta() { return Meta; }
public QueryResponse<T> setMeta(HashMap<String,String> value) { this.Meta = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public QueryResponse<T> setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class AccessKeyTypeResponse
{
public Integer Id = null;
public String KeyType = null;
public String Description = null;
public Integer getId() { return Id; }
public AccessKeyTypeResponse setId(Integer value) { this.Id = value; return this; }
public String getKeyType() { return KeyType; }
public AccessKeyTypeResponse setKeyType(String value) { this.KeyType = value; return this; }
public String getDescription() { return Description; }
public AccessKeyTypeResponse setDescription(String value) { this.Description = value; return this; }
}
}
Java WidgetConfigurationQuery 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 /widget/configuration HTTP/1.1 Host: testapi.bokamera.se Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Offset":0,"Total":0,"Results":[{"Id":"String","Name":"String","Slug":"String","Description":"String","Configuration":"String","SchemaVersion":0,"UpdatedDate":"0001-01-01T00:00:00.0000000+00:00","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}