AdminApi
class AdminApi
Enables Cloudinary Admin API functionality.
Learn more: Admin API Reference
Properties
ApiClient | $apiClient | Defined in AdminApi class. | from MiscTrait |
ApiClient | $apiV2Client | Defined in AdminApi class. | from AnalysisTrait |
Methods
Lists available asset types.
Lists all uploaded assets filtered by any specified options.
Lists assets with the specified tag.
Lists assets with the specified contextual metadata.
Lists assets currently in the specified moderation queue and status.
Lists assets with the specified public IDs.
Lists assets with the specified asset IDs.
Lists assets in the specified asset folder.
Find images based on their visual content.
Returns the details of the specified asset and all its derived assets.
Returns the details of the specified asset and all its derived assets by asset id.
Reverts to the latest backed up version of the specified deleted assets.
Updates details of an existing asset.
Deletes the specified assets.
Deletes assets by prefix.
Deletes all assets of the specified asset and delivery type, including their derived assets.
Deletes assets with the specified tag, including their derived assets.
Deletes the specified derived assets by derived asset ID.
Deletes derived assets identified by transformation and public_ids.
Relates an asset to other assets by public IDs.
Relates an asset to other assets by asset IDs.
Unrelates an asset from other assets by public IDs.
Unrelates an asset from other assets by asset IDs.
Lists all root folders.
Lists sub-folders.
Creates a new empty folder.
Deletes an empty folder.
Lists stored transformations.
Returns the details of a single transformation.
Deletes the specified stored transformation.
Updates the specified transformation.
Creates a named transformation.
Lists streaming profiles including built-in and custom profiles.
Gets details of a single streaming profile by name.
Deletes or reverts the specified streaming profile.
Updates an existing streaming profile.
Creates a new, custom streaming profile.
Lists existing upload presets.
Retrieves the details of the specified upload preset.
Deletes the specified upload preset.
Updates the specified upload preset.
Creates a new upload preset.
Lists upload mappings by folder and its mapped template (URL).
Returns the details of the specified upload mapping.
Deletes an upload mapping.
Updates an existing upload mapping with a new template (URL).
Creates a new upload mapping.
Tests the reachability of the Cloudinary API.
Tests the reachability of the Cloudinary API asynchronously.
Gets cloud usage details.
Lists all the tags currently used for a specified asset type.
Analyzes an asset with the requested analysis type.
Analyzes an asset with the requested analysis type asynchronously.
AdminApi constructor.
Details
ApiResponse
assetTypes()
Lists available asset types.
ApiResponse
assets(array $options = [])
Lists all uploaded assets filtered by any specified options.
ApiResponse
assetsByTag(string $tag, array $options = [])
Lists assets with the specified tag.
This method does not return matching deleted assets, even if they have been backed up.
ApiResponse
assetsByContext(string $key, string $value = null, array $options = [])
Lists assets with the specified contextual metadata.
This method does not return matching deleted assets, even if they have been backed up.
ApiResponse
assetsByModeration(string $kind, string $status, array $options = [])
Lists assets currently in the specified moderation queue and status.
ApiResponse
assetsByIds(string|array $publicIds, array $options = [])
Lists assets with the specified public IDs.
ApiResponse
assetsByAssetIds(string|array $assetIds, array $options = [])
Lists assets with the specified asset IDs.
ApiResponse
assetsByAssetFolder(string $assetFolder, array $options = [])
Lists assets in the specified asset folder.
ApiResponse
visualSearch(array $options = [])
Find images based on their visual content.
ApiResponse
asset(string $publicId, array $options = [])
Returns the details of the specified asset and all its derived assets.
Note that if you only need details about the original asset, you can also use the Uploader::upload or Uploader::explicit methods, which return the same information and are not rate limited.
ApiResponse
assetByAssetId(string $assetId, array $options = [])
Returns the details of the specified asset and all its derived assets by asset id.
Note that if you only need details about the original asset, you can also use the Uploader::upload or Uploader::explicit methods, which return the same information and are not rate limited.
ApiResponse
restore(string|array $publicIds, array $options = [])
Reverts to the latest backed up version of the specified deleted assets.
ApiResponse
update(string|array $publicId, array $options = [])
Updates details of an existing asset.
Update one or more of the attributes associated with a specified asset. Note that you can also update most attributes of an existing asset using the Uploader::explicit method, which is not rate limited.
ApiResponse
deleteAssets(string|array $publicIds, array $options = [])
Deletes the specified assets.
ApiResponse
deleteAssetsByPrefix(string $prefix, array $options = [])
Deletes assets by prefix.
Delete up to 1000 original assets, along with their derived assets, where the public ID starts with the specified prefix.
ApiResponse
deleteAllAssets(array $options = [])
Deletes all assets of the specified asset and delivery type, including their derived assets.
Supports deleting up to a maximum of 1000 original assets in a single call.
ApiResponse
deleteAssetsByTag(string $tag, array $options = [])
Deletes assets with the specified tag, including their derived assets.
Supports deleting up to a maximum of 1000 original assets in a single call.
ApiResponse
deleteDerivedAssets(string|array $derived_asset_ids)
Deletes the specified derived assets by derived asset ID.
The derived asset IDs for a particular original asset are returned when calling the asset
method to
return the details of a single asset.
ApiResponse
deleteDerivedByTransformation(string|array $publicIds, string|array $transformations = [], array $options = [])
Deletes derived assets identified by transformation and public_ids.
ApiResponse
addRelatedAssets(string $publicId, array $assetsToRelate, array $options = [])
Relates an asset to other assets by public IDs.
ApiResponse
addRelatedAssetsByAssetIds(string $assetId, array $assetsToRelate)
Relates an asset to other assets by asset IDs.
ApiResponse
deleteRelatedAssets(string $publicId, array $assetsToUnrelate, array $options = [])
Unrelates an asset from other assets by public IDs.
ApiResponse
deleteRelatedAssetsByAssetIds(string $assetId, array $assetsToUnrelate)
Unrelates an asset from other assets by asset IDs.
ApiResponse
rootFolders(array $options = [])
Lists all root folders.
ApiResponse
subFolders(string $ofFolderPath, array $options = [])
Lists sub-folders.
Returns the name and path of all the sub-folders of a specified parent folder. Limited to 2000 results.
ApiResponse
createFolder(string $path)
Creates a new empty folder.
ApiResponse
deleteFolder(string $path)
Deletes an empty folder.
The specified folder cannot contain any assets, but can have empty descendant sub-folders.
ApiResponse
transformations(array $options = [])
Lists stored transformations.
ApiResponse
transformation(string|array $transformation, array $options = [])
Returns the details of a single transformation.
ApiResponse
deleteTransformation(string|array $transformation, array $options = [])
Deletes the specified stored transformation.
Deleting a transformation also deletes all the stored derived assets based on this transformation (up to 1000). The method returns an error if there are more than 1000 derived assets based on this transformation.
ApiResponse
updateTransformation(string|array $transformation, array $updates = [])
Updates the specified transformation.
ApiResponse
createTransformation(string $name, Transformation|string|array $definition)
Creates a named transformation.
ApiResponse
listStreamingProfiles()
Lists streaming profiles including built-in and custom profiles.
ApiResponse
getStreamingProfile(string $name)
Gets details of a single streaming profile by name.
ApiResponse
deleteStreamingProfile(string $name)
Deletes or reverts the specified streaming profile.
For custom streaming profiles, deletes the specified profile. For built-in streaming profiles, if the built-in profile was modified, reverts the profile to the original settings. For built-in streaming profiles that have not been modified, the Delete method returns an error.
ApiResponse
updateStreamingProfile(string $name, array $options = [])
Updates an existing streaming profile.
You can update both custom and built-in profiles. The specified list of representations replaces the previous list.
ApiResponse
createStreamingProfile(string $name, array $options = [])
Creates a new, custom streaming profile.
ApiResponse
uploadPresets(array $options = [])
Lists existing upload presets.
ApiResponse
uploadPreset(string $name, array $options = [])
Retrieves the details of the specified upload preset.
ApiResponse
deleteUploadPreset(string $name)
Deletes the specified upload preset.
ApiResponse
updateUploadPreset(string $name, array $options = [])
Updates the specified upload preset.
ApiResponse
createUploadPreset(array $options = [])
Creates a new upload preset.
ApiResponse
uploadMappings(array $options = [])
Lists upload mappings by folder and its mapped template (URL).
ApiResponse
uploadMapping(string $name)
Returns the details of the specified upload mapping.
Retrieve the mapped template (URL) of a specified upload mapping folder.
ApiResponse
deleteUploadMapping(string $name)
Deletes an upload mapping.
ApiResponse
updateUploadMapping(string $name, array $options = [])
Updates an existing upload mapping with a new template (URL).
ApiResponse
createUploadMapping(string $name, array $options = [])
Creates a new upload mapping.
ApiResponse
ping()
Tests the reachability of the Cloudinary API.
PromiseInterface
pingAsync()
Tests the reachability of the Cloudinary API asynchronously.
ApiResponse
usage(array $options = [])
Gets cloud usage details.
Returns a report detailing your current Cloudinary cloud usage details, including storage, bandwidth, requests, number of assets, and add-on usage. Note that numbers are updated periodically.
ApiResponse
tags(array $options = [])
Lists all the tags currently used for a specified asset type.
ApiResponse
analyze(string $inputType, string $analysisType, string $uri = null)
Analyzes an asset with the requested analysis type.
PromiseInterface
analyzeAsync(string $inputType, string $analysisType, string $uri = null)
Analyzes an asset with the requested analysis type asynchronously.
__construct(mixed $configuration = null)
AdminApi constructor.