Image_ImportImage
Imports an image from a remote web address.
Path Parameters
- user string required
The user id.
- album string required
The album id.
Request Body required
- parent string required
The image parent of the image. This value defaults to the user performing the import operation if no parent is set.
- uri string required
A publicly-accessible image HTTP/HTTPS URL. When fetching images from HTTP/HTTPS URLs, Animeshon cannot guarantee that the request will be completed. Your request may fail if the specified host denies the request (e.g. due to request throttling or DoS prevention), or if Animeshon throttles requests to the site for abuse prevention. You should not depend on externally-hosted images for production applications.
cacheOptions object
The WebCache options to be used when importing an image from a public website address.
- refresh boolean
If refresh is set to true the image is imported from the remote address regardless of an existing local cache, if the fetched image does not match the existing cache the new image is stored and a new resource is created, otherwise the existing (cached) resource is returned.
- ignore boolean
If ignore is set to true no cache lookup is performed and the image is imported into a new resource. If both "ignore" and "refresh" are set to true then "refresh" has no effect.
- 200
- default
OK
Schema
result object
- name string
The image resource name.
error object
- statusCode int32
The status code returned from the remote server.
- details string
The details related to the import failure.
- cacheHit boolean
Whether this image was found in the cache.
Default error response
Schema
- code int32
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- message string
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details object[]
A list of messages that carry the error details. There is a common set of message types for APIs to use.
- @type string
The type of the serialized message.