{"id":34721613,"url":"https://github.com/cloudinary/permissions-php","last_synced_at":"2026-05-26T11:33:33.329Z","repository":{"id":254877964,"uuid":"847812931","full_name":"cloudinary/permissions-php","owner":"cloudinary","description":"Cloudinary Account Permissions PHP SDK","archived":false,"fork":false,"pushed_at":"2024-08-26T16:19:13.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-12-20T07:30:44.643Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudinary.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-26T15:40:05.000Z","updated_at":"2024-08-26T16:19:16.000Z","dependencies_parsed_at":"2025-02-17T16:01:24.686Z","dependency_job_id":null,"html_url":"https://github.com/cloudinary/permissions-php","commit_stats":null,"previous_names":["cloudinary/permissions-php"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cloudinary/permissions-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary%2Fpermissions-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary%2Fpermissions-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary%2Fpermissions-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary%2Fpermissions-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudinary","download_url":"https://codeload.github.com/cloudinary/permissions-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary%2Fpermissions-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33518916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-25T01:48:24.210Z","updated_at":"2026-05-26T11:33:33.322Z","avatar_url":"https://github.com/cloudinary.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudinary Account Permissions API PHP SDK\n\nAccounts with Permissions API access can manage custom permission policies. These policies assign permissions for a principal, allowing the principal to perform a specific action on a designated resource within a particular scope (your account or a product environment). \n\nRefer to the [Permissions API guide](permissions_api_guide) for instructions on what to specify in the `policy_statement` to control Cloudinary activities, and to the Cedar schema, which defines the possible values for principals, actions, and resources.\n\nThe API uses **Basic Authentication** over HTTPS. Your **Provisioning Key** and **Provisioning Secret** are used for the authentication. These credentials (as well as your ACCOUNT_ID) are located in the [Cloudinary Console](https://console.cloudinary.com/pm) under **Settings \u003e Account \u003e Provisioning API Access**.\n\nThe Permissions API has dedicated SDKs for the following languages:\n\n* JavaScript\n* PHP\n* Java\n\n\nFor more information, please visit [https://support.cloudinary.com](https://support.cloudinary.com).\n\n## Installation \u0026 Usage\n\n### Requirements\n\nPHP 8.1 and later.\n\n### Composer\n\nTo install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:\n\n```json\n{\n  \"require\": {\n    \"cloudinary/permissions\": \"*\"\n  }\n}\n```\n\nThen run `composer install`\n\n### Manual Installation\n\nDownload the files and include `autoload.php`:\n\n```php\n\u003c?php\nrequire_once('/path/to/permissions/vendor/autoload.php');\n```\n\n\n## Configuration\n\nThe API uses **Basic Authentication** over HTTPS.\n\nYour Cloudinary **Account ID**, **Provisioning Key** and **Provisioning Secret** are used for the authentication.\n\nThese ID's are located in the Cloudinary Console under **Settings \u003e Account \u003e Provisioning API Access**,\nor they can be obtained from the provisioning environment variable available on your Cloudinary Console [Dashboard](https://console.cloudinary.com/pm/developer-dashboard)\n\n(in the form: `CLOUDINARY_ACCOUNT_URL=account://\u003cPROVISIONING_KEY\u003e:\u003cPROVISIONING_SECRET\u003e@\u003cACCOUNT_ID\u003e`).\n\nYou can either pass configuration with each `$apiInstance` initialization:\n\n```php\n\u003c?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure Cloudinary Account URL\n$config = Cloudinary\\Permissions\\Configuration::getDefaultConfiguration()\n              -\u003esetCloudinaryAccountUrl('account://provisioning_key:provisioning_secret@account_id');\n\n$apiInstance = new Cloudinary\\Permissions\\Api\\CustomPoliciesApi(null, $config);\n```\n\nOr set the environment variable globally.\n\nFor example, to set a temporary environment variable:\n\n* On Mac or Linux:\n\n    ```\n    export CLOUDINARY_ACCOUNT_URL=account://provisioning_key:provisioning_secret@account_id\n    ```\n\n* On Windows:\n\n    ```\n    set CLOUDINARY_ACCOUNT_URL=account://provisioning_key:provisioning_secret@account_id\n    ```\n\nAnd then you can simply initialize `$apiInstance` as follows:\n\n```php\n\u003c?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n$apiInstance = new Cloudinary\\Permissions\\Api\\CustomPoliciesApi();\n```\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```php\n\u003c?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n$apiInstance = new Cloudinary\\Permissions\\Api\\CustomPoliciesApi();\n\n$scopeType = \"\u0026#39;scopeType_example\u0026#39;\"; // string | Specifies the level for retrieving policies, either at the account level or within product environments.\n$scopeId = \"\u0026#39;scopeId_example\u0026#39;\"; // string | The ID of a specific product environment where the policy is applied. This parameter is only relevant if `scope_type` is \\\"prodenv\\\". Find your product environment IDs in the [Product Environments](https://console.cloudinary.com/settings/product-environments) page of the Console Settings. - \u003cproduct_environment_id\u003e\n$enabled = true; // bool | Filter policies by enabled status (true/false).\n$cursor = \"\u0026#39;cursor_example\u0026#39;\"; // string | A pagination cursor for fetching subsequent results.\n\ntry {\n    $result = $apiInstance-\u003egetCustomPolicies($scopeType, $scopeId, $enabled, $cursor);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling CustomPoliciesApi-\u003egetCustomPolicies: ', $e-\u003egetMessage(), PHP_EOL;\n}\n```\n\n## API Endpoints\n\nAll URIs are relative to https://api.cloudinary.com/v2/accounts/ACCOUNT_ID/permissions, except if the operation defines another base path.\n\n| Class | Method | HTTP request | Description |\n| ------------ | ------------- | ------------- | ------------- |\n| *CustomPoliciesApi* | [**createCustomPolicy**](docs/Api/CustomPoliciesApi.md#createcustompolicy) | **POST** /policies/custom | Create custom policy |\n| *CustomPoliciesApi* | [**deleteCustomPolicy**](docs/Api/CustomPoliciesApi.md#deletecustompolicy) | **DELETE** /policies/custom/{policy_id} | Delete custom policy |\n| *CustomPoliciesApi* | [**getCustomPolicies**](docs/Api/CustomPoliciesApi.md#getcustompolicies) | **GET** /policies/custom | Get custom policies |\n| *CustomPoliciesApi* | [**getCustomPolicy**](docs/Api/CustomPoliciesApi.md#getcustompolicy) | **GET** /policies/custom/{policy_id} | Get custom policy |\n| *CustomPoliciesApi* | [**updateCustomPolicy**](docs/Api/CustomPoliciesApi.md#updatecustompolicy) | **PUT** /policies/custom/{policy_id} | Update custom policy |\n\n## Models\n\n- [CreateCustomPolicy](docs/Model/CreateCustomPolicy.md)\n- [CustomPoliciesResponse](docs/Model/CustomPoliciesResponse.md)\n- [CustomPolicy](docs/Model/CustomPolicy.md)\n- [CustomPolicyResponse](docs/Model/CustomPolicyResponse.md)\n- [CustomPolicyResponseData](docs/Model/CustomPolicyResponseData.md)\n- [Error](docs/Model/Error.md)\n- [ErrorResponse](docs/Model/ErrorResponse.md)\n- [UpdateCustomPolicy](docs/Model/UpdateCustomPolicy.md)\n\n## Authorization\n\n### basicAuth\n\n- **Type**: HTTP basic authentication\n\n## Tests\n\nTo run the tests, use:\n\n```bash\ncomposer install\nvendor/bin/phpunit\n```\n\n## Author\n\nsupport@cloudinary.com\n\n## About this package\n\nThis Cloudinary Account Permissions API PHP package is automatically generated.\n\n- Package version: `1.0.0`\n- API version: `1.0.4`\n- Build package: `org.openapitools.codegen.languages.PhpNextgenClientCodegen`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudinary%2Fpermissions-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudinary%2Fpermissions-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudinary%2Fpermissions-php/lists"}