| GET | /image | Returns the specified image based on the Id. | |
|---|---|---|---|
| GET | /image/{id} | Returns the specified image based on the Id. |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetImage
{
@ApiMember(DataType="int", IsRequired=true)
public UUID Id = null;
/**
* Manually control the server resizing of the image.
*/
@ApiMember(Description="Manually control the server resizing of the image.")
public ImageSize ImageSize = null;
/**
* Set to true to return the image in Base64 format.
*/
@ApiMember(DataType="boolean", Description="Set to true to return the image in Base64 format.")
public Boolean Base64 = null;
@ApiMember()
public String Platform = null;
/**
* Force this file to be returned as a thumbnail (small)
*/
@ApiMember(Description="Force this file to be returned as a thumbnail (small)")
public Boolean Thumbnail = null;
public UUID getId() { return Id; }
public GetImage setId(UUID value) { this.Id = value; return this; }
public ImageSize getImageSize() { return ImageSize; }
public GetImage setImageSize(ImageSize value) { this.ImageSize = value; return this; }
public Boolean isBase64() { return Base64; }
public GetImage setBase64(Boolean value) { this.Base64 = value; return this; }
public String getPlatform() { return Platform; }
public GetImage setPlatform(String value) { this.Platform = value; return this; }
public Boolean isThumbnail() { return Thumbnail; }
public GetImage setThumbnail(Boolean value) { this.Thumbnail = value; return this; }
}
public static enum ImageSize
{
@SerializedName("0") Unknown(0),
@SerializedName("1") Full(1),
@SerializedName("2") Small(2),
@SerializedName("3") Medium(3),
@SerializedName("4") Large(4),
@SerializedName("5") XLarge(5);
private final int value;
ImageSize(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /image HTTP/1.1 Host: returnit-api-dev.happen.zone Accept: text/jsv