The Admin API is a rate-limited API that provides full control of all uploaded media assets (resources), fetched social profile pictures, generated transformations and more.
For example, to list all video assets in the 'demo' account:
Copy to clipboard
GET https://api.cloudinary.com/v1_1/demo/resources/video
The API uses Basic Authentication over secure HTTP. Your Cloudinary API Key and API Secret (which can be found on the Dashboard page of your Cloudinary console) are used for the authentication.
You can experiment with returning a list of the images on your own Cloudinary account by replacing the API_KEY, API_SECRET, and CLOUD_NAME in the cURL command below:
For most actions, request parameters are appended to the URL. In a few cases, they are passed as JSON objects. The response is in a JSON snippet.
The response includes information about the action that was performed as well as data about the relevant assets.
The following sections provide additional details on working with the Admin API:
Our backend SDK libraries provide a wrapper for the Admin API, enabling you to use your native programming language of choice. When using an SDK, request building and authentication are handled automatically, and the JSON response is parsed and returned.
For example, you can use the following SDK command to return a listing of all image (the default resource_type) assets:
You can use the Cloudinary CLI (Command Line Interface) to interact with the Admin API. This can provide an easy way to add automation to your workflows and manage your assets without the need for a formal coding environment or having to access your management console.
You can find instructions for setting up and using the CLI in the CLI reference.
You can use the Admin API quite extensively, but it is a rate limited API. The specific limits depend on the plan your account is registered to. If you require more flexible limits, don’t hesitate to contact us.
Note
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 some 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.
var result = cloudinary.ListResources();
result.Limit
// returns 500
result.Remaining
// returns 499
result.Reset
//returns 2019-10-03 10:00:00 +0200
Go (cloudinary-go 1.x):
Copy to clipboard
Not supported by this SDK
Tip
You can also retrieve rate limits details as well as transformation, bandwidth, and storage limits, and a variety of additional account usage data with the GET /usage method.
The GET 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 methods. There is also a maximum number of results you can request for a single API call (either 100 or 500 as documented for each of the relevant methods). DELETE methods also operate in chunks.
When a GET request has more results to return than max_results or when a DELETE request has more than 1000 entities to delete, the next_cursor value is returned as part of the response. You can then specify this cursor value as the next_cursor parameter of the following GET or DELETE request. For example, this enables you to iterate through the full list of uploaded resources, transformations, or tags in your Cloudinary account or to delete an entire set of entities that matches your deletion request.
By default, Cloudinary accounts use US-based data centers. In these cases, the endpoint format is as shown at the beginning of this Overview.
If the majority of your users are located in Europe or Asia, Cloudinary can set up your account to use our Europe (EU) or Asia Pacific (AP) data center. In that case, your endpoints will take the form:
This is a premium feature that is supported only for our Enterprise plans and must be arranged when the account is created. Contact support for more information.
Maximum number of results to return (up to 500). Default: 10.
next_cursor
String
When a 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 a following request.
Enables you to manage the metadata fields available for your account.
The table below provides a quick summary of the methods available for the Admin API metadata_fields endpoint. See the Metadata API documentation for detailed information on the following Metadata methods, as well as detailed information on the Metadata field structure, including how to work with field validation and list (datasource) values.
Enables you to set up dependencies and hierarchical relationships between structured metadata fields and field options.
The table below provides a quick summary of the methods available for the Admin API metadata_rules endpoint. See the Conditional metadata rules API documentation for detailed information on the following Metadata rules methods, as well as detailed information on the Metadata rule structure, including how to work with conditions that evaluate on metadata payloads, and results that are applied to specified metadata fields in the case those conditions are met.
The type of asset. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image, raw, video.
The delivery type, relevant as a parameter only when using the SDKs (the type is included in the endpoint URL when using the REST API). Possible values: upload, private, authenticated, facebook, twitter, gravatar, youtube, hulu, vimeo, animoto, worldstarhiphop, dailymotion. Default: all.
prefix
String
Find all assets with a public ID that starts with the given prefix. The assets are sorted by public ID in the response.
Note: use this parameter to find public IDs with a + character in them.
public_ids
String[]
An array of public IDs. Get assets with the given public IDs (up to 100).
Note: Not supported for SDKs. Instead use the resources_by_ids SDK method. This parameter does not support public IDs with a + character in them (use the prefix parameter to find the assets instead).
max_results
Integers
Maximum number of assets to return (up to 500). Default: 10.
next_cursor
String
When a 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 a following request.
start_at
String
Get assets that were created since the given timestamp (ISO 8601 format). Supported unless prefix or public_ids were specified. For example: 2020-12-01
direction
String/Integer
Control the order of returned assets, according to the created_at date. Note: if a prefix is specified, this parameter is ignored and the results are sorted by public ID. Possible values: desc or -1 (default), asc or 1.
tags
Boolean
Whether to include the list of tag names assigned to each asset. Default: false.
context
Boolean
Whether to include key-value pairs of contextual metadata associated with each asset. Default: false.
moderation
Boolean
Whether to include the image moderation status of each asset. Default: false.
metadata
Boolean
Whether to include the metadata fields and values set for each asset. Default: false.
var listResourcesParams = new ListResourcesParams(){
Type = "upload",
MaxResults = 30};
var listResourcesResult = cloudinary.ListResources(listResourcesParams);
var listResourcesByPrefixParams = new listResourcesByPrefixParams(){
Type = "upload",
Prefix = "sample"};
var listResourcesResult = cloudinary.ListResources(listResourcesByPrefixParams);
The type of asset. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image (default), raw, video.
max_results
Integer
Maximum number of assets to return (maximum=500). Default: 10.
next_cursor
String
When a 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 request.
direction
String/Integer
Control the order of returned assets, according to the created_at date. Note: if a prefix is specified, this parameter is ignored and the results are sorted by public ID. Possible values: desc or -1 (default), asc or 1.
tags
Boolean
Whether to include the list of tag names assigned to each asset. Default: false.
context
Boolean
Whether to include key-value pairs of contextual metadata associated with each asset. Default: false.
moderations
Boolean
Whether to include image moderation status of each asset. Default: false.
metadata
Boolean
Whether to include the metadata fields and values set for each asset. Default: false.
var listResourcesParams = new ListResourcesByTagParams(){
Tag = "mytag",
ResourceType = "raw"};
var listResourcesResult = cloudinary.ListResources(ListResourcesByTagParams);
The type of asset. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image (default), raw, video.
value
String
Only assets with this value for the contextual metadata key are returned. If this parameter is not provided, all assets with the given contextual metadata key are returned, regardless of the actual value of the key.
max_results
Integer
Maximum number of assets to return (maximum=500). Default: 10.
next_cursor
String
When a 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 request.
direction
String/Integer
Control the order of returned assets, according to the created_at date. Note: if a prefix is specified, this parameter is ignored and the results are sorted by public ID. Possible values: desc or -1 (default), asc or 1.
tags
Boolean
Whether to include the list of tag names assigned to each asset. Default: false.
context
Boolean
Whether to include key-value pairs of contextual metadata associated with each asset. Default: false.
moderations
Boolean
Whether to include image moderation status of each asset. Default: false.
metadata
Boolean
Whether to include the metadata fields and values set for each asset. Default: false.
The type of asset. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image (default), raw, video.
max_results
Integer
Maximum number of assets to return (maximum=500). Default: 10.
next_cursor
String
When a 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 request.
direction
String/Integer
Control the order of returned assets, according to the created_at date. Note: if a prefix is specified, this parameter is ignored and the results are sorted by public ID. Possible values: desc or -1 (default), asc or 1.
tags
Boolean
Whether to include the list of tag names assigned to each asset. Default: false.
context
Boolean
Whether to include key-value pairs of contextual metadata associated with each asset. Default: false.
moderations
Boolean
Whether to include image moderation status of each asset. Default: false.
metadata
Boolean
Whether to include the metadata fields and values set for each asset. Default: false.
The type of asset. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image (default), raw, video.
type
String
The delivery type, relevant as a parameter only when using the SDKs (the type is included in the endpoint URL when using the REST API). Possible values: upload, private, authenticated, facebook, twitter, gravatar, youtube, hulu, vimeo, animoto, worldstarhiphop, dailymotion. Default: all.
colors
Boolean
Whether to include color information: predominant colors and histogram of 32 leading colors. Default: false.
image_metadata
Boolean
Whether to include IPTC, XMP, and detailed Exif metadata in the response. Default: false.This parameter applies to both image and video asset types (including audio files). The exact set of metadata fields that gets returned for an asset depends on the asset type.Note: Using this parameter also returns the asset's ETag value for all asset types, including raw.
exif
Boolean
Deprecated. Use image_metadata instead. Default: false.
faces
Boolean
Whether to include a list of coordinates of detected faces. Default: false.
quality_analysis
Boolean
Whether to return quality analysis scores for the image. Default: false.
Whether to report the number of pages in multi-page documents (e.g., PDF). Default: false.
phash
Boolean
Whether to include the perceptual hash (pHash) of the uploaded photo for image similarity detection. Default: false.
coordinates
Boolean
Whether to include previously specified custom cropping coordinates and faces coordinates. Default: false.
versions
Boolean
Whether to include details of all the backed up versions of the asset. Default: false.
max_results
Integer
Maximum number of derived assets to return (maximum=500). Default: 10.
derived_next_cursor
String
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 request.
var getResource = new GetResourceParams("sample"){
Faces = true,
Colors = ImageMetadata = Versions = true };
var info = cloudinary.GetResource(getResource);
Search allows you fine control on filtering and retrieving information on all the resources (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.
Note
Request parameters cannot be appended to the endpoint URL as in the other Admin API methods. Search API parameters are passed as JSON data.
Cloudinary implements eventual consistency: any changes made to assets will only be reflected in a search made a few seconds after the change is processed.
All the parameters of the search method are optional. Including no parameters in the method call will return the 50 most recently created resources in descending order of creation time.
Parameter
Type
Description
expression
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 documentation.
sort_by
String[]
An array of string values representing a key value pair, where the key is the field to sort by and the value is the direction. Valid sort directions are asc or desc. If this parameter is not provided then the results are sorted by descending creation date. You can specify more than one sort_by parameter; results will be sorted according to the order of the fields provided.
max_results
Integer
Maximum number of assets to return (maximum=500). Default: 10.
next_cursor
String
When a 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 request.
with_field
String
The name of an additional asset attribute to include for each asset in the response. You can specify more than one with_field parameter. Possible value: context, tags, and for Tier 2 also image_metadata, and image_analysis.
aggregate
String
(Tier 2 only) The name of a field (attribute) for which an aggregation count should be calculated and returned in the response. You can specify more than one aggregate parameter. Supported values: 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 kb - 5 mb), large (5 mb - 100 mb), and huge (>100 mb). - Video duration is divided into short (< 3 minutes), medium (3-12 min), and long (> 12 min).
Important
A new Search query object should be initialized for every distinct query executed. Please avoid reusing the same instance of a Search query object, as that might lead to unexpected behavior, especially when using the sort_by parameter.
When iterating through the results using the next_cursor parameter, the query should be reused without changing any of the other parameter values.
When making direct calls to the Cloudinary endpoint, make sure to pass any parameters using JSON (with Content-Type: application/json) as in the cURL examples on this page.
Find assets containing 'cat' in any field (attribute), include context metadata and tags in the details of each resource, and limit the returned results to 10 resources:
Find assets containing 'cat' in any field but not 'kitten' in the tags field, sort the results by public_id in descending order, and calculate an aggregation count based on the values of the format field:
Update one or more of the attributes associated with a specified resource (asset). Note that you can also update many attributes of an existing asset using the explicit method, which is not rate limited.
The type of asset. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image (default), raw, video.
type
String
The delivery type, relevant as a parameter only when using the SDKs (the type is included in the endpoint URL when using the REST API). Possible values: upload, private, authenticated, facebook, twitter, gravatar, youtube, hulu, vimeo, animoto, worldstarhiphop, dailymotion. Default: all.
tags
String
A comma-separated list of tag names to assign to the uploaded asset for later group reference.
context
String
A map (using the SDKs) or pipe-separated list (for REST API calls) of key-value pairs of contextual metadata to attach to an uploaded asset. The contextual metadata values of uploaded files are available for fetching using the Admin API. For example: `alt=My image
metadata
String
A map (supported for Java SDK only) or pipe-separated list (for REST API calls) of custom metadata fields (by external_id) and the values to assign to each of them. The =, " and ❘ characters can be supported as values when escaped with a prepended backslash (\). For example: in_stock_id=50❘color_id=[\"green\",\"red\"].
face_coordinates
String
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 a pipe (`
custom_coordinates
String
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.
quality_override
Integer
Sets a quality value for this asset that will override any automatic quality transformations (q_auto) for this specific asset.
moderation_status
String
Manually set image moderation status or override previously automatically moderated images by approving or rejecting. Possible values: approved, rejected.
auto_tagging
Decimal
Automatically assigns tags to an asset according to detected objects or categories with a confidence score higher than the specified value.
Invokes the relevant add-on to return a list of detected content.
Set to:
<content-aware model>_[<version>] (e.g. coco_v1) to return a list of detected content using the Cloudinary AI Content Analysis add-on. Can be used together with the auto_tagging parameter to apply tags automatically.
aws_rek_face to return a list of detected celebrities and facial attributes using the Amazon Rekognition Celebrity Detection add-on. Can be used together with the auto_tagging parameter to apply tags automatically.
Relevant for images only.
ocr
String
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. Relevant for images only.
raw_convert
String
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.
A comma-separated list of the categorization add-ons to run on the asset. Set to google_tagging, google_video_tagging, imagga_tagging and/or aws_rek_tagging to automatically classify the scenes of the uploaded asset. Can be used together with the auto_tagging parameter to apply tags automatically. See the Google Automatic Video Tagging, Google Auto Tagging, Imagga Auto Tagging and Amazon Rekognition Auto Tagging add-ons for more details.
background_removal
String
Automatically remove the background of an image using an add-on.
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'
var updateParams = new UpdateParams("image1"){
Tags = "important",
ModerationStatus = "approved"};
var updateResult = cloudinary.UpdateResource(updateParams);
The public IDs of (deleted or existing) backed up assets to restore (array of up to 100 public_ids). By default, the latest backed up version of the asset is restored. If the versions parameter is specified, the corresponding version of each public ID is restored.
The asset type of the requested assets. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image (default), raw, video.
type
String
The delivery type of the requested assets, relevant as a parameter only when using the SDKs (the type is included in the endpoint URL when using the REST API). Possible values: upload, private, authenticated, Default: upload.
versions
String[]
The version of each of the assets to restore. Specify the version_id for each public ID. Use the resource method to list details of backed up versions of an asset.
Update the access_mode of resources (assets) by public_id(s), by tag, or by prefix. 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 only update the access_mode of an asset that was already assigned an access_mode when uploaded. For more details, see the upload method and Access mode.
The type of asset. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image (default), raw, video.
var updateResourceAccessModeParams = new UpdateResourceAccessModeParams(){
AccessMode = "public"};
cloudinary.UpdateResourceAccessModeByTag("20170216", updateResourceAccessModeParams);
Go (cloudinary-go 1.x):
Copy to clipboard
Not supported by this SDK
curl:
Copy to clipboard
curl \
-d "access_mode=public&tag=20170216" \
-X POST \
https://<API_KEY>:<API_SECRET>@api.cloudinary.com/v1_1/<cloud_name>/resources/image/upload/update_access_mode
The type of asset. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image (default), raw, video.
type
String
The delivery type, relevant as a parameter only when using the SDKs (the type is included in the endpoint URL when using the REST API). Possible values: upload, private, fetch,authenticated, facebook, twitter, gravatar, youtube, hulu, vimeo, animoto, worldstarhiphop, dailymotion. Default: upload.
keep_original
Boolean
Whether to delete only the derived resources. Default: false.
invalidate
Boolean
Whether to also invalidate the copies of the resource on the CDN. It usually takes between a few seconds and a few minutes 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. Default: false.
next_cursor
String
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 a parameter of the following deletion request.
transformations
String
Only the derived resources matching this hash of transformation parameters will be deleted.
The type of asset. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image (default), raw, video.
keep_original
Boolean
Whether to delete only the derived resources. Default: false.
invalidate
Boolean
Whether to also invalidate the copies of the resource on the CDN. It usually takes between a few seconds and a few minutes 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. Default: false.
next_cursor
String
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 a parameter of the following deletion request.
transformations
String
Only the derived resources matching this hash of transformation parameters will be deleted.
Delete all assets with the given derived_resource_ids IDs (array of up to 100 IDs). The derived resource IDs are returned when calling the Details of a single resource method.
Whether to also invalidate the copies of the resource on the CDN. It usually takes between a few seconds and a few minutes 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. Default: false.
Enables you 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.
The identification name to assign to the new streaming profile. The name is case-insensitive and can contain alphanumeric characters, underscores (_) and hyphens (-).
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.
:
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 (CloudinaryDotNet 1.x):
Copy to clipboard
var streamingProfileParams = new StreamingProfileCreateParams()
{
Name = "custom_square",
DisplayName = "Custom square resolution",
Representations = newList<Representation>
{
new Representation {Transformation = new Transformation().Crop("limit").Width(1200).Height(1200).BitRate("5m")},
new Representation {Transformation = new Transformation().Crop("limit").Width(900).Height(900).BitRate("3500k")},
new Representation {Transformation = new Transformation().Crop("limit").Width(600).Height(600).BitRate("1500k")}
}
};
cloudinary.CreateStreamingProfile(streamingProfileParams);
If running the CLI command on Windows, you need to escape the double quotes within the curly braces using either \ or ", for example, \"text\" or ""text"".
:
api.createStreamingProfile("custom_square_combo", "Custom square resolution with combination of codecs",
Arrays.asList(
ObjectUtils.asMap("transformation", new
Transformation().crop("limit").width(1200).height(1200).videoCodec("h265").bitRate("5m")),
ObjectUtils.asMap("transformation", new
Transformation().crop("limit").width(900).height(900).videoCodec("h265").bitRate("3500k")),
ObjectUtils.asMap("transformation", new
Transformation().crop("limit").width(600).height(600).videoCodec("h265").bitRate("1500k")),
ObjectUtils.asMap("transformation", new
Transformation().crop("limit").width(1200).height(1200).videoCodec("vp9").bitRate("5m")),
ObjectUtils.asMap("transformation", new
Transformation().crop("limit").width(900).height(900).videoCodec("vp9").bitRate("3500k")),
ObjectUtils.asMap("transformation", new
Transformation().crop("limit").width(600).height(600).videoCodec("vp9").bitRate("1500k"))));
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
var streamingProfileParams = new StreamingProfileCreateParams()
{
Name = "custom_square",
DisplayName = "Custom square resolution",
Representations = newList<Representation>
{
new Representation {Transformation = new Transformation().Crop("limit").Width(1200).Height(1200).BitRate("5m")},
new Representation {Transformation = new Transformation().Crop("limit").Width(900).Height(900).BitRate("3500k")},
new Representation {Transformation = new Transformation().Crop("limit").Width(600).Height(600).BitRate("1500k")}
new Representation { Transformation = new Transformation().Crop("limit").Width(1200).Height(1200).VideoCodec("vp9").BitRate("5m")},
new Representation { Transformation = new Transformation().Crop("limit").Width(900).Height(900).VideoCodec("vp9").BitRate("3500k")},
new Representation { Transformation = new Transformation().Crop("limit").Width(600).Height(600).VideoCodec("vp9").BitRate("1500k")}
}
};
cloudinary.CreateStreamingProfile(streamingProfileParams);
If running the CLI command on Windows, you need to escape the double quotes within the curly braces using either \ or ", for example, \"text\" or ""text"".
Update the specified existing streaming profile. You can update both custom and built-in profiles. The specified list of representations replaces the previous list.
The identification name to assign to the new streaming profile. The name is case-insensitive and can contain alphanumeric characters, underscores (_) and hyphens (-).
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.
:
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 (CloudinaryDotNet 1.x):
Copy to clipboard
var streamingUpdateParams = new StreamingProfileUpdateParams()
{
Representations = newList<Representation>
{
new Representation {Transformation = new Transformation().Crop("limit").Width(1200).Height(1200).BitRate("5m")},
new Representation {Transformation = new Transformation().Crop("limit").Width(900).Height(900).BitRate("3500k")},
new Representation {Transformation = new Transformation().Crop("limit").Width(600).Height(600).BitRate("1500k")},
new Representation {Transformation = new Transformation().Crop("limit").Width(320).Height(320).BitRate("192k")},
}
};
cloudinary.UpdateStreamingProfile("custom_square", streamingUpdateParams);
If running the CLI command on Windows, you need to escape the double quotes within the curly braces using either \ or ", for example, \"text\" or ""text"".
The type of asset. Relevant as a parameter only when using the SDKs (the resource_type is included in the endpoint URL when using the REST API). Note: use video for all video and audio assets, such as .mp3. Possible values: image (default), raw, video.
prefix
String
Find all tags that start with the given prefix.
max_results
Integers
Maximum number of assets to return (up to 500). Default: 10.
next_cursor
String
When a 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 a following request.
Maximum number of transformations to return (up to 500). Default: 10.
next_cursor
String
When a 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 a following request.
named
Boolean
Whether to return only named (true) or unnamed (false) transformations. If this parameter is not included, both named and unnamed transformations will be returned.
The response contains an array of transformations. If the number of transformations exceeds the max_results value, the next_cursor parameter is also returned. You can specify this value as the next_cursor parameter of the following listing request.
Maximum number of derived resources to return (up to 500). Default: 10.
next_cursor
String
When a 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 a following request.
If running the CLI command on Windows, you need to escape the double quotes within the curly braces using either \ or ", for example, \"text\" or ""text"".
var createTransformParams = new CreateTransformParams(){
Name = "small_fill",
Transformation = new Transformation().Width(150).Height(100).Crop("fill")};
cloudinary.CreateTransform(createTransformParams);
api.createTransformation("small_fill2",
new Transformation().width(150).height(100).crop("fill").generate(),
ObjectUtils.emptyMap());
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
var createTransformParams = new CreateTransformParams(){
Name = "small_fill2",
Transformation = new Transformation().Width(150).Height(100).Crop("fill")};
cloudinary.CreateTransform(createTransformParams);
Go (cloudinary-go 1.x):
Copy to clipboard
Not supported by this SDK
curl:
Copy to clipboard
curl \
-d 'transformation=w_150,h_100,c_fill' \
-X POST \
https://<API_KEY>:<API_SECRET>@api.cloudinary.com/v1_1/<CLOUD_NAME>/transformations/small_fill
If running the CLI command on Windows, you need to escape the double quotes within the curly braces using either \ or ", for example, \"text\" or ""text"".
Before you modify the transformation parameters of a named transformation that's already used in production, make sure you're aware of all existing use cases. To mitigate risk, when you update the parameters of an existing named transformation, existing derived assets using the named transformation are not regenerated. However, if an asset using the named transformation is already in production and is later regenerated for another reason (for example, you invalidate it or adjust transformation parameters outside the named transformation), then the new named transformation definition is applied, and if that definition does not fit with the overall transformation defined for that asset, it could break your production asset.
Whether to allow this named transformation when strict transformations are enabled. Default: false.
unsafe_update
String
Required when modifying the transformation parameters of an existing named transformation. The new transformation definition for the named transformation.
Because the changed definition can be unsafe for (significantly change) assets in production, the change is applied only to newly generated derived assets that reference this named transformation.
To apply the change to existing derived assets using this named transformation, invalidate them so that they'll be regenerated with the new definition when next requested.
api.updateTransformation("my_named",
ObjectUtils.asMap("unsafe_update",
new Transformation().crop("scale").width(103).generate());
.NET (CloudinaryDotNet 1.x):
Copy to clipboard
var updateTransformParams = new UpdateTransformParams(){
Transformation = "my_named",
UnsafeTransform = new Transformation().Crop("scale").Width(103)};
cloudinary.UpdateTransform(updateTransformParams);
If running the CLI command on Windows, you need to escape the double quotes within the curly braces using either \ or ", for example, \"text\" or ""text"".
Delete a single transformation. Supply either the name of the transformation or the transformation parameters.
Note
Deleting a transformation also deletes all the derived assets based on this transformation (up to 1000).
If there are more than 1000 derived assets based on this transformation, the method returns a 403 error: Unable to delete transformation because it has too many derived resources.
If running the CLI command on Windows, you need to escape the double quotes within the curly braces using either \ or ", for example, \"text\" or ""text"".
Maximum number of assets to return (up to 500). Default: 10.
next_cursor
String
When a 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 a following request.