Admin API reference

Overview

The administrative API is a rate-limited API that provides full control of all uploaded media assets, fetched social profile pictures, generated transformations and more.

Protocol and authentication

The API is accessed using HTTPS to endpoints in the following format:

https://api.cloudinary.com/v1_1/:cloud_name/:action

For example, image listing of the 'demo' account:

https://api.cloudinary.com/v1_1/demo/resources/image

You can try the following cURL command after setting the correct cloud name, API key and API secret of your account:

curl 'https://API_KEY:API_SECRET@api.cloudinary.com/v1_1/CLOUD_NAME/resources/image'

Authentication is done using Basic Authentication over secure HTTP. Your Cloudinary API Key and API Secret are used for the authentication.

Request parameters are appended to the URL. The response is in a simple JSON snippet. Like any REST API, read-only requests are sent in HTTP GET while write requests are sent in PUT, POST and DELETE.

Pagination

Listing methods of the API return a limited set of results ordered by the creation time of the relevant entities. You can control the number of results returned in a single request by specifying the max_results parameter. The default is 10 for most listing. There is a maximum number of results you can request for a single API call (either 100 or 500 for the various methods).

Resource deletion methods also operate in chunks. When a listing request has more results to return than max_results or when a deletion request has more resources to delete than 1000, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing or deletion request. This way you can browse through the full lists of uploaded resources, transformations and tags of your Cloudinary account or delete the entire set that matches the deletion query.

Error handling

The API returns the status of requests using the HTTP status code:

  • 200 - OK. Successful.
  • 400 - Bad request.
  • 401 - Authorization required.
  • 403 - Not allowed.
  • 404 - Not found
  • 409 - Already exists
  • 420 - Rate limited

The API wrapping of Cloudinary's client libraries report errors by raising applicative exception.

In addition, a JSON with an informative message is returned. For example:

{ "error": { "message": "Resource not found - strange_name" } }

Usage limits

You can use the Admin API quite extensively, but it is a rate limited API. When using the Free plan, Admin API requests are limited to 500 per hour (12,000 daily). Subscribe to one of the paid plans to increase this limit. If you require more flexible limits, don’t hesitate to contact us.

Tip: This limit refers only to Admin API requests, and not to requests that use the Upload API, which is not rate-limited. In some cases, you may be able to use certain methods of the Upload API to achieve your administration goals. For example, you can modify or remove tags for one or multiple resources using the tags method. You can modify many attributes of an individual resource using the explicit method, and you can return most details about a single (original) resource in response to any upload or explicit method call.

For each Admin API call, standard HTTP headers are returned with details on your current usage statistics, including your per-hour limit, remaining number of actions and the time the hourly count will be reset.

Here is how these headers might look like:

X-FeatureRateLimit-Limit: 500
X-FeatureRateLimit-Remaining: 499
X-FeatureRateLimit-Reset: Wed, 03 Oct 2012 08:00:00 GMT

Framework integration

Our client libraries provide an easy to use wrapper for this URL-based API, utilizing your native programming language of choice. Request building and authentication are done automatically, and the JSON response is parsed and returned.

Usage examples
URL:
GET /resources/image
Ruby:
require 'cloudinary'
result = Cloudinary::Api.resources
PHP:
require "cloudinary.php";
require "api.php";
$api = new \Cloudinary\Api();
$result = $api->resources();
Python:
import cloudinary.api
result = cloudinary.api.resources()
Node.js:
var cloudinary = require('cloudinary');
cloudinary.v2.api.resources(
  function(error, result){console.log(result)});
Java:
import com.cloudinary.*;
import com.cloudinary.utils.*;
Map config = ObjectUtils.asMap(
  "cloud_name", "my_cloud_name",
  "api_key", "my_api_key",
  "api_secret", "my_api_secret");
Cloudinary cloudinary = new Cloudinary(config);
Api api = cloudinary.api();
Map result = api.resources(ObjectUtils.emptyMap());
.Net:
using CloudinaryDotNet;
using CloudinaryDotNet.Actions;
Account account = new Account(
  "my_cloud_name",
  "my_api_key",
  "my_api_secret");
 Cloudinary cloudinary = new Cloudinary(account);
 ListResourcesResult result = cloudinary.ListResources();
Endpoint:
/resources/image
Limit checking
Ruby:
$ result = Cloudinary::Api.resources
$ result.rate_limit_allowed
=> 500
$ result.rate_limit_remaining
=> 499
$ result.rate_limit_reset_at
=> 2012-10-03 10:00:00 +0200
PHP:
php > $result = $api->resources();
php > var_dump($result->rate_limit_allowed);
int(500)
php > var_dump($result->rate_limit_allowed);
int(500)
php > var_dump($result->rate_limit_remaining);
int(499)
php > var_dump($result->rate_limit_reset_at);
int(1349622000)
Python:
>>> result = cloudinary.api.resources()
>>> result.rate_limit_allowed
500
>>>result.rate_limit_remaining
499
>>>result.rate_limit_reset_at
(2012, 10, 7, 15, 0, 0, 0, 1, -1)
Node.js:
> cloudinary.v2.api.resources(
  function(error, result) {
    console.log(result.rate_limit_allowed,
                result.rate_limit_remaining,
                result.rate_limit_reset_at)
  });
> 500 499 Sun, 07 Oct 2012 15:00:00 GMT
Java:
ApiResponse result = api.resources(ObjectUtils.emptyMap());
System.out.println(result.apiRateLimit().getLimit());
=> 500
System.out.println(result.apiRateLimit().getRemaining());
=> 499
System.out.println(result.apiRateLimit().getReset());
=> 2012-10-03 10:00:00 +0200
.Net:
var result = cloudinary.ListResources();
result.Limit
// returns 500
result.Remaining
// returns 499
result.Reset
//returns  2012-10-03 10:00:00 +0200

Browse resources

Use the resources methods to: list all uploaded resources, list resources by tag, list resources in moderation queues, list tags or list the details of a single resource.

GET /resources/:resource_type(/:type)

List resources

Parameters:
  • resource_type - Optional (String, default: image). The type of file. Possible values: image, raw, video. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API). Note: Use the video resource type for all video resources as well as for audio files, such as .mp3.
  • type - Optional (String, default: all). The storage type: upload, private, authenticated, facebook, twitter, gplus, instagram_name, gravatar, youtube, hulu, vimeo, animoto, worldstarhiphop or dailymotion. Relevant as a parameter only when using the SDKs (the type is included in the endpoint URL for direct calls to the HTTP API).
  • prefix - Optional. (String). Find all resources with a public ID that starts with the given prefix. The resources are sorted by public ID in the response.
  • public_ids - Optional. (String, comma-separated list of public IDs). List resources with the given public IDs (up to 100).
  • max_results - Optional. (Integer, default=10. maximum=500). Max number of resources to return.
  • next_cursor - Optional. When a listing request has more results to return than max_results, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing request.
  • start_at - Optional. (Timestamp string). List resources that were created since the given timestamp. Supported if no prefix or public IDs were specified.
  • direction - Optional. (String/Integer, "asc" (or 1), "desc" (or -1), default: "desc" according to the created_at date). Control the order of returned resources. Note that if a prefix is specified, this parameter is ignored and the results are sorted by public ID.
  • tags - Optional (Boolean, default: false). If true, include the list of tag names assigned each resource.
  • context - Optional (Boolean, default: false). If true, include key-value pairs of context associated with each resource.
  • moderations - Optional (Boolean, default: false). If true, include image moderation status of each listed resource.
Result sample:
{
  "resources": [
    {
      "public_id": "face_center",
      "format": "jpg",
      "version": 1333013579,
      "resource_type": "image",
      "type": "upload",
      "created_at": "2012-03-29T09:32:59Z",
      "bytes": 128891,
      "width": 283,
      "height": 424,
      "access_mode": "public",
      "url": "http://res.cloudinary.com/demo/image/upload/v1333013579/face_center.jpg",
      "secure_url": "https://.../image/upload/v1333013579/face_center.jpg"
    },
    {
      "public_id": "12208495",
      "format": "jpg",
      "resource_type": "image",
      "type": "facebook",
      "created_at": "2012-10-06T17:18:52Z",
      "bytes": 0,
      "url": "http://res.cloudinary.com/demo/image/facebook/4.jpg",
      "secure_url": "https://.../image/facebook/4.jpg"
    },
  ]
}
List all images
URL:
GET /resources/image
Ruby:
Cloudinary::Api.resources
PHP:
$api->resources();
Python:
cloudinary.api.resources()
Node.js:
cloudinary.v2.api.resources(
  function(error, result){console.log(result)});
Java:
api.resources(ObjectUtils.emptyMap());
.Net:
cloudinary.ListResources();
Endpoint:
/resources/image
List uploaded images:
URL:
GET /resources/image/upload
Ruby:
Cloudinary::Api.resources(
  :type => :upload)
PHP:
$api->resources(
  array("type" => "upload"));
Python:
cloudinary.api.resources(type = "upload")
Node.js:
cloudinary.v2.api.resources(
  { type: 'upload' }, 
  function(error, result){});
Java:
api.resources(
  ObjectUtils.asMap("type", "upload"));
.Net:
var listResourcesParams = new ListResourcesParams(){
  Type = "upload"};
var listResourcesResult = cloudinary.ListResources(listResourcesParams);
Endpoint:
/resources/image/upload
List all uploaded images with a given prefix
URL:
GET /resources/image/upload/?prefix=sample
Ruby:
Cloudinary::Api.resources(
  :type => :upload, 
  :prefix => "sample")
PHP:
$api->resources(
  array(
    "type" => "upload", 
    "prefix" => "sample"));
Python:
cloudinary.api.resources(
  type = "upload", 
  prefix = "sample")
Node.js:
cloudinary.v2.api.resources(
  { type: 'upload', 
    prefix: 'sample' }, 
  function(error, result){console.log(result); });
Java:
api.resources(
  ObjectUtils.asMap(
    "type", "upload", 
    "prefix", "sample"));
.Net:
cloudinary.ListResourcesByPrefix("sample", "upload");
Endpoint:
/resources/image/upload/?prefix=sample
List Facebook images:
URL:
GET /resources/image/facebook
Ruby:
Cloudinary::Api.resources(:type => :facebook)
PHP:
$api->resources(
  array("type" => "facebook"));
Python:
cloudinary.api.resources(type = "facebook"))
Node.js:
cloudinary.v2.api.resources(
  { type: 'facebook' }, 
  function(error, result){console.log(result);});
Java:
api.resources(
  ObjectUtils.asMap("type", "facebook"));
.Net:
var listResourcesParams = new ListResourcesParams(){
  Type = "facebook"};
var listResourcesResult = cloudinary.ListResources(listResourcesParams);
Endpoint:
/resources/image/facebook
List raw uploaded files
URL:
GET /resources/raw
Ruby:
Cloudinary::Api.resources(
  :resource_type => :raw)
PHP:
$api->resources(
  array("resource_type" => "raw"));
Python:
cloudinary.api.resources(resource_type = "raw")
Node.js:
cloudinary.v2.api.resources(
  { resource_type: 'raw' }, 
  function(error, result){console.log(result); });
Java:
api.resources(
  ObjectUtils.asMap("resource_type", "raw"));
.Net:
var listResourcesParams = new ListResourcesParams(){
  ResourceType = "raw"};
var listResourcesResult = cloudinary.ListResources(listResourcesParams);
Endpoint:
/resources/raw
List all uploaded images with the given IDs
URL:
GET /resources/image/upload/?public_ids[]=user_photo_1&public_ids[]=user_photo_2
Ruby:
resources_by_ids
Cloudinary::Api.resources_by_ids(["user_photo_1", "user_photo_2"])
PHP:
$api->resources_by_ids(array("user_photo_1", "user_photo_2"));
Python:
cloudinary.api.resources_by_ids(["user_photo_1", "user_photo_2"])
Node.js:
cloudinary.v2.api.resources_by_ids(["user_photo_1", "user_photo_2"],
  function(error, result){console.log(result);});
Java:
api.resources_by_ids(Arrays.asList("user_photo_1", "user_photo_2"),
  ObjectUtils.emptyMap());
.Net:
var publicIds = new List<string>(){"user_photo_1", "user_photo_2" };
cloudinary.ListResourceByPublicIds(publicIds);
Endpoint:
/resources/image/upload/?public_ids[]=user_photo_1&public_ids[]=user_photo_2
GET /resources/:resource_type/tags/:tag

List resources by tag

Retrieve a list of resources with a specified tag. This method does not return deleted resources even if they have been backed up.

Parameters:
  • resource_type - Optional (String, default: image). The type of files for which you want to retrieve tags. Possible values: image, raw, video. Note: Use the video resource type for all video resources as well as for audio files, such as .mp3. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API).
  • max_results - Optional. (Integer, default=10. maximum=500). Max number of resources to return.
  • next_cursor - Optional. When a listing request has more results to return than max_results, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing request.
  • direction - Optional. (String/Integer, "asc" (or 1), "desc" (or -1), default: "desc" by creation date). Control the order of returned resources.
  • tags - Optional (Boolean, default: false). If true, include the list of tag names assigned each resource.
  • context - Optional (Boolean, default: false). If true, include key-value pairs of context associated with each resource.
  • moderations - Optional (Boolean, default: false). If true, include image moderation status of each listed resource.
List images by tag
URL:
GET /resources/image/tags/mytag
Ruby:
Cloudinary::Api.resources_by_tag('mytag')
PHP:
$api->resources_by_tag("mytag");
Python:
cloudinary.api.resources_by_tag("mytag")
Node.js:
cloudinary.v2.api.resources_by_tag("mytag", 
  function(error, result){console.log(result); });
Java:
api.resourcesByTag("mytag", ObjectUtils.emptyMap());
.Net:
cloudinary.ListResourcesByTag("mytag");
Endpoint:
/resources/image/tags/mytag
List raw files by tag
URL:
GET /resources/raw/tags/mytag
Ruby:
Cloudinary::Api.resources_by_tag('mytag',
  :resource_type => :raw)
PHP:
$api->resources_by_tag("mytag",
  array("resource_type" => "raw"));
Python:
cloudinary.api.resources_by_tag("mytag",
  resource_type = "raw")
Node.js:
cloudinary.v2.api.resources_by_tag("mytag", 
  { resource_type: 'raw'}
  function(error, result){console.log(result); });
Java:
api.resourcesByTag("mytag", 
  ObjectUtils.asMap("resource_type", "raw"));
.Net:
var listResourcesParams = new ListResourcesParams(){
  Tag = "mytag",
  ResourceType = "raw"};
var listResourcesResult = cloudinary.ListResources(listResourcesParams);
Endpoint:
/resources/raw/tags/mytag
GET /resources/:resource_type/context/

List resources by context

Retrieve a list of resources with a specified context key. This method does not return deleted resources even if they have been backed up.

Parameters:
  • key - Required. (String). Only resources with this context key are returned.
  • resource_type - Optional (String, default: image). The type of file. Possible values: image, raw, video. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API). Note: Use the video resource type for all video resources as well as for audio files, such as .mp3.
  • value - Optional. (String). Only resources with this value for the context key are returned. If this parameter is not provided, all resources with the given context key are returned, regardless of the actual value of the key.
  • max_results - Optional. (Integer, default=10. maximum=500). Max number of resources to return.
  • next_cursor - Optional. When a listing request has more results to return than max_results, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing request.
  • direction - Optional. (String/Integer, "asc" (or 1), "desc" (or -1), default: "desc" by creation date). Control the order of returned resources.
  • tags - Optional (Boolean, default: false). If true, include the list of tag names assigned each resource.
  • context - Optional (Boolean, default: false). If true, include all key-value pairs of context associated with each resource.
  • moderations - Optional (Boolean, default: false). If true, include image moderation status of each listed resource.
List images by context key
URL:
GET /resources/image/context/?key=mycontextkey
Ruby:
Cloudinary::Api.resources_by_context('mycontextkey')
PHP:
$api->resources_by_context("mycontextkey");
Python:
cloudinary.api.resources_by_context("mycontextkey")
Node.js:
cloudinary.v2.api.resources_by_context("mycontextkey", 
  function(error, result){console.log(result);});
Java:
api.resourcesByContext("mycontextkey", ObjectUtils.emptyMap());
.Net:
Currently not available
Endpoint:
/resources/image/context/?key=mycontextkey
List video files by context key=value
URL:
GET /resources/video/context/?key=mycontextkey&value=mycontextvalue
Ruby:
Cloudinary::Api.resources_by_context('mycontextkey', 'mycontextvalue',
  :resource_type => :video)
PHP:
$api->resources_by_context("mycontextkey", "mycontextvalue"
  array("resource_type" => "video"));
Python:
cloudinary.api.resources_by_context("mycontextkey", "mycontextvalue"
  resource_type = "video")
Node.js:
cloudinary.v2.api.resources_by_context("mycontextkey", "mycontextvalue", 
  { resource_type: 'video'}, 
  function(error, result){console.log(result);});
Java:
api.resourcesByContext("mycontextkey", "mycontextvalue", 
  ObjectUtils.asMap("resource_type", "video"));
.Net:
Currently not available
Endpoint:
/resources/video/context/?key=mycontextkey&value=mycontextvalue
GET /resources/:resource_type/moderations/:moderation_kind/:status

List resources in moderation queues

Parameters:
  • resource_type - Optional (String, default: image). The type of file. Possible values: image, raw, video. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API). Note: Use the video resource type for all video resources as well as for audio files, such as .mp3.
  • moderation_kind - (String: "manual", "webpurify", "aws_rek", or "metascan"). Type of image moderation queue to list.
  • status - (String: "pending", "approved", "rejected"). Moderation status of resources.
  • max_results - Optional. (Integer, default=10. maximum=500). Max number of resources to return.
  • next_cursor - Optional. When a listing request has more results to return than max_results, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing request.
  • direction - Optional. (String/Integer, "asc" (or 1), "desc" (or -1), default: "desc" by creation date). Control the order of returned resources.
  • tags - Optional (Boolean, default: false). If true, include the list of tag names assigned each resource.
  • context - Optional (Boolean, default: false). If true, include key-value pairs of context associated with each resource.
  • moderations - Optional (Boolean, default: false). If true, include image moderation status of each listed resource.
Result sample:
{
 "resources":
  [{
    "public_id": "q7vcvrfjm9mj4bfp3qc8",
    "format": "jpg",
    "version": 1393794403,
    "resource_type": "image",
    "type": "upload",
    "created_at": "2014-03-02T21:06:43Z",
    "bytes": 120253,
    "width": 864,
    "height": 576,
    "backup": true,
    "url":
     "https://res.cloudinary.com/demo/image/upload/v1393794403/q7vcvrfjm9mj4bfp3qc8.jpg",
    "secure_url":
     "https://res.cloudinary.com/demo/image/upload/v1393794403/q7vcvrfjm9mj4bfp3qc8.jpg"
   },
   {
    "public_id": "zp4fgdbabhlwwa7bxu84",
    "format": "jpg",
    "version": 1393794399,
    "resource_type": "image",
    "type": "upload",
    "created_at": "2014-03-02T21:06:39Z",
    "bytes": 120253,
    "width": 864,
    "height": 576,
    "backup": true,
    "url":
     "https://res.cloudinary.com/demo/image/upload/v1393794399/zp4fgdbabhlwwa7bxu84.jpg",
    "secure_url":
     "https://res.cloudinary.com/demo/image/upload/v1393794399/zp4fgdbabhlwwa7bxu84.jpg"
   }
 ]
}
List images pending manual moderation
URL:
GET /resources/image/moderations/manual/pending
Ruby:
Cloudinary::Api.resources_by_moderation("manual", "pending")
PHP:
$api->resources_by_moderation("manual", "pending");
Python:
cloudinary.api.resources_by_moderation("manual", "pending")
Node.js:
cloudinary.v2.api.resources_by_moderation('manual', 'pending',
  function(error, result){console.log(result)});
Java:
cloudinary.api().resourcesByModeration("manual", "pending",
  ObjectUtils.emptyMap());
.Net:
cloudinary.ListResourcesByModerationStatus("manual", "pending");
Endpoint:
/resources/image/moderations/manual/pending
List images automatically approved by the WebPurify add-on
URL:
GET /resources/image/moderations/webpurify/approved
Ruby:
Cloudinary::Api.resources_by_moderation("webpurify", "approved")
PHP:
$api->resources_by_moderation("webpurify", "approved");
Python:
cloudinary.api.resources_by_moderation("webpurify", "approved")
Node.js:
cloudinary.v2.api.resources_by_moderation('webpurify', 'approved',
  function(error, result){console.log(result)});
Java:
cloudinary.api().resourcesByModeration("webpurify", "approved",
  ObjectUtils.emptyMap());
.Net:
cloudinary.ListResourcesByModerationStatus("webpurify", "approved");
Endpoint:
/resources/image/moderations/webpurify/approved
GET /tags/:resource_type

List tags

Parameters:
  • resource_type - Optional (String, default: image). The type of file for which to retrieve the tags. Possible values: image, raw, video. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API). Note: Use the video resource type for all video resources as well as for audio files, such as .mp3.
  • prefix - Optional. Find all tags that start with the given prefix.
  • max_results - Optional. Max number of tags to return. Default=10. Maximum=500.
  • next_cursor - Optional. When a listing request has more results to return than max_results, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing request.
Result sample:
{
  "tags": [
    "arrow_animation",
    "logo"
  ]
}
List tags of images
URL:
GET /tags/image
Ruby:
Cloudinary::Api.tags
PHP:
$api->tags();
Python:
cloudinary.api.tags()
Node.js:
cloudinary.v2.api.tags(
  function(error, result){console.log(result);});
Java:
api.tags(ObjectUtils.emptyMap());
.Net:
cloudinary.ListTags();
Endpoint:
/tags/image
List all tags with a given prefix
URL:
GET /tags/image/?prefix=myta
Ruby:
Cloudinary::Api.tags(:prefix => "myta")
PHP:
$api->tags(array("prefix" => "myta"));
Python:
cloudinary.api.tags(prefix = "myta")
Node.js:
cloudinary.v2.api.tags({prefix: 'myta'}, 
  function(error, result){console.log(result);});
Java:
api.tags(ObjectUtils.asMap("prefix", "myta"));
.Net:
cloudinary.ListTagsByPrefix("myta");
Endpoint:
/tags/image/?prefix=myta
GET /resources/:resource_type/:type/:public_id

Details of a single resource

Return details of the requested resource as well as all its derived resources.

Parameters:
  • public_id - Required. (String). The public ID of the resource.
  • resource_type - Optional (String, default: image). The type of file. Possible values: image, raw, video. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API). Note: Use the video resource type for all video resources as well as for audio files, such as .mp3.
  • type - Optional (String, default: upload). The storage type: upload, private, authenticated, facebook, twitter, gplus, instagram_name, gravatar, youtube, hulu, vimeo, animoto, worldstarhiphop or dailymotion. Relevant as a parameter only when using the SDKs (the type is included in the endpoint URL for direct calls to the HTTP API).
  • colors - Optional (Boolean, default: false). If true, include color information: predominant colors and histogram of 32 leading colors.
  • image_metadata - Optional (Boolean, default: false). If true, include IPTC, XMP, and detailed Exif metadata. Supported for images, video, and audio.
    - Returned metadata for images includes: `PixelsPerUnitX`, `PixelsPerUnitY`, `PixelUnits`, `Colorspace`, and `DPI`.
    - Returned metadata for audio and video includes: `audio_codec`, `audio_bit_rate`, `audio_frequency`, `channels`, `channel_layout`.
    - Additional metadata for video includes: `pix_format`, `codec`, `level`, `profile`, `video_bit_rate`, `dar`.
  • exif - Optional (Boolean, default: false). Deprecated. Use image_metadata instead.
  • faces - Optional (Boolean, default: false). If true, include a list of coordinates of detected faces.
  • quality_analysis - Optional (Boolean, default: false). If true, returns a quality analysis value for the image between 0 and 1, where 0 means the image is blurry and out of focus and 1 means the image is sharp and in focus.
  • pages - Optional (Boolean, default: false). If true, report the number of pages in multi-page documents (e.g., PDF)
  • phash - Optional (Boolean, default: false). If true, include the perceptual hash (pHash) of the uploaded photo for image similarity detection.
  • coordinates - Optional (Boolean, default: false). If true, include previously specified custom cropping coordinates and faces coordinates.
  • max_results - Optional. The number of derived images to return. Default=10. Maximum=100.
  • derived_next_cursor - Optional. If there are more derived images than max_results, the derived_next_cursor value is returned as part of the response. You can then specify this value as the derived_next_cursor parameter of the following listing request.
  • next_cursor - Optional. A pointer to the previous resource uploaded to your Cloudinary account (according to the resource's 'created_by' date). This can be useful for iterating through the resources uploaded to your account and is meant for use with the various other List Resources methods, where you can return results starting from the resource with this next_cursor value.
Result sample:
{
  "public_id": "sample",
  "format": "jpg",
  "version": 1312461204,
  "resource_type": "image",
  "type": "upload",
  "created_at": "2011-08-04T12:33:24Z",
  "bytes": 120253,
  "width": 864,
  "height": 576,
  "access_mode": "public",
  "url": "http://res.cloudinary.com/demo/image/upload/v1312461204/sample.jpg",
  "secure_url": "https://.../image/upload/v1312461204/sample.jpg",
  "tags": [
    "flower",
    "plant",
    "naturet"
  ],
  "context": {
    "custom": {
      "alt": "sample flower",
      "caption": "beautiful flower"
    }
  },
  "next_cursor": "041a39fc10971b9eabd4993470f6bfaf",
  "derived": [
    {
      "transformation": "c_fill,w_100,h_100",
      "format": "jpg",
      "bytes": 7112,
      "id": "8267a869b62a93a59248f35d7f124c1f",
      "url": "https://.../demo/image/upload/c_fill,w_100,h_100/v1312461204/sample.jpg",
      "secure_url": "https://.../image/upload/c_fill,w_100,h_100/v1312461204/sample.jpg"
    },
    {
      "transformation": "w_230,h_168,c_fit",
      "format": "jpg",
      "bytes": 19173,
      "id": "383e22a57167445552a3cdc16f0a0c85",
      "url": "https://.../demo/image/upload/w_230,h_168,c_fit/v1312461204/sample.jpg",
      "secure_url": "https://.../image/upload/w_230,h_168,c_fit/v1312461204/sample.jpg"
    }
  ],

  "faces": [[98,74,61,83], [140,130,52,71]],

  "colors": [["#162E02",6.7], ["#385B0C",6.3], ["#F3285C",5.0], ["#B3CB6E",5.0], ["#688F1C",4.4], ["#324D07",4.4], ["#8EAA34",4.3], ["#4F6D0D",4.2], ["#789446",4.1], ["#DF1327",3.9], ["#A10B12",3.7], ["#273804",3.4], ["#0D1802",3.4], ["#D5E191",3.2], ["#646E20",3.1], ["#94AF4D",2.9], ["#FB54A9",2.8], ["#48570B",2.7], ["#ACC655",2.7], ["#FCA2D9",2.7], ["#63110A",2.6], ["#E9B327",2.2], ["#6D644D",2.1], ["#6D8D12",2.0], ["#8F9F27",1.9], ["#C3573E",1.8], ["#CFD76E",1.6], ["#A0B058",1.6], ["#FCD0E9",1.6], ["#728F2D",1.4], ["#F958A1",1.4], ["#D1B694",1.0]],

  "predominant": {
    "google": [
      [
        "yellow",
        52.9
      ],
      [
        "pink",
        13.5
      ],
      [
        "red",
        12.0
      ],
      [
        "black",
        10.1
      ],
      [
        "green",
        6.3
      ]
    ]
  },
}
Uploaded image details
URL:
GET /resources/image/upload/sample
Ruby:
Cloudinary::Api.resource('sample')
PHP:
$api->resource("sample");
Python:
cloudinary.api.resource("sample")
Node.js:
cloudinary.v2.api.resource('sample',
  function(error, result){console.log(result)});
Java:
api.resource("sample", ObjectUtils.emptyMap());
.Net:
cloudinary.GetResource("sample");
Endpoint:
/resources/image/upload/sample
Faces, colors and Exif image details
URL:
GET /resources/image/upload/sample?faces=1&colors=1&exif=1
Ruby:
Cloudinary::Api.resource('sample',
  :faces => true, 
  :colors => true, 
  :exif => true)
PHP:
$api->resource("sample",
  array(
  "faces" => TRUE, 
  "colors" => TRUE, 
  "exif" => TRUE));
Python:
cloudinary.api.resource("sample",
  faces = True, 
  colors = True, 
  exif = True)
Node.js:
cloudinary.v2.api.resource('sample', 
  { faces: true, 
    colors: true, 
    exif: true },
  function(error, result){console.log(result)});
Java:
api.resource("sample", 
  ObjectUtils.asMap(
    "faces", true,
    "colors", true, 
    "exif", true));
.Net:
var getResource = new GetResourceParams("sample"){
  Faces = true,
  Colors = true,
  Exif = true };
var info = cloudinary.GetResource(getResource);
Endpoint:
/resources/image/upload/sample?faces=1&colors=1&exif=1
Facebook picture details
URL:
GET /resources/image/facebook/4
Ruby:
Cloudinary::Api.resource('4', 
  :type => :facebook)
PHP:
$api->resource("4", 
  array("type" => "facebook"));
Python:
cloudinary.api.resource("4", 
  type = "facebook")
Node.js:
cloudinary.v2.api.resource('4', 
  { type: 'facebook' },
  function(error, result){console.log(result);});
Java:
api.resource("4", 
  ObjectUtils.asMap("type", "facebook"));
.Net:
var getResource = new GetResourceParams("4"){
  Type = "facebook" };
var info = cloudinary.GetResource(getResource);
Endpoint:
/resources/image/facebook/4
Uploaded raw file details
URL:
GET /resources/raw/upload/rwkaliebnufp3bxyrvyo.txt
Ruby:
Cloudinary::Api.resource('rwkaliebnufp3bxyrvyo.txt',
  :resource_type => :raw)
PHP:
$api->resource("rwkaliebnufp3bxyrvyo.txt",
  array("resource_type" => "raw"));
Python:
cloudinary.api.resource("rwkaliebnufp3bxyrvyo.txt",
  resource_type = "raw")
Node.js:
cloudinary.v2.api.resource('rwkaliebnufp3bxyrvyo.txt', 
  { resource_type: 'raw'},
  function(error, result){console.log(result);});
Java:
api.resource("rwkaliebnufp3bxyrvyo.txt",
  ObjectUtils.asMap("resource_type", "raw"));
.Net:
var getResource = new GetResourceParams("rwkaliebnufp3bxyrvyo.txt"){
  ResourceType = "raw" };
var info = cloudinary.GetResource(getResource);
Endpoint:
/resources/raw/upload/rwkaliebnufp3bxyrvyo.txt

Search resources

The search method allows you fine control on filtering and retrieving information on all the assets in your account with the help of query expressions in a Lucene-like query language. For detailed information on the search method and building expressions, see the Search API documentation.

GET /resources/search

Search resources

Parameters:
  • expression - Optional (String). The (Lucene-like) string expression specifying the search query. If this parameter is not provided then all resources are listed (up to max_results). For details, see the expressions section in the Search API documentation.
  • sort_by - Optional (String). An array of key value pairs where the key is the field to sort by and the value is the direction. Valid sort directions are asc or desc (the default value). If this parameter is not provided then the results are sorted by relevance (results with higher relevance are listed first). You can specify more than one sort_by parameter; results will be sorted according to the order of the fields provided.
  • max_results - Optional. (Integer, default=50. maximum=500). Max number of resources to return.
  • next_cursor - Optional. When a listing request has more results to return than max_results, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing request.
  • with_field - Optional. (String). The name of an additional asset attribute to include for each asset in the response. Possible value: context, tags, or for Tier 2 also image_metadata, and image_analysis.
  • aggregate - Optional. (String, Tier 2 only). The names of fields (attributes) for which aggregation counts should be calculated and returned in the response. Supported parameters: resource_type, type, pixels (only the image assets in the response are aggregated), duration (only the video assets in the response are aggregated), format, and bytes. For aggregation fields without discrete values, the results are divided into categories. For example:
    * bytes are divided into small (<500 kb), medium (500 - 5mb), large (5mb - 100 mb), and huge (>100 mb).
    * Video duration is divided into short (< 3 minutes), medium (3-12 min), and long (> 12 min).
Result sample:
{
  "total_count": 32,
  "time": 30,
  "aggregations": {
    "format": {
      "png": 4,
      "jpg": 21,
      "mp4": 3,
      "doc": 4
    }
  },
  "next_cursor": "b16b8bd80426df43a107f26b0348",
  "resources": [
  {
    "public_id": "sample",
    "folder": "",
    "filename": "sample",
    "format": "png",
    "version": 1492606756,
    "resource_type": "image",
    "type": "upload",
    "created_at": "2017-04-03T09:56:49+00:00",
    "uploaded_at": "2017-04-19T12:59:16+00:00",
    "bytes": 3381,
    "backup_bytes": 16905,
    "width": 241,
    "height": 51,
    "aspect_ratio": 4.7254901960784315,
    "pixels": 12291,
    "context": {},
    "image_analysis": { 
      "face_count": 0,
      "faces": [],
      "grayscale": true,
      "illustration_score": 1,
      "transparent": false,
      "colors": {
        "gray": 96.7
      }
    },
    "url": "http://res.cloudinary.com/demo/image/upload/v1492606756/sample.png",
    "secure_url": "https://res.cloudinary.com/demo/image/upload/v1492606756/sample.png",
    "status": "active",
    "access_mode": "public"
  },
  {
    "public_id": "dog",
     
     
  }
  
}
Search all images
URL:
POST /resources/search?expression=resource_type:image
Ruby:
Cloudinary::Search.expression("resource_type:image").execute
PHP:
new \Cloudinary\Search()->expression("resource_type:image")->execute();
Python:
cloudinary.Search().expression("resource_type:image").execute()
Node.js:
cloudinary.v2.search.expression("resource_type:image").execute(
  function(error, result){console.log(result)});
Java:
cloudinary.search().expression("resource_type:image").execute();
.Net:
cloudinary.Search().Expression("resource_type:image").Execute();
Endpoint:
/resources/search?expression=resource_type:image

Update resources

Update one or more of the attributes associated with a specified resource. Note that you can also update many attributes of an existing resource using the explicit method, which is not rate limited.

POST /resources/:resource_type/:type/:public_id

Update details of an existing resource

Parameters:
  • public_id - Required. (String). The public ID of the resource to update.
  • resource_type - Optional (String, default: image). The type of file. Possible values: image, raw, video. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API). Note: Use the video resource type for all video resources as well as for audio files, such as .mp3.
  • type - Optional (String, default: upload). The storage type: upload, private, authenticated, facebook, twitter, gplus, instagram_name, gravatar, youtube, hulu, vimeo, animoto, worldstarhiphop or dailymotion. Relevant as a parameter only when using the SDKs (the type is included in the endpoint URL for direct calls to the HTTP API).
  • tags - (Optional). A comma-separated list of tag names to assign to the uploaded image for later group reference.
  • context - (Optional). A pipe separated list of key-value pairs of general textual context metadata to attach to an uploaded resource. The context values of uploaded files are available for fetching using the Admin API. For example: "alt=My image|caption=Profile Photo".
  • face_coordinates - (Optional). List of coordinates of faces contained in an uploaded image. The given coordinates are used for cropping uploaded images using the face or faces gravity mode. The specified coordinates override the automatically detected faces. Each face is specified by the X & Y coordinates of the top left corner and the width & height of the face. The coordinates are comma separated while faces are concatenated with '|'. For example: "10,20,150,130|213,345,82,61".
  • custom_coordinates - (Optional). Coordinates of an interesting region contained in an uploaded image. The given coordinates are used for cropping uploaded images using the custom gravity mode. The region is specified by the X & Y coordinates of the top left corner and the width & height of the region. For example: "85,120,220,310".
  • moderation_status - (Optional. String: "approved", "rejected"). Manually set image moderation status or override previously automatically moderated images by approving or rejecting.
  • auto_tagging (0.0 to 1.0 Decimal number) - (Optional). Whether to assign tags to an image according to detected scene categories with confidence score higher than the given value.
  • detection - (Optional). Set to 'adv_face' to automatically extract advanced face attributes of photos using the Advanced Facial Attributes Detection add-on.
  • ocr - (Optional). Set to 'adv_ocr' to extract all text elements in an image as well as the bounding box coordinates of each detected element using the OCR Text Detection and Extraction Add-on add-on.
  • raw_convert - (Optional). Asynchronously generates a related file based on the uploaded file.
    • - Set to aspose to automatically create a PDF or other image format from a `raw` Office document using the Aspose Document Conversion add-on.
    • - Set to google_speech to instruct the Google AI Video Transcription add-on to generate an automatic transcript `raw` file from an uploaded video.
    • - Set to extract_text to extract all the text from a PDF file and store it in a `raw` file. The public ID of the generated raw file will be in the format: [pdf_public_id].extract_text.json.
    • See also: Converting raw files.

  • categorization - (Optional). Specify the tagging add-on you want to run on the asset. Possible values:
    • - google_tagging - Google Auto Tagging Add-on
    • - aws_rek_tagging - AWS Rekognition Auto Tagging Add-on
    • - imagga_tagging - Imagga Auto Tagging Add-on
    • - google_video_tagging - Google Automatic Video Tagging Add-on

    • background_removal - (Optional). Set to 'remove_the_background' (or 'pixelz' - the new name of the company) to automatically clear the background of an uploaded photo using the Pixelz - Remove the Background add-on.
    • access_control - (Optional). An array of 'access_types' for the resource. The resource is accessible as long as one of the access types is valid. Possible values for each access type:
      • - 'token' requires either Token-based authentication or Cookie-based authentication for accessing the resource.
      • For example: access_type: 'token'

      • - 'anonymous' allows public access to the resource. The anonymous access type should also include `start` and `end` dates (in ISO 8601 format) defining when the resource is publically available.
      • For example: access_type: 'anonymous', start: '2017-12-15T12:00Z', end: '2018-01-20T12:00Z'
    Update tags and moderation status of an uploaded image
    URL:
    POST /resources/image/upload/image1
    Ruby:
    Cloudinary::Api.update("image1",
      :tags => "important",
      :moderation_status => "approved")
    PHP:
    $api->update("image1",
      array(
        "tags" => "important", 
        "moderation_status" => "approved"));
    Python:
    cloudinary.api.update("image1",
      tags = "important",
      moderation_status = "approved")
    Node.js:
    cloudinary.v2.api.update("image1", 
      { tags: "important", 
        moderation_status: "approved"},
      function(error, result){console.log(result);});
    Java:
    cloudinary.api().update("image1",
      ObjectUtils.asMap(
        "tags", "important",
        "moderation_status", "approved"));
    .Net:
    var updateParams = new UpdateParams("image1"){
      Tags = "important",
      ModerationStatus = "approved"};
    var updateResult = cloudinary.Update(updateParams);
    Endpoint:
    /resources/image/upload/image1

    Delete resources

    Use the delete methods to: delete all or selected resources, delete resources by tag, or delete derived resources.

    DELETE /resources/:resource_type/:type

    Delete all or selected resources

    This method deletes resources of a specific resource type and type (default = image, upload) according to the defined conditions:

    Parameters:
    One of the following:
    • public_ids - Delete all resources with the given public IDs (array of up to 100 public_ids).
    • prefix - Delete all resources, including derived resources, where the public ID starts with the given prefix (up to a maximum of 1000 original resources).
    • all - Optional (Boolean, default: false). Delete all resources (of the relevant resource type and type), including derived resources (up to a maximum of 1000 original resources).
    Optional Parameters:
    • resource_type - Optional (String, default: image). The type of file to delete. Possible values: image, raw, video. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API). Note: Use the video resource type for all video resources as well as for audio files, such as .mp3.
    • type - Optional (String, default: upload). The storage type: upload, private, authenticated, facebook, twitter, gplus, instagram_name, gravatar, youtube, hulu, vimeo, animoto, worldstarhiphop or dailymotion. Relevant as a parameter only when using the SDKs (the type is included in the endpoint URL for direct calls to the HTTP API).
    • keep_original - Optional (Boolean, default: false). If true, delete only the derived resources.
    • invalidate - Optional (Boolean, default: false). Whether to also invalidate the copies of the resource on the CDN. It usually takes a few minutes (although it might take up to an hour) for the invalidation to fully propagate through the CDN. There are also a number of other important considerations to keep in mind when invalidating files. Note that by default this parameter is not enabled: if you need this parameter enabled, please open a support request.
    • next_cursor - Optional. When a deletion request has more than 1000 resources to delete, the response includes the partial boolean parameter set to true, as well as a next_cursor value. You can then specify this returned next_cursor value as the next_cursor parameter of the following deletion request.
    • transformations - Optional. Only the derived resources matching this hash of transformation parameters will be deleted.
    Result sample:
    {
      "deleted": {
        "image1": "deleted",
        "image2": "deleted"
      },
      "partial": false
    }
    Delete uploaded images by public IDs
    URL:
    DELETE /resources/image/upload?public_ids[]=image1&public_ids[]=image2
    Ruby:
    Cloudinary::Api.delete_resources(['image1', 'image2'])
    PHP:
    $api->delete_resources(array("image1", "image2"));
    Python:
    cloudinary.api.delete_resources(["image1", "image2"])
    Node.js:
    cloudinary.v2.api.delete_resources(['image1', 'image2'],
      function(error, result){console.log(result);});
    Java:
    api.deleteResources(Arrays.asList("image1", "image2"),
      ObjectUtils.emptyMap());
    .Net:
    var delResParams = new DelResParams(){
      PublicIds = new List<string>{"image1", "image2"}};
    cloudinary.DeleteResources(delResParams);
    Endpoint:
    /resources/image/upload?public_ids[]=image1&public_ids[]=image2
    Delete Facebook pictures by public IDs
    URL:
    DELETE /resources/image/facebook?public_ids=4
    Ruby:
    Cloudinary::Api.delete_resources(['4'], 
      :type => :facebook)
    PHP:
    $api->delete_resources(array("4"), 
      array("type" => "facebook"));
    Python:
    cloudinary.api.delete_resources(["4"], 
      type = "facebook")
    Node.js:
    cloudinary.v2.api.delete_resources(['4'], 
      { type: 'facebook' },
      function(error, result){console.log(result);});
    Java:
    api.deleteResources(Arrays.asList("4"),
      ObjectUtils.asMap("type", "facebook"));
    .Net:
    var delResParams = new DelResParams(){
      PublicIds = new List<string>{"4"},
      Type = "facebook"};
    cloudinary.DeleteResources(delResParams);
    Endpoint:
    /resources/image/facebook?public_ids=4
    Delete uploaded images by prefix
    URL:
    DELETE /resources/image/upload?prefix=sunday
    Ruby:
    Cloudinary::Api.delete_resources_by_prefix('sunday')
    PHP:
    $api->delete_resources_by_prefix("sunday");
    Python:
    cloudinary.api.delete_resources_by_prefix("sunday")
    Node.js:
    cloudinary.v2.api.delete_resources_by_prefix('sunday', 
      function(error, result){console.log(result);});
    Java:
    api.deleteResourcesByPrefix("sunday", 
      ObjectUtils.emptyMap());
    .Net:
    cloudinary.DeleteResourcesByPrefix("sunday");
    Endpoint:
    /resources/image/upload?prefix=sunday
    Delete derived images only
    URL:
    DELETE /resources/image/upload?public_ids[]=image1&public_ids[]=image2&keep_original=1
    Ruby:
    Cloudinary::Api.delete_resources(['image1', 'image2'],
      :keep_original => true)
    PHP:
    $api->delete_resources(array("image1", "image2"),
      array("keep_original" => TRUE));
    Python:
    cloudinary.api.delete_resources(["image1", "image2"],
      keep_original = True)
    Node.js:
    cloudinary.v2.api.delete_resources(['image1', 'image2'], 
      { keep_original: true},
      function(error, result){console.log(result);});
    Java:
    api.deleteResources(Arrays.asList("image1", "image2"),
      ObjectUtils.asMap("keep_original", true));
    .Net:
    var delResParams = new DelResParams(){
      PublicIds = new List<string>{"image1", "image2"},
      KeepOriginal = true};
    cloudinary.DeleteResources(delResParams);
    Endpoint:
    /resources/image/upload?public_ids[]=image1&public_ids[]=image2&keep_original=1
    Delete all Facebook pictures
    URL:
    DELETE /resources/image/facebook?all=true
    Ruby:
    Cloudinary::Api.delete_all_resources(
      :type => :facebook)
    PHP:
    $api->delete_all_resources(
      array("type" => "facebook"));
    Python:
    cloudinary.api.delete_all_resources(
      type = "facebook")
    Node.js:
    cloudinary.v2.api.delete_all_resources(
      {type: 'facebook'}, 
      function(error, result){console.log(result);});
    Java:
    api.deleteAllResources(
      ObjectUtils.asMap("type", "facebook"));
    .Net:
    var delResParams = new DelResParams(){
      Type = "facebook",
      All = true};
    cloudinary.DeleteResources(delResParams);
    Endpoint:
    /resources/image/facebook?all=true
    DELETE /resources/:resource_type/tags/:tag

    Delete resources by tags

    Parameters:
    • tag - Delete all resources (and their derivatives) with the given tag name (up to a maximum of 1000 original resources).
    • resource_type - Optional (String, default: image). The type of file. Possible values: image, raw, video. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API). Note: Use the video resource type for all video resources as well as for audio files, such as .mp3.
    • keep_original - Optional (Boolean, default: false). If true, delete only the derived images of the matching resources.
    • invalidate - Optional (Boolean, default: false). Whether to also invalidate the copies of the resource on the CDN. It usually takes a few minutes (although it might take up to an hour) for the invalidation to fully propagate through the CDN. There are also a number of other important considerations to keep in mind when invalidating files. Note that by default this parameter is not enabled: if you need this parameter enabled, please open a support request.
    • transformations - Optional. Only the derived resources matching this array of transformation parameters will be deleted.
    • next_cursor - Optional. When a deletion request has more than 1000 resources to delete, the response includes the partial boolean parameter set to true, as well as a next_cursor value. You can then specify this returned next_cursor value as the next_cursor parameter of the following deletion request.
    Result sample:
    {
      "deleted": {
        "image1": "deleted",
        "image2": "deleted"
      },
      "partial": false
    }
    Delete images by tag name
    URL:
    DELETE /resources/image/tags/mytag
    Ruby:
    Cloudinary::Api.delete_resources_by_tag('mytag')
    PHP:
    $api->delete_resources_by_tag("mytag");
    Python:
    cloudinary.api.delete_resources_by_tag("mytag")
    Node.js:
    cloudinary.v2.api.delete_resources_by_tag('mytag',
        function(error, result){console.log(result);});
    Java:
    api.deleteResourcesByTag("mytag", ObjectUtils.emptyMap());
    .Net:
    cloudinary.DeleteResourcesByTag("mytag");
    Endpoint:
    /resources/image/tags/mytag
    DELETE /derived_resources

    Delete derived resources

    Parameters:
    • derived_resource_ids - Delete all derived resources with the given IDs (an array of up to 100 derived_resource_ids). The derived resource IDs are returned when calling the Details of a single resource method.
    Result sample:
    {
      "deleted": {
        "cb4eaaf650": "deleted",
        "a7b2a2756a": "deleted"
      }
    }
    Delete transformed images by IDs
    URL:
    DELETE /derived_resources?derived_resource_ids[]=cb4eaaf650&derived_resource_ids[]=a7b2a2756a
    Ruby:
    Cloudinary::Api.delete_derived_resources(['cb4eaaf6503',
        'a7b2a2756ab'])
    PHP:
    $api->delete_derived_resources(array("cb4eaaf6503", "a7b2a2756ab"));
    Python:
    cloudinary.api.delete_derived_resources(["cb4eaaf6503", "a7b2a2756ab"])
    Node.js:
    cloudinary.v2.api.delete_derived_resources(['cb4eaaf6503', 'a7b2a2756ab'],
        function(error, result){console.log(result);});
    Java:
    api.deleteDerivedResources(Arrays.asList("cb4eaaf6503", "a7b2a2756ab"),
        ObjectUtils.emptyMap());
    .Net:
    var delDerivedResParams = new DelDerivedResParams(){
      DerivedResources = new List<string>{"cb4eaaf6503", "a7b2a2756ab"}};
    cloudinary.DeleteDerivedResources(delDerivedResParams);
    Endpoint:
    /derived_resources?derived_resource_ids[]=cb4eaaf650&derived_resource_ids[]=a7b2a2756a

    Manage transformations

    Use the transformations methods to: retrieve a list of all transformations, retrieve the details of a single transformation, delete a transformation, update a transformation or create named transformation.

    See the Image transformations and video transformations documentation for more information.

    GET /transformations

    List transformations

    Parameters:
    • max_results - Optional. Max number of transformations to return. Default=10. Maximum=500.
    • next_cursor - Optional. When a listing request has more results to return than max_results, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing request.
    Result sample:
    {
      "transformations": [
        {
          "name": "t_Aspen_LUT",
          "allowed_for_strict": true,
          "used": false,
          "named": true
        },
        {
          "name": "w_110,h_100,c_fill",
          "allowed_for_strict": false,
          "used": false,
          "named": false
        },
        {
          "name": "c_thumb,g_face,h_100,w_80",
          "allowed_for_strict": false,
          "used": true,
          "named": false
        },
        {
          "name": "c_fill,h_75,w_75/jpg",
          "allowed_for_strict": false,
          "used": true,
          "named": false
        }
      ],
      "next_cursor": "8edbc61040178db60b0973ca9494bf3a"
    }
    List all image transformations
    URL:
    GET /transformations
    Ruby:
    Cloudinary::Api.transformations
    PHP:
    $api->transformations();
    Python:
    cloudinary.api.transformations()
    Node.js:
    cloudinary.v2.api.transformations(function(error, result){console.log(result)});
    Java:
    api.transformations(ObjectUtils.emptyMap());
    .Net:
    cloudinary.ListTransformations();
    Endpoint:
    /transformations
    GET /transformations/:transformation

    Details of a single transformation

    Parameters:
    • max_results - Optional. Max number of derived resources to return. Default=10. Maximum=100.
    • next_cursor - Optional. When a listing request has more results to return than max_results, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing request.
    Result sample:
    {
      "name": "w_150,h_100,c_fill",
      "allowed_for_strict": false,
      "used": true,
      "named": false,
      "info": [
        {
          "width": 150,
          "height": 100,
          "crop": "fill"
        }
      ],
      "derived": [
        {
          "public_id": "sample",
          "resource_type": "image",
          "type": "upload",
          "format": "jpg",
          "url":
            "https://.../demo/image/upload/w_150,h_100,c_fill/v1341141057/sample.jpg",
          "secure_url":
            "https://.../demo/image/upload/w_150,h_100,c_fill/v1341141057/sample.jpg",
          "bytes": 10202,
          "id": "2adf1841874c7b2326d1f90cbedbc914"
        }
      ]
    }
    Transformation details by name
    URL:
    GET /transformations/w_150,h_100,c_fill
    Ruby:
    Cloudinary::Api.transformation('w_150,h_100,c_fill')
    PHP:
    $api->transformation("w_150,h_100,c_fill");
    Python:
    cloudinary.api.transformation("w_150,h_100,c_fill")
    Node.js:
    cloudinary.v2.api.transformation('w_150,h_100,c_fill',
        function(error, result){console.log(result)});
    Java:
    api.transformation("w_150,h_100,c_fill",
        ObjectUtils.emptyMap());
    .Net:
    var delDerivedResParams = new DelDerivedResParams(){
      DerivedResources = new List<string>{"cb4eaaf6503", "a7b2a2756ab"}};
    cloudinary.DeleteDerivedResources(delDerivedResParams);
    Endpoint:
    /transformations/w_150,h_100,c_fill
    Transformation details by parameters
    URL:
    GET /transformations/c_fill,h_100,w_150
    Ruby:
    Cloudinary::Api.transformation(:width => 150, :height => 100,
        :crop => :fill)
    PHP:
    $api->transformation(array("width" => 150, "height" => 100,
        "crop" => "fill"));
    Python:
    cloudinary.api.transformation(dict(width = 150, height = 100, crop = "fill"))
    Node.js:
    cloudinary.v2.api.transformation({width: 150, height: 100, crop: 'fill'},
        function(error, result){console.log(result)});
    Java:
    api.transformation(new Transformation().width(150).height(100).
        crop("fill").generate(), ObjectUtils.emptyMap());
    .Net:
    Currently not available
    Endpoint:
    /transformations/c_fill,h_100,w_150
    DELETE /transformations/:transformation

    Delete transformation

    Note : Deleting a transformation also deletes all the derived images based on this transformation (up to 1000). The method returns an error if there are more than 1000 derived images based on this transformation.

    Result sample:
    {
     "message": "deleted"
    }
    Delete transformation name
    URL:
    DELETE /transformations/w_150,h_100,c_fill
    Ruby:
    Cloudinary::Api.delete_transformation('w_150,h_100,c_fill')
    PHP:
    $api->delete_transformation("w_150,h_100,c_fill");
    Python:
    cloudinary.api.delete_transformation("w_150,h_100,c_fill")
    Node.js:
    cloudinary.v2.api.delete_transformation('w_150,h_100,c_fill',
        function(error, result){console.log(result)});
    Java:
    api.deleteTransformation("w_150,h_100,c_fill",
        ObjectUtils.emptyMap());
    .Net:
    cloudinary.DeleteTransform("w_150,h_100,c_fill");
    Endpoint:
    /transformations/w_150,h_100,c_fill
    Delete transformation by parameters
    URL:
    DELETE /transformations/c_fill,h_100,w_150
    Ruby:
    Cloudinary::Api.delete_transformation(:width => 150, :height => 100,
      :crop => :fill)
    PHP:
    $api->delete_transformation(array("width" => 150, "height" => 100,
      "crop" => "fill"));
    Python:
    cloudinary.api.delete_transformation(dict(width = 150, height = 100,
      crop = "fill"))
    Node.js:
    cloudinary.v2.api.delete_transformation(
      {width: 150, height: 100, crop: 'fill'},
      function(error, result){console.log(result)});
    Java:
    api.deleteTransformation(new Transformation().width(150).height(100).
      crop("fill").generate(), ObjectUtils.emptyMap());
    .Net:
    Currently not available
    Endpoint:
    /transformations/c_fill,h_100,w_150
    PUT /transformations/:transformation

    Update transformation

    Parameters:
    • allowed_for_strict - Boolean. Whether this transformation is allowed when Strict Transformations are enabled.
    • unsafe_update - Optional. Allows updating an existing named transformation without updating all associated derived images (the new settings of the named transformation only take effect from now on).
    Result sample:
    {
     "message": "updated"
    }
    Allow transformation by name
    URL:
    PUT /transformations/w_150,h_100,c_fill?allowed_for_strict=true
    Ruby:
    Cloudinary::Api.update_transformation('w_150,h_100,c_fill',
      :allowed_for_strict => true)
    PHP:
    $api->update_transformation("w_150,h_100,c_fill",
      array("allowed_for_strict" => 1));
    Python:
    cloudinary.api.update_transformation("w_150,h_100,c_fill",
      allowed_for_strict = True)
    Node.js:
    cloudinary.v2.api.update_transformation('w_150,h_100,c_fill',
      { allowed_for_strict: true },
      function(error, result){console.log(result)});
    Java:
    api.updateTransformation("w_150,h_100,c_fill",
      ObjectUtils.asMap("allowed_for_strict", true);
    .Net:
    var updateTransformParams = new UpdateTransformParams(){
      Transformation = "w_150,h_100,c_fill",
      Strict = true};
    cloudinary.UpdateTransform(updateTransformParams);
    Endpoint:
    /transformations/w_150,h_100,c_fill?allowed_for_strict=true
    Disallow transformation by parameters
    URL:
    PUT /transformations/c_fill,h_100,w_150?allowed_for_strict=false
    Ruby:
    Cloudinary::Api.update_transformation(
      { :width => 150, :height => 100, :crop => :fill},
      { :allowed_for_strict => false })
    PHP:
    $api->update_transformation(
      array("width" => 150, "height" => 100,"crop" => "fill"),
      array("allowed_for_strict" => 0));
    Python:
    cloudinary.api.update_transformation(
      dict(width = 150, height = 100, crop = "fill"), 
      dict(allowed_for_strict = False))
    Node.js:
    cloudinary.v2.api.update_transformation(
      { width: 150, height: 100, crop: 'fill' },
      { allowed_for_strict: false },
      function(error, result){console.log(result)});
    Java:
    api.updateTransformation(
      new Transformation().width(150).height(100).crop("fill").generate(), 
      ObjectUtils.asMap("allowed_for_strict", false);
    .Net:
    var updateTransformParams = new UpdateTransformParams(){
      Transformation = "w_150,h_100,c_fill",
      Strict = false};
    cloudinary.UpdateTransform(updateTransformParams);
    Endpoint:
    /transformations/c_fill,h_100,w_150?allowed_for_strict=false
    Update a named transformation
    URL:
    PUT /transformations/my_named?unsafe_update=c_scale,w_103
    Ruby:
    Cloudinary::Api.update_transformation('my_named',
      :unsafe_update => { :crop => :scale, :width =>103 })
    PHP:
    $api->update_transformation("my_named",
      array("crop" => "scale", "width" => 103));
    Python:
    cloudinary.api.update_transformation("my_named",
      dict(crop = "scale", width = 103))
    Node.js:
    cloudinary.v2.api.update_transformation("my_named",
      {crop: 'scale', width: 103},
      function(error, result){console.log(result)});
    Java:
    api.updateTransformation("my_named",
      ObjectUtils.asMap("unsafe_update",
      new Transformation().crop("scale").width(103).generate());
    .Net:
    var updateTransformParams = new UpdateTransformParams(){
      Transformation = "my_named",
      UnsafeTransform = new Transformation().Crop("scale").Width(103)};
    cloudinary.UpdateTransform(updateTransformParams);
    Endpoint:
    /transformations/my_named?unsafe_update=c_scale,w_103
    POST /transformations/:name

    Create named transformation

    Parameters:
    • transformation - String representation of transformation parameters.
    Result sample:
    {
     "message": "created"
    }
    Create named transformation by string
    URL:
    POST /transformations/small_fill?transformation=w_150,h_100,c_fill
    Ruby:
    Cloudinary::Api.create_transformation('small_fill',
        'w_150,h_100,c_fill')
    PHP:
    $api->create_transformation("small_fill", "w_150,h_100,c_fill");
    Python:
    cloudinary.api.create_transformation("small_fill",
        "w_150,h_100,c_fill")
    Node.js:
    cloudinary.v2.api.create_transformation('small_fill',
        'w_150,h_100,c_fill',
        function(error, result){console.log(result)});
    Java:
    api.createTransformation("small_fill", "w_150,h_100,c_fill",
        ObjectUtils.emptyMap());
    .Net:
    var createTransformParams = new CreateTransformParams(){
      Name = "small_fill",
      Transformation = new Transformation().Width(150).Height(100).Crop("fill")};
    cloudinary.CreateTransform(createTransformParams);
    Endpoint:
    /transformations/small_fill?transformation=w_150,h_100,c_fill
    Create named transformation by parameters
    URL:
    POST /transformations/small_fill2?transformation=c_fill,h_100,w_150
    Ruby:
    Cloudinary::Api.create_transformation('small_fill2',
        {:width => 150, :height => 100, :crop => :fill})
    PHP:
    $api->create_transformation("small_fill2",
      array("width" => 150, "height" => 100, "crop" => "fill"));
    Python:
    cloudinary.api.create_transformation("small_fill2",
      dict(width = 150, height = 100, crop = "fill"))
    Node.js:
    cloudinary.v2.api.create_transformation('small_fill2',
      { width: 150, height: 100, crop: 'fill' },
      function(error, result){console.log(result)});
    Java:
    api.createTransformation("small_fill2",
      new Transformation().width(150).height(100).crop("fill").generate(),
      ObjectUtils.emptyMap());
    .Net:
    var createTransformParams = new CreateTransformParams(){
      Name = "small_fill",
      Transformation = new Transformation().Width(150).Height(100).Crop("fill")};
    cloudinary.CreateTransform(createTransformParams);
    Endpoint:
    /transformations/small_fill2?transformation=c_fill,h_100,w_150

    Restore resources

    Restore one or more resources from backup.

    POST /resources/:resource_type/:type/restore

    Restore a deleted resource

    Parameters:
    • resource_type - Optional (String, default: image). The type of file. Possible values: image, raw, video. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API). Note: Use the video resource type for all video resources as well as for audio files, such as .mp3.
    • type - Optional (String, default: upload). The storage type: upload, private, or authenticated. Relevant as a parameter only when using the SDKs (the type is included in the endpoint URL for direct calls to the HTTP API).
    • public_ids - The public IDs of (deleted or existing) backed up resources to restore. Reverts to the latest backed up version of the resource.
    Result sample:
    {
     "message": "restored"
    }
    Restore deleted resources by public_ids
    URL:
    POST /resources/image/upload/restore?public_ids[]=image1&public_ids[]=image2
    Ruby:
    Cloudinary::Api.restore(["image1", "image2"])
    PHP:
    $api->restore(array("image1", "image2");
    Python:
    cloudinary.api.restore(["image1", "image2"])
    Node.js:
    cloudinary.v2.api.restore(["image1", "image2"],
      function(error, result){console.log(result);});
    Java:
    cloudinary.api().restore(Arrays.asList("image1", "image2"),
      ObjectUtils.emptyMap());
    .Net:
    var publicIds = new List<string>(){"image1", "image2"};
    cloudinary.Restore(publicIds);
    Endpoint:
    /resources/image/upload/restore?public_ids[]=image1&public_ids[]=image2

    Manage upload mappings

    The Upload Mappings feature is used for dynamic image fetching from existing online locations. Use the upload_mappings methods to: retrieve a list of all upload mappings, retrieve the details of a single upload mapping, delete an upload mapping, update an upload mapping or create a new upload mapping.

    See the Auto upload remote images documentation for more information.

    GET /upload_mappings

    List upload mappings

    List all upload mappings by folder and its mapped template (URL).

    Parameters:
    • max_results - Optional. Max number of upload mappings to return. Default=10. Maximum=500.
    • next_cursor - Optional. When a listing request has more results to return than max_results, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing request.
    Result sample:
    {
      "mappings": [
        {
          "folder": "wiki", 
          "template": "https://u.wiki.example.com/wiki-images/"
        },
        {
          "folder": "exam", 
          "template": "http://images.example.com/product_assets/images/"
        }, 
      ]
    }
    List all upload mappings
    URL:
    GET /upload_mappings
    Ruby:
    Cloudinary::Api.upload_mappings
    PHP:
    $api->upload_mappings();
    Python:
    cloudinary.api.upload_mappings()
    Node.js:
    cloudinary.v2.api.upload_mappings(function(error, result){console.log(result)});
    Java:
    api.uploadMappings(ObjectUtils.emptyMap());
    .Net:
    cloudinary.UploadMappings();
    Endpoint:
    /upload_mappings
    GET /upload_mappings/:folder

    Details of a single upload mapping

    Retrieve the mapped template (URL) of a given upload mapping folder.

    Result sample:
    {
      "folder": "wiki", 
      "template": "https://u.wiki.example.com/wiki-images/"
    }
    Upload mapping details by folder
    URL:
    GET /upload_mappings/wiki
    Ruby:
    Cloudinary::Api.upload_mapping('wiki')
    PHP:
    $api->upload_mapping("wiki");
    Python:
    cloudinary.api.upload_mapping("wiki")
    Node.js:
    cloudinary.v2.api.upload_mapping('wiki',
      function(error, result){console.log(result)});
    Java:
    api.uploadMapping("wiki",
      ObjectUtils.emptyMap());
    .Net:
    cloudinary.UploadMappings("wiki");
    Endpoint:
    /upload_mappings/wiki
    POST /upload_mappings

    Create an upload mapping

    Create a new upload mapping folder and its template (URL).

    Parameters:
    • folder - The name of the folder to map.
    • template - The URL to be mapped to the folder.
    Result sample:
    {
     "message": "created"
    }
    Create upload mapping by folder
    URL:
    POST /upload_mappings?folder=my_map&template=http://www.example.com/images/
    Ruby:
    Cloudinary::Api.create_upload_mapping("my_map",
      :template => "http://www.example.com/images/")
    PHP:
    $api->create_upload_mapping("my_map",
      array("template" => "http://www.example.com/images/"));
    Python:
    cloudinary.api.create_upload_mapping("my_map",
      template = "http://www.example.com/images/")
    Node.js:
    cloudinary.v2.api.create_upload_mapping('my_map',
      { template: "http://www.example.com/images/" },
      function(error, result){console.log(result)});
    Java:
    api.createUploadMapping("my_map",
      ObjectUtils.asMap("template", "http://www.example.com/images/"));
    .Net:
    cloudinary.CreateUploadMapping("my_map", "http://www.example.com/images/");
    Endpoint:
    /upload_mappings?folder=my_map&template=http://www.example.com/images/
    DELETE /upload_mappings/:folder

    Delete an upload mapping

    Delete an upload mapping by folder name.

    Result sample:
    {
     "message": "deleted"
    }
    Delete an upload mapping by folder
    URL:
    DELETE /upload_mappings/wiki
    Ruby:
    Cloudinary::Api.delete_upload_mapping('wiki')
    PHP:
    $api->delete_upload_mapping("wiki");
    Python:
    cloudinary.api.delete_upload_mapping("wiki")
    Node.js:
    cloudinary.v2.api.delete_upload_mapping('wiki',
      function(error, result){console.log(result)});
    Java:
    api.deleteUploadMapping("wiki",
      ObjectUtils.emptyMap());
    .Net:
    cloudinary.DeleteUploadMapping("wiki");
    Endpoint:
    /upload_mappings/wiki
    PUT /upload_mappings

    Update an upload mapping

    Update an existing upload mapping folder with a new template (URL).

    Parameters:
    • folder - The name of the mapped folder.
    • template - The new URL to be mapped to the folder.
    Result sample:
    {
     "message": "updated"
    }
    Update an upload mapping
    URL:
    PUT /upload_mappings?folder=wiki&template=https://u.wiki.com/images/
    Ruby:
    Cloudinary::Api.update_upload_mapping("wiki",
      :template => "https://u.wiki.com/images/")
    PHP:
    $api->update_upload_mapping("wiki",
      array("template" => "https://u.wiki.com/images/"));
    Python:
    cloudinary.api.update_upload_mapping("wiki",
        template = "https://u.wiki.com/images/")
    Node.js:
    cloudinary.v2.api.update_upload_mapping('wiki',
      { template: "https://u.wiki.com/images/" },
      function(error, result){console.log(result)});
    Java:
    api.updateUploadMapping("wiki",
      ObjectUtils.asMap("template", "https://u.wiki.com/images/"), ObjectUtils.emptyMap());
    .Net:
    var uploadMappingParams = new UploadMappingParams(){
      Folder = "wiki",
      Template = "https://u.wiki.com/images/";
    cloudinary.UploadMapping(uploadMappingParams);
    Endpoint:
    /upload_mappings?folder=wiki&template=https://u.wiki.com/images/

    Update access mode

    Use the update access mode methods to: update the access_mode of resources by public_id(s), by tag, or by prefix.

    POST /resources/:resource_type/upload/update_access_mode

    Update access mode for selected resources

    This method updates the access_mode of resources of a specific resource type (default = image) according to the defined conditions. When access_mode = 'authenticated', uploaded resources of type 'upload' behave as if they are of type 'authenticated'. The resource can later be made public by changing its access_mode to 'public', without having to update any image delivery URLs. In the case where public images are reverted to authenticated by changing their access_mode to 'authenticated', all the existing original and derived versions of the images are also invalidated on the CDN.

    Note: You can use the update access mode methods only for assets that were assigned an access_mode when they were uploaded. For details, see the Upload method and Access mode.

    Parameters:
    Required Parameters:
    • access_mode - The new access mode to be set ("public" or "authenticated").
    One of the following:
    • public_ids - Update all resources with the given public IDs (array of up to 100 public_ids).
    • prefix - Update all resources where the public ID starts with the given prefix (up to a maximum of 100 matching original resources).
    • tag - Update all resources with the given tag (up to a maximum of 100 matching original resources).
    Optional Parameters:
    • resource_type - Optional (String, default: image). The type of file. Possible values: image, raw, video. Relevant as a parameter only when using the SDKs (the resource type is included in the endpoint URL for direct calls to the HTTP API). Note: Use the video resource type for all video resources as well as for audio files, such as .mp3.
    • next_cursor - Optional. When an update request has more than 100 resources to update, the response includes a next_cursor value. You can then specify this returned next_cursor value as the next_cursor parameter of the following update request.
    Result sample:
    {
      "updated": {
        "image1": "updated",
        "image2": "updated"
      },
      "failed": {
      },
    }
    Update access mode of uploaded images by public IDs
    URL:
    POST /resources/image/upload/update_access_mode?access_mode=public&public_ids[]=image1&public_ids[]=image2
    Ruby:
    Cloudinary::Api.update_resources_access_mode_by_ids('public', ['image1', 'image2'])
    PHP:
    $api->update_resources_access_mode_by_ids("public", array("image1", "image2"));
    Python:
    cloudinary.api.update_resources_access_mode_by_ids("public", ["image1", "image2"])
    Node.js:
    cloudinary.v2.api.update_resources_access_mode_by_ids("public", ['image1', 'image2'],
      function(error, result){console.log(result);});
    Java:
    api.updateResourcesAccessModeByIds("public", Arrays.asList("image1", "image2"), null);
    .Net:
    var updateResourceAccessModeParams = new UpdateResourceAccessModeParams(){
      AccessMode = "public",
      PublicIds = new List<string>(){"image1", "image2"};
    cloudinary.UpdateResourceAccessModeByIds(updateResourceAccessModeParams);
    Endpoint:
    /resources/image/upload/update_access_mode?access_mode=public&public_ids[]=image1&public_ids[]=image2
    Update access mode of uploaded videos by prefix
    URL:
    POST /resources/video/upload/update_access_mode?access_mode=public&prefix=to-publish
    Ruby:
    Cloudinary::Api.update_resources_access_mode_by_prefix('public', "to-publish", 
      :resource_type => :video)
    PHP:
    $api->update_resources_access_mode_by_prefix("public", "to-publish", 
      array("resource_type" => "video"));
    Python:
    cloudinary.api.update_resources_access_mode_by_prefix("public", "to-publish", 
      resource_type = "video")
    Node.js:
    cloudinary.v2.api.update_resources_access_mode_by_prefix("public", "to-publish",
      { resource_type: 'video'}, 
      function(error, result){console.log(result);});
    Java:
    api.updateResourcesAccessModeByPrefix("public", "to-publish", 
      ObjectUtils.asMap("resource_type", "video"));
    .Net:
    var updateResourceAccessModeParams = new UpdateResourceAccessModeParams(){
      AccessMode = "public",
      ResourceType = "video"};
    cloudinary.UpdateResourceAccessModeByPrefix("to-publish", updateResourceAccessModeParams);
    Endpoint:
    /resources/video/upload/update_access_mode?access_mode=public&prefix=to-publish
    Update access mode of uploaded images by tag
    URL:
    POST /resources/image/upload/update_access_mode?access_mode=public&tag=20170216
    Ruby:
    Cloudinary::Api.update_resources_access_mode_by_tag('public', '20170216')
    PHP:
    $api->update_resources_access_mode_by_tag("public", "20170216");
    Python:
    cloudinary.api.update_resources_access_mode_by_tag("public", "20170216")
    Node.js:
    cloudinary.v2.api.update_resources_access_mode_by_tag('public', "20170216", 
      function(error, result){console.log(result);});
    Java:
    api.updateResourcesAccessModeByTag("public", "20170216", null);
    .Net:
    var updateResourceAccessModeParams = new UpdateResourceAccessModeParams(){
      AccessMode = "public"};
    cloudinary.UpdateResourceAccessModeByTag("20170216", updateResourceAccessModeParams);
    Endpoint:
    /resources/image/upload/update_access_mode?access_mode=public&tag=20170216

    Manage upload presets

    The Upload Presets feature is used for centrally defining image upload options instead of specifying them in each upload call. Use the upload_presets methods to: retrieve a list of all upload presets, retrieve the details of a single upload preset, delete an upload preset, update an upload preset or create a new upload preset.

    See the upload preset documentation for more information.

    GET /upload_presets

    List upload presets

    Parameters:
    • max_results - Optional. Max number of upload presets to return. Default=10. Maximum=500.
    • next_cursor - Optional. When a listing request has more results to return than max_results, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following listing request.
    Result sample:
    {
      "presets": [
        {
          "name": "pd1e4lst",
          "unsigned": true,
          "settings": 
            {
              "transformation": "c_crop,g_custom/ar_1,c_pad,w_1.0"
            }
        }, 
        {
          "name": "remote_media",
          "unsigned": false,
          "settings": 
            {
              "tags": "test"
              "allowed_formats": "jpg,png",
              "eager": "c_fill,g_face,h_150,w_200"
            }
        }, 
      ]
    }
    List all upload presets
    URL:
    GET /upload_presets
    Ruby:
    Cloudinary::Api.upload_presets
    PHP:
    $api->upload_presets();
    Python:
    cloudinary.api.upload_presets()
    Node.js:
    cloudinary.v2.api.upload_presets(function(error, result){console.log(result)});
    Java:
    api.uploadPresets(ObjectUtils.emptyMap());
    .Net:
    cloudinary.ListUploadPresets();
    Endpoint:
    /upload_presets
    GET /upload_presets/:name

    Details of a single upload preset

    Retrieves the details of an upload preset.

    Result sample:
    {
      "name": "remote_media",
      "unsigned": false,
      "settings": 
        {
          "tags": "test"
          "allowed_formats": "jpg,png",
          "eager": "c_fill,g_face,h_150,w_200"
        }
    }
    Upload preset details by name
    URL:
    GET /upload_presets/remote_media
    Ruby:
    Cloudinary::Api.upload_presets('remote_media')
    PHP:
    $api->upload_presets("remote_media");
    Python:
    cloudinary.api.upload_presets("remote_media")
    Node.js:
    cloudinary.v2.api.upload_presets('remote_media',
      function(error, result){console.log(result)});
    Java:
    api.uploadPresets("remote_media",
      ObjectUtils.emptyMap());
    .Net:
    cloudinary.GetUploadPreset("remote_media");
    Endpoint:
    /upload_presets/remote_media
    POST /upload_presets

    Create an upload preset

    Create a new upload preset.

    Parameters:
    • name - String. The name to assign to the new upload preset. If not specified, a random name is generated. If the name is of a predefined profile, the profile will be modified.
    • unsigned - Boolean. Whether this upload preset allows unsigned uploading to Cloudinary.
    • disallow_public_id - Boolean. Whether this upload preset disables assigning a public_id in the upload call.
    • {Upload parameters} - Any upload parameters to apply to assets uploaded with this preset.
    Result sample:
    {
     "message": "created"
    }
    Create an upload preset
    URL:
    POST /upload_presets?name=my_preset&unsigned=true&tags=remote&allowed_formats=jpg,png
    Ruby:
    Cloudinary::Api.create_upload_preset(
      :name => "my_preset",
      :unsigned => true, 
      :tags => "remote", 
      :allowed_formats => "jpg,png")
    PHP:
    $api->create_upload_preset(
      array(
        "name" => "my_preset", 
        "unsigned" => true, 
        "tags" => "remote", 
        "allowed_formats" => "jpg,png"));
    Python:
    cloudinary.api.create_upload_preset(
      name = "my_preset",
      unsigned = true, 
      tags = "remote", 
      allowed_formats = "jpg,png")
    Node.js:
    cloudinary.v2.api.create_upload_preset(
      { name: "my_preset", 
        unsigned: true, 
        tags: "remote", 
        allowed_formats: "jpg,png" },
      function(error, result){console.log(result)});
    Java:
    api.createUploadPreset(
      ObjectUtils.asMap(
        "name", "my_preset"
        "unsigned", true, 
        "tags" => "remote", 
        "allowed_formats" => "jpg,png"));
    .Net:
    var uploadPresetParams = new UploadPresetParams(){
      Name = "my_preset"
      Unsigned = true,
      Tags = "remote",
      AllowedFormats = "jpg,png"};
    cloudinary.CreateUploadPreset(uploadPresetParams);
    Endpoint:
    /upload_presets?name=my_preset&unsigned=true&tags=remote&allowed_formats=jpg,png
    DELETE /upload_presets/:name

    Delete an upload preset

    Delete an existing upload preset.

    Result sample:
    {
     "message": "deleted"
    }
    Delete an upload preset by name
    URL:
    DELETE /upload_presets/remote_media
    Ruby:
    Cloudinary::Api.delete_upload_preset('remote_media')
    PHP:
    $api->delete_upload_preset("remote_media");
    Python:
    cloudinary.api.delete_upload_preset("remote_media")
    Node.js:
    cloudinary.v2.api.delete_upload_preset('remote_media',
      function(error, result){console.log(result)});
    Java:
    api.deleteUploadPreset("remote_media",
      ObjectUtils.emptyMap());
    .Net:
    cloudinary.DeleteUploadPreset("remote_media");
    Endpoint:
    /upload_presets/remote_media
    PUT /upload_presets/:name

    Update an upload preset

    Update an existing upload preset.

    Parameters:
    • unsigned - Boolean. Whether this upload preset allows unsigned uploading to Cloudinary.
    • disallow_public_id - Boolean. Whether this upload preset disables assigning a public_id in the image upload call.
    • {Upload parameters} - Any upload actions to apply to assets uploaded with this preset.
    Result sample:
    {
     "message": "updated"
    }
    Update an upload preset
    URL:
    PUT /upload_presets/wiki?unsigned=true&tags=remote&allowed_formats=jpg,png
    Ruby:
    Cloudinary::Api.update_upload_preset("wiki",
      :unsigned => true, 
      :tags => "remote", 
      :allowed_formats => "jpg,png")
    PHP:
    $api->update_upload_preset("wiki",
      array(
        "unsigned" => true, 
        "tags" => "remote", 
        "allowed_formats" => "jpg,png"));
    Python:
    cloudinary.api.update_upload_preset("wiki",
      unsigned = true, 
      tags = "remote", 
      allowed_formats = "jpg,png")
    Node.js:
    cloudinary.v2.api.update_upload_preset('wiki',
      { unsigned: true,
        tags: "remote", 
        allowed_formats: "jpg,png"},
      function(error, result){console.log(result)});
    Java:
    api.updateUploadPreset("wiki",
      ObjectUtils.asMap(
        "unsigned", true, 
        "tags" => "remote", 
        "allowed_formats" => "jpg,png"));
    .Net:
    var uploadPresetParams = new UploadPresetParams(){
      Name = "wiki",
      Unsigned = true,
      Tags = "remote",
      AllowedFormats = "jpg,png"};
    cloudinary.UpdateUploadPreset(uploadPresetParams);
    Endpoint:
    /upload_presets/wiki?unsigned=true&tags=remote&allowed_formats=jpg,png

    Manage folders

    Use the folders methods to retrieve a list of all root folders or the subfolders of a specified root folder.

    GET /folders

    List root folders

    Lists all the root folders.

    Result sample:
     {
        "folders": [
          {
            "name": "cloud",
            "path": "cloud"
          }, 
          {
            "name": "brooks",
            "path": "brooks"
          }   
        ]
     }
    List all root folders
    URL:
    GET /folders
    Ruby:
    Cloudinary::Api.root_folders
    PHP:
    $api->root_folders();
    Python:
    cloudinary.api.root_folders()
    Node.js:
    cloudinary.v2.api.root_folders(function(error, result){console.log(result)});
    Java:
    api.rootFolders(ObjectUtils.emptyMap());
    .Net:
    cloudinary.RootFolders();
    Endpoint:
    /folders
    GET /folders/:root_folder

    List subfolders

    Lists the name and path of all the subfolders of a given root folder.

    Result sample:
     {
        "folders": [
          {
            "name": "blue",
            "path": "cloud/blue"
          }, 
          {
            "name": "white",
            "path": "cloud/white"
          }   
        ]
     }
    List all subfolders of a given root folder
    URL:
    GET /folders/cloud
    Ruby:
    Cloudinary::Api.subfolders("cloud")
    PHP:
    $api->subfolders("cloud");
    Python:
    cloudinary.api.subfolders("cloud")
    Node.js:
    cloudinary.v2.api.sub_folders("cloud", function(error, result){console.log(result)});
    Java:
    api.subfolders("cloud", ObjectUtils.emptyMap());
    .Net:
    cloudinary.SubFolders("cloud");
    Endpoint:
    /folders/cloud

    Manage adaptive streaming profiles

    Use the streaming_profiles methods to list, get details of, create, modify, or delete built-in and custom adaptive streaming profiles, which can be used to deliver your video using HLS and MPEG-DASH adaptive bitrate streaming.

    GET /streaming_profiles

    List streaming profiles

    List streaming profiles, including built-in and custom profiles.

    Result sample:
    {
      "data": [
        {
          "name": "4k",
          "display_name": "4K (2160p)",
          "predefined": true
        },
        {
          "name": "full_hd",
          "display_name": "Full HD (1080p)",
          "predefined": true
        },
        {
          "name": "hd",
          "display_name": "HD (720p)",
          "predefined": true
        },
        {
          "name": "sd",
          "display_name": "SD (480p)",
          "predefined": true
        },
        {
          "name": "full_hd_wifi",
          "display_name": "Full HD WiFi (1080p)",
          "predefined": true
        },
        {
          "name": "full_hd_lean",
          "display_name": "Full HD Lean (1080p)",
          "predefined": true
        },
        {
          "name": "hd_lean",
          "display_name": "HD Lean (720p)",
          "predefined": true
        },
        {
          "name": "custom_square",
          "display_name": "Custom square resolution",
          "predefined": false
        }
      ]
    }
    list all streaming profiles
    URL:
    GET /streaming_profiles
    Ruby:
    Cloudinary::Api.list_streaming_profiles
    PHP:
    $api->list_streaming_profiles();
    Python:
    cloudinary.api.list_streaming_profiles()
    Node.js:
    cloudinary.v2.api.list_streaming_profiles(function(error, result){console.log(result)});
    Java:
    api.listStreamingProfiles();
    .Net:
    Currently not available
    Endpoint:
    /streaming_profiles
    GET /streaming_profiles/:name

    Get details of a single streaming profile

    Retrieve the details of a single streaming profile by name.

    Result sample:
    {
     "data": {
       "name": "custom_square",
       "display_name": "Custom square resolution",
       "predefined": false,
       "representations": [
         {
           "transformation": {
             "width": 1200, "height": 1200, "bit_rate": "5m", "video_codec": "h264:main:3.1"
           }
         },
         {
           "transformation": {
             "width": 900, "height": 900, "bit_rate": "3500k", "video_codec": "h264:main:3.1"
           }
         },
         {
           "transformation": {
             "width": 600, "height": 600, "bit_rate": "1500k", "video_codec": "h264:baseline:3.0"
           }
         }
       ]
     }
    }
    get the details of a specified streaming file
    URL:
    GET /streaming_profiles/custom_square
    Ruby:
    Cloudinary::Api.get_streaming_profile('custom_square')
    PHP:
    $api->get_streaming_profile("custom_square");
    Python:
    cloudinary.api.get_streaming_profile("custom_square")
    Node.js:
    cloudinary.v2.api.get_streaming_profile('custom_square', function(error, result){console.log(result)});
    Java:
    api.getStreamingProfile("custom_square");
    .Net:
    Currently not available
    Endpoint:
    /streaming_profiles/custom_square
    POST /streaming_profiles

    Create a streaming profile

    Create a new, custom streaming profile.

    Parameters:
    • name - String. Required. The identification name to assign to the new streaming profile. The name is case-insensitive and can contain alphanumeric characters, underscores (_) and hyphens (-).
    • display_name - String. A descriptive name for the profile.
    • representations - JSON String. An array of structures that defines a custom streaming profile.
    • transformation - String or Hash. Specifies the transformation parameters for the representation. All video transformation parameters except video_sampling are supported. Common transformation parameters for representations include: width, height (or aspect_ratio), bit_rate, video_codec, audio_codec, sample_rate (or fps), etc.
    Result sample:
    {
     "data": {
       "name": "custom_square",
       "display_name": "Custom square resolution",
       "predefined": false,
       "representations": [
         {
           "transformation": {
             "width": 1200, "height": 1200, "bit_rate": "5m", "video_codec": "h264:main:3.1"
           }
         },
         {
           "transformation": {
             "width": 900, "height": 900, "bit_rate": "3500k", "video_codec": "h264:main:3.1"
           }
         },
         {
           "transformation": {
             "width": 600, "height": 600, "bit_rate": "1500k", "video_codec": "h264:baseline:3.0"
           }
         }
       ]
     }
    }
    Create a streaming profile with 3 representations
    URL:
    POST /streaming_profiles?name=custom_square
    Ruby:
    Cloudinary::Api.create_streaming_profile("custom_square",
      :display_name => "Custom square resolution",
      :representations =>
        [{:transformation => {:crop => "limit", :width => "1200", :height => "1200", :bit_rate => "5m"}},
         {:transformation => {:crop => "limit", :width => "900", :height => "900", :bit_rate => "3500k"}}
         {:transformation => {:crop => "limit", :width => "600", :height => "600", :bit_rate => "1500k"}}])
    PHP:
    $api->create_streaming_profile("custom_square", 
      array(
        "display_name" => "Custom square resolution",
        "representations" => array(
          array("crop" => "limit", "width" => 1200, "height" => 1200, "bit_rate" => "5m"),
          array("crop" => "limit", "width" => 900, "height" => 900, "bit_rate" => "3500k"),
          array("crop" => "limit", "width" => 600, "height" => 600, "bit_rate" => "1500k"))));
    Python:
    cloudinary.api.create_streaming_profile("custom_square",
      display_name="Custom square resolution",
      representations=[
        {"transformation": {"crop": "limit", "width": 1200, "height": 1200, "bit_rate": "5m"}},
        {"transformation": {"crop": "limit", "width": 900, "height": 900, "bit_rate": "3500k"}},
        {"transformation": {"crop": "limit", "width": 600, "height": 600, "bit_rate": "1500k"}}])
    Node.js:
    cloudinary.v2.api.create_streaming_profile('custom_square',
      { display_name: "Custom square resolution",
        representations: [
        { transformation:{crop: "limit", width: 1200, height: 1200, bit_rate: "5m" }},
        { transformation:{crop: "limit", width: 900, height: 900, bit_rate: "3500k" }},
        { transformation:{crop: "limit", width: 600, height: 600, bit_rate: "1500k" }}] },
      function(error, result){console.log(result);});
    Java:
    api.createStreamingProfile("custom_square", "Custom square resolution",
        Arrays.asList(
          ObjectUtils.asMap("transformation", new 
            Transformation().crop("limit").width(1200).height(1200).bitRate("5m")),
          ObjectUtils.asMap("transformation", new 
            Transformation().crop("limit").width(900).height(900).bitRate("3500k")),
          ObjectUtils.asMap("transformation", new 
            Transformation().crop("limit").width(600).height(600).bitRate("1500k"))));
    .Net:
    Currently not available
    Endpoint:
    /streaming_profiles?name=custom_square
    PUT /streaming_profiles/:name

    Update an existing streaming profile

    Update the specified existing streaming profile. You can update both custom and built-in profiles. The specified list of representations replaces the previous list.

    Parameters:
    • display_name - String. A descriptive name for the profile.
    • representations - JSON String. An array of structures that defines the updated streaming profile.
    • transformation - String or Hash. Specifies the transformation parameters for the representation. All video transformation parameters except video_sampling are supported. Common transformation parameters for representations include: width, height (or aspect_ratio), bit_rate, video_codec, audio_codec, sample_rate (or fps), etc.
    Result sample:
    {
      "message": "updated",
      "data": {
        "name": "custom_square",
        "display_name": "Custom square resolution",
        "predefined": false,
        "representations": [
          {
            "transformation": {
              "width": 1200, "height": 1200, "bit_rate": "5m", "video_codec": "h264:main:3.1"
            }
          },
          {
            "transformation": {
              "width": 900, "height": 900, "bit_rate": "3500k", "video_codec": "h264:main:3.1"
            }
          },
          {
            "transformation": {
              "width": 600, "height": 600, "bit_rate": "1500k", "video_codec": "h264:baseline:3.0"
            }
          }
          {
            "transformation": {
              "width": 320, "height": 320, "bit_rate": "192k", "video_codec": "h264:baseline:3.0"
            }
          }                
        ]
      }
    }
    Add a fourth (fallback) representation to an existing custom streaming profile
    URL:
    PUT /streaming_profiles?name=custom_square
    Ruby:
    Cloudinary::Api.update_streaming_profile("custom_square",  
    :representations => 
      [{:transformation => {:crop => "limit", :width => "1200", :height => "1200", :bit_rate => "5m"}},
       {:transformation => {:crop => "limit", :width => "900", :height => "900", :bit_rate => "3500k"}},
       {:transformation => {:crop => "limit", :width => "600", :height => "600", :bit_rate => "1500k"}},
       {:transformation => {:crop => "limit", :width => "320", :height => "320", :bit_rate => "192k"}}])
    PHP:
    $api->update_streaming_profile("custom_square", 
      array(
        "representations" => array(
          array("transformation" => array("crop" => "limit", "width" => 1200, "height" => 1200, "bit_rate" => "5m")),
          array("transformation" => array("crop" => "limit", "width" => 900, "height" => 900, "bit_rate" => "3500k")),
          array("transformation" => array("crop" => "limit", "width" => 600, "height" => 600, "bit_rate" => "1500k")),
          array("transformation" => array("crop" => "limit", "width" => 320, "height" => 320, "bit_rate" => "192k")))));
    Python:
    cloudinary.api.create_streaming_profile("custom_square",
      representations=[
        {"transformation": {"crop": "limit", "width": 1200, "height": 1200, "bit_rate": "5m"}},
        {"transformation": {"crop": "limit", "width": 900, "height": 900, "bit_rate": "3500k"}},
        {"transformation": {"crop": "limit", "width": 600, "height": 600, "bit_rate": "1500k"}},
        {"transformation": {"crop": "limit", "width": 320, "height": 320, "bit_rate": "192k"}}])
    Node.js:
    cloudinary.v2.api.update_streaming_profile('custom_square',
      { representations: [
        { transformation: {crop: "limit", width: 1200, height: 1200, bit_rate: "5m" }},
        { transformation: {crop: "limit", width: 900, height: 900, bit_rate: "3500k" }},
        { transformation: {crop: "limit", width: 600, height: 600, bit_rate: "1500k" }},
        { transformation: {crop: "limit", width: 320, height: 320, bit_rate: "192k" }}]},
      function(error, result){console.log(result);});
    Java:
    api.updateStreamingProfile("custom_square", null,
      Arrays.asList(
        new Transformation().crop("limit").width(1200).height(1200).bit_rate("5m"),
        new Transformation().crop("limit").width(900).height(900).bit_rate("3500k"),
        new Transformation().crop("limit").width(600).height(600).bit_rate("1500k"),
        new Transformation().crop("limit").width(320).height(320).bit_rate("192k")));
    .Net:
    Currently not available
    Endpoint:
    /streaming_profiles?name=custom_square
    DELETE /streaming_profiles/:name

    Delete or revert the specified streaming profile

    For custom streaming profiles, delete the specified profile.
    For built-in streaming profiles, if the built-in profile was modified, revert the profile to the original settings.
    For built-in streaming profiles that have not been modified, the Delete method returns an error.

    Result sample:
    { "message": "deleted" }
    delete the custom_square streaming file
    URL:
    DELETE /streaming_profiles/custom_square
    Ruby:
    Cloudinary::Api.delete_streaming_profile('custom_square')
    PHP:
    $api->delete_streaming_profile("custom_square");
    Python:
    cloudinary.api.delete_streaming_profile("custom_square")
    Node.js:
    cloudinary.v2.api.delete_streaming_profile('custom_square', function(error, result){console.log(result)});
    Java:
    api.deleteStreamingProfile("custom_square");
    .Net:
    Currently not available
    Endpoint:
    /streaming_profiles/custom_square

    Usage report

    Get a report on the status of your Cloudinary account usage details, including storage, bandwidth, requests, number of resources, and add-on usage. Note that numbers are updated periodically.

    GET /usage

    Get account usage details

    Result sample:
    {
      "plan": "Basic",
      "last_updated": "2017-01-15",
      "transformations": {"usage": 7270, "limit": 75000, "used_percent": 9.69  },
      "objects": { "usage": 11330, "limit": 1000000, "used_percent": 1.13 },
      "bandwidth": { "usage": 9844516305, "limit": 41943040000, "used_percent": 23.47 },
      "storage": { "usage": 704363507, "limit": 10485760000, "used_percent": 6.72 },
      "requests": 877212,
      "resources": 1239,
      "derived_resources": 10091,
      "url2png": {"usage": 0, "limit": 50},
      "webpurify": {"usage": 0, "limit": 50},
      "aspose": {"usage": 0, "limit": 50},
      "imagga_tagging": {"usage": 0, "limit": 50},
      "adv_face": {"usage": 0, "limit": 50}
    }
    Get usage details
    URL:
    GET /usage
    Ruby:
    Cloudinary::Api.usage
    PHP:
    $api->usage();
    Python:
    cloudinary.api.usage()
    Node.js:
    cloudinary.v2.api.usage(function(error, result){console.log(result)});
    Java:
    api.usage(ObjectUtils.emptyMap());
    .Net:
    cloudinary.GetUsage();
    Endpoint:
    /usage

    Ping Cloudinary

    Test the reachability of the Cloudinary API with the ping method.

    GET /ping

    Ping Cloudinary servers

    Result sample:
    {
     "status": "ok"
    }
    Ping Cloudinary servers
    URL:
    GET /ping
    Ruby:
    Cloudinary::Api.ping
    PHP:
    $api->ping();
    Python:
    cloudinary.api.ping()
    Node.js:
    cloudinary.v2.api.ping(function(error, result){console.log(result)});
    Java:
    api.ping(ObjectUtils.emptyMap());
    .Net:
    Currently not available
    Endpoint:
    /ping