| 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 Integer id = null;
/**
* Manually control the server resizing of the image.
*/
@ApiMember(Description="Manually control the server resizing of the image.")
public SizeType 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 Integer getId() { return id; }
public GetImage setId(Integer value) { this.id = value; return this; }
public SizeType getImageSize() { return imageSize; }
public GetImage setImageSize(SizeType 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 SizeType
{
@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;
SizeType(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 .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /image HTTP/1.1 Host: antel.api.dev.86degrees.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />