Get image
GET
/images/{publicID}
curl -X GET "https://api.moov.io/images/{publicID}"import { Moov } from "@moovio/sdk";
const moov = new Moov();
async function run() {
const result = await moov.images.getPublic({
publicID: "<id>",
});
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Moov\MoovPhp;
$sdk = MoovPhp\Moov::builder()->build();
$response = $sdk->images->getPublic(
publicID: '<id>',
size: '400x400'
);
if ($response->twoHundredImageWebpBytes !== null) {
// handle response
}package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.operations.GetPublicImageResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Moov sdk = Moov.builder()
.build();
GetPublicImageResponse res = sdk.images().getPublic()
.publicID("<id>")
.size("400x400")
.call();
if (res.twoHundredImageWebpResponseStream().isPresent()) {
// handle response
}
}
}from moovio_sdk import Moov
with Moov() as moov:
res = moov.images.get_public(public_id="<id>", size="400x400")
# Handle response
print(res)require 'moov_ruby'
Models = ::Moov::Models
s = ::Moov::Client.new
res = s.images.get_public(public_id: '<id>', size: '400x400')
unless res.two_hundred_image_webp_bytes.nil?
# handle response
endusing Moov.Sdk;
var sdk = new MoovClient();
var res = await sdk.Images.GetPublicAsync(
publicID: "<id>",
size: "400x400"
);
// handle responseResponse body for returning the raw image bytes.
Returns an image file (image/jpeg).
Returns an image file (image/png).
Returns an image file (image/webp).
Response headers
Cache-Control
string
required
Etag
string
The resource has not changed; client may use its cached representation.
Response headers
Cache-Control
string
Etag
string
x-request-id
string
required
A unique identifier used to trace requests.
The requested resource was not found.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Request was refused due to rate limiting.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed due to an unexpected error.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed because a downstream service returned an invalid response.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed because a downstream service is unavailable.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Headers
if-none-match
string
Path parameters
publicID
string
required
Query parameters
size
string
Optional parameter to request a resized version of the image (WxH).
If either dimension is 0, the image will be scaled proportionally based on the non-zero dimension. Dimensions are capped at 2048 pixels. A default size of 400x400 will be used if this parameter is omitted.
Default:
400x400