# Clever Cloud > Clever Cloud provides a public REST API used by its own services and customers, known as [`/v2`](/developers/api/v2/). As our platform evolves, we’re progressively moving to`/v4`endpoints, adding --- # Source: https://www.clever.cloud/developers/guides/tutorial-wordpress/index.html.md # Source: https://www.clever.cloud/developers/guides/tutorial-symfony/index.html.md # Source: https://www.clever.cloud/developers/guides/ruby-rack-app-tutorial/index.html.md # Source: https://www.clever.cloud/developers/guides/ruby-rack/index.html.md # Source: https://www.clever.cloud/developers/guides/ruby-on-rails/index.html.md # Source: https://www.clever.cloud/developers/guides/proxysql/index.html.md # Source: https://www.clever.cloud/developers/guides/pgpool/index.html.md # Source: https://www.clever.cloud/developers/guides/otree/index.html.md # Source: https://www.clever.cloud/developers/guides/nuxt/index.html.md # Source: https://www.clever.cloud/developers/guides/node-js-mongo-db/index.html.md # Source: https://www.clever.cloud/developers/guides/node-statsd-nodejs-metrics/index.html.md # Source: https://www.clever.cloud/developers/guides/moodle/index.html.md # Source: https://www.clever.cloud/developers/guides/mkdocs/index.html.md # Source: https://www.clever.cloud/developers/guides/mdbook/index.html.md # Source: https://www.clever.cloud/developers/guides/lume-deno/index.html.md # Source: https://www.clever.cloud/developers/guides/tutorial-laravel/index.html.md # Source: https://www.clever.cloud/developers/guides/kibana/index.html.md # Source: https://www.clever.cloud/developers/guides/hugo-static-s3/index.html.md # Source: https://www.clever.cloud/developers/guides/hugo/index.html.md # Source: https://www.clever.cloud/developers/guides/hexo/index.html.md # Source: https://www.clever.cloud/developers/guides/go-echoip/index.html.md # Source: https://www.clever.cloud/developers/guides/fluentd/index.html.md # Source: https://www.clever.cloud/developers/guides/eleventy/index.html.md # Source: https://www.clever.cloud/developers/guides/ekg-statsd-haskell-metrics/index.html.md # Source: https://www.clever.cloud/developers/guides/tutorial-drupal/index.html.md # Source: https://www.clever.cloud/developers/guides/docusaurus/index.html.md # Source: https://www.clever.cloud/developers/guides/docs/index.html.md # Source: https://www.clever.cloud/developers/guides/python-django-sample/index.html.md # Source: https://www.clever.cloud/developers/guides/astro/index.html.md # Source: https://www.clever.cloud/developers/doc/account/ssh-keys-management/index.html.md # Source: https://www.clever.cloud/developers/doc/account/organisations/index.html.md # Source: https://www.clever.cloud/developers/doc/account/notifications/index.html.md # Source: https://www.clever.cloud/developers/doc/account/manage-account/index.html.md # Source: https://www.clever.cloud/developers/doc/account/administrate-organisation/index.html.md # Source: https://www.clever.cloud/developers/doc/account/delete-account/index.html.md # Source: https://www.clever.cloud/developers/doc/account/create-account/index.html.md # Source: https://www.clever.cloud/developers/doc/reference/products-support/index.html.md # Source: https://www.clever.cloud/developers/doc/reference/reference-environment-variables/index.html.md # Source: https://www.clever.cloud/developers/doc/reference/common-configuration/index.html.md # Source: https://www.clever.cloud/developers/doc/reference/cli/index.html.md # Source: https://www.clever.cloud/developers/doc/metrics/warp10/index.html.md # Source: https://www.clever.cloud/developers/doc/metrics/new-relic/index.html.md # Source: https://www.clever.cloud/developers/doc/metrics/blackfire/index.html.md # Source: https://www.clever.cloud/developers/doc/find-help/troubleshooting/index.html.md # Source: https://www.clever.cloud/developers/doc/find-help/support/index.html.md # Source: https://www.clever.cloud/developers/doc/find-help/faq/index.html.md # Source: https://www.clever.cloud/developers/doc/develop/workers/index.html.md # Source: https://www.clever.cloud/developers/doc/develop/request-flow/index.html.md # Source: https://www.clever.cloud/developers/doc/develop/network-groups/index.html.md # Source: https://www.clever.cloud/developers/doc/develop/env-variables/index.html.md # Source: https://www.clever.cloud/developers/doc/develop/build-hooks/index.html.md # Source: https://www.clever.cloud/developers/doc/develop/healthcheck/index.html.md # Source: https://www.clever.cloud/developers/doc/develop/tasks/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/services-depedencies/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/operators/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/notifications-webhooks/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/network-groups/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/logs-drains/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/kv-stores/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/install/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/kubernetes/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/applications/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/addons/index.html.md # Source: https://www.clever.cloud/developers/doc/kubernetes/operator/index.html.md # Source: https://www.clever.cloud/developers/doc/account/index.html.md # Source: https://www.clever.cloud/developers/doc/reference/index.html.md # Source: https://www.clever.cloud/developers/doc/quickstart/index.html.md # Source: https://www.clever.cloud/developers/doc/metrics/index.html.md # Source: https://www.clever.cloud/developers/doc/marketplace/index.html.md # Source: https://www.clever.cloud/developers/doc/functions/index.html.md # Source: https://www.clever.cloud/developers/doc/find-help/index.html.md # Source: https://www.clever.cloud/developers/doc/develop/index.html.md # Source: https://www.clever.cloud/developers/doc/contribute/index.html.md # Source: https://www.clever.cloud/developers/doc/cli/index.html.md # Source: https://www.clever.cloud/developers/doc/kubernetes/index.html.md # Source: https://www.clever.cloud/developers/doc/ci-cd/index.html.md # Source: https://www.clever.cloud/developers/doc/billing/index.html.md # Source: https://www.clever.cloud/developers/doc/best-practices/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/index.html.md # Source: https://www.clever.cloud/developers/doc/ci-cd/custom-scripts/index.html.md # Source: https://www.clever.cloud/developers/doc/ci-cd/gitlab/index.html.md # Source: https://www.clever.cloud/developers/doc/ci-cd/github/index.html.md # Source: https://www.clever.cloud/developers/doc/billing/unified-invoices/index.html.md # Source: https://www.clever.cloud/developers/doc/billing/payments-invoicing/index.html.md # Source: https://www.clever.cloud/developers/doc/billing/analytics-consumption/index.html.md # Source: https://www.clever.cloud/developers/doc/best-practices/tips_and_tricks/index.html.md # Source: https://www.clever.cloud/developers/doc/best-practices/12-factors/index.html.md # Source: https://www.clever.cloud/developers/doc/best-practices/load-testing/index.html.md # Source: https://www.clever.cloud/developers/doc/best-practices/cloud-storage/index.html.md # Source: https://www.clever.cloud/developers/doc/best-practices/blue-green/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/v/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/static-apache/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/static/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/scala/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/rust/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/ruby/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/python/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/php/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/nodejs/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/meteor/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/linux/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/java/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/haskell/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/golang/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/frankenphp/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/elixir/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/docker/index.html.md # Source: https://www.clever.cloud/developers/doc/applications/dotnet/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/zone-migration/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/cache/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/tcp-redirections/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/ssh-clever-tools/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/service-dependencies/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/network/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/log-management/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/ssl/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/encryption-at-rest/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/domain-names/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/database-migration/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/cron/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/clamav/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/scalability/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/apps-management/index.html.md # Source: https://www.clever.cloud/developers/doc/administrate/activity/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/redis/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/postgresql/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/otoroshi/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/mysql/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/mongodb/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/metabase/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/matomo/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/materia-ts/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/materia-kv/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/mailpace/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/kms/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/keycloak/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/jenkins/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/heptapod/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/fs-bucket/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/elastic/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/couchbase/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/config-provider/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/cellar/index.html.md # Source: https://www.clever.cloud/developers/doc/addons/pulsar/index.html.md # Source: https://www.clever.cloud/developers/api/howto/index.html.md # Source: https://www.clever.cloud/developers/api/v4/index.html.md Clever Cloud provides a public REST API used by its own services and customers, known as [`/v2`](/developers/api/v2/). As our platform evolves, we’re progressively moving to `/v4` endpoints, adding functionalities, with a more modern approach: ``` https://api.clever-cloud.com/v4/ ``` While the documentation moves towards completion, this page presents the most useful endpoints and example requests available now. ℹ️ Each query response contains a `Sozu-Id`. If you need help from our support team, it can help to provide it. ## Billing[](#billing) - `/v4/billing/organisations/{orgid}/invoices` - `/v4/billing/organisations/{orgid}/invoices/{invoiceid}` - `/v4/billing/organisations/{orgid}/invoices/{invoiceid}.html` - `/v4/billing/organisations/{orgid}/invoices/{invoiceid}.pdf` - Type: `GET` You can use optional parameters to filter it: | Parameter | Type | Comment | |-----------|----------|--------------------| | `limit` | `int` | | | `since` | `string` | ISO 8601 formatted | | `until` | `string` | ISO 8601 formatted | Example response, for each invoice: ```bash [ { "invoice_number": "", "kind": "", "owner_id": "", "address": { "address_id": "", "owner_id": "", "name": "", "company": "", "address": "", "city": "", "zipcode": "", "country_alpha2": "", "vat_number": "", "vat_percent": float, "customer_cost_center": "", "customer_purchase_order": "" }, "emission_date": "", "pay_date": "", "status": "", "currency": "", "price_factor": float, "discount": float, "vat_percent": float, "total_tax_excluded": { "currency": "", "amount": float, "amount_formatted": "", "default_display": "" }, "total_tax": { "currency": "", "amount": float, "amount_formatted": "", "default_display": "" }, "category": "", "payment_provider": "", "transaction_id": "", "customer_order_id": "" }, {…} ] ``` ## Deployments[](#deployments) - `/v4/orchestration/organisations/{ownerId}/applications/{applicationId}/deployments` - `/v4/orchestration/organisations/{ownerId}/applications/{applicationId}/deployments/{deploymentId}` - Type: `GET` Example response, for each deployment: ```bash [ { "id": "", "ownerId": "", "applicationId": "", "startDate": "", "state": "", "steps": [ { "state": "", "date": "" }, { "state": "", "date": "" }, { "state": "", "date": "" } ], "version": { "commitId": "" }, "origin": { "action": "", "cause": "", "source": "", "authorId": "", "constraints": [ "" ], "priority": "" }, "hasDedicatedBuild": boolean }, {…} ] ``` ## Instances[](#instances) - `/v4/orchestration/organisations/{ownerId}/applications/{applicationId}/instances` - Type: `GET` You can use optional parameters to filter it: | Parameter | Type | Comment | |------------------|-----------|--------------------------| | `deploymentId` | `string` | | | `limit` | `int` | | | `excludeDeleted` | `boolean` | | | `since` | `string` | ISO 8601 formatted | | `until` | `string` | ISO 8601 formatted | | `order` | `string` | `ASC` or `DESC` | | `includeState` | `string` | case sensitive, repeated | | `excludeState` | `string` | case sensitive, repeated | Example response, for each instance: ```bash [ { "id": "", "ownerId": "", "applicationId": "", "deploymentId": "", "name": "", "flavor": "", "index": int, "state": "", "creationDate": "", "deletionDate": "", "network": { "ip": "", "port": int }, "isBuildVm": boolean }, {…} ] ``` ## Load Balancers[](#load-balancers) - `/v4/load-balancers/organisations/{ownerId}/applications/{applicationId}/load-balancers/default` - Type: `GET` Example response: ```bash [ { "id": "", "name": "", "zoneId": "", "dns": { "cname": "", "a": [] } } ] ``` ## Logs[](#logs) ### Get logs stream[](#get-logs-stream) - `/v4/logs/organisations/{ownerId}/applications/{applicationId}/logs` - Type: `GET` Answers with logs in a SSE (Server-Sent Events) stream. You can use optional parameters to filter it: | Parameter | Type | Comment | |-----------------------------|----------|--------------------------------------------------------------------------------| | `deploymentId` | `string` | | | `instanceId` | `string` | | | `since` | `string` | ISO 8601 formatted | | `until` | `string` | ISO 8601 formatted | | `field` | `string` | Allow to get only asked fields, repeated | | `filter` | `string` | Case insensitive `contains` type search | | `limit` | `int64` | Minimum: `1` | | `service` | `string` | systemd service name, repeated (default: `bas` and `bas-deploy`, can be `all`) | | `throttleElements` | `int` | Maximum elements read per `throttlePerInMilliseconds`, default `100` | | `throttlePerInMilliseconds` | `long` | Default `300` | ### Create a logs drain[](#create-a-logs-drain) - `/v4/drains/organisations/{ownerId}/applications/{applicationId}/drains` - Type: `POST` ```json { "kind": "ACCESSLOG|LOG", "recipient": { "url": "", "type":"" // Optional parameters, depending on recipient_type } } ``` | Parameter | Type | Comment | |-----------------------------------|----------|------------------------------------------------------------------------------------------------------| | `type` | `string` | `DatadogRecipient`, `ElasticsearchRecipient`, `NewRelicRecipient`, `OVHTCPRecipient`, `RawRecipient` | | `username` | `string` | Basic Auth username | | `password` | `string` | Basic Auth password | | `index` | `string` | ElasticSearch index | | `apiKey` | `string` | NewRelic API key | | `token` | `string` | OVHcloud token | | `rfc5424StructuredDataParameters` | `string` | OVHcloud RFC 5424 structured data parameters | ### List logs drains[](#list-logs-drains) - `/v4/drains/organisations/{ownerId}/applications/{applicationId}/drains` - Type: `GET` ### Manage a logs drain[](#manage-a-logs-drain) - `/v4/drains/organisations/{ownerId}/applications/{applicationId}/drains/{drainId}` - Type: `GET`/`DELETE` ## Operators[](#operators) A Clever Cloud Operator deploys and manage resources for a given service. Available operators are: `keycloak`, `matomo`, `metabase`, `otoroshi`. - `/v4/addon-providers/addon-{operator_name}/addons/{operator_id}` - Type: `GET` Example response: ```bash { "resourceId": "real_id", "addonId": "addon_id", "name": "resource_name", "ownerId": "user_or_org_id", "plan": "PLAN_NAME", "version": "x.y.z", "javaVersion": "X", # Optional "phpVersion": "X", # Optional "accessUrl": "https://service-web-ui-id.services.clever-cloud.com", "initialCredentials": { # Optional "user": "user_name", "password": "user_password" }, "api": { # Optional "url": "https://service-api-id.services.clever-cloud.com", … }, "availableVersions": [ "x.y.z", … ], "resources": { "entrypoint": "app_id", … }, "features": { … } } ``` - `/v4/addon-providers/addon-{operator_name}/addons/{operator_id}/reboot` - `/v4/addon-providers/addon-{operator_name}/addons/{operator_id}/rebuild` - Type: `POST` - Response code: `204` ### Network Groups[](#network-groups) You can add the deployed service main application in a [Network Group](/developers/doc/develop/network-groups/) to activate some enhanced features: - `keycloak`: [Secured Multi Instances feature](/developers/doc/addons/keycloak/#secured-multi-instances) - `otoroshi`: once in a Network Group, an Otoroshi instance can be used in front of Clever Cloud applications - `/v4/addon-providers/addon-{operator_name}/addons/{operator_id}/networkgroup` - Type: `POST` - Response code: `202` Response contains the full operator object with `networkGroup` feature enabled: ```bash "features": { "networkGroup": { "id": "ng_id" } } ``` - `/v4/addon-providers/addon-{operator_name}/addons/{operator_id}/networkgroup` - Type: `DELETE` - Response code: `204` If no Network Group is found, the `networkGroup` feature value is `null`: ```bash "features": { "networkGroup": null } ``` ## Products zones[](#products-zones) - `/v4/products/zones` - `/v4/products/zones/{name}` - Type: `GET` Example response, for each zone: ```bash [ { "id": "", "name": "", "country": "", "countryCode": "", "city": "", "displayName": "", "lat": float, "lon": float, "outboundIPs": [], "tags": [] }, {…} ] ``` ## Pulsar policies[](#pulsar-policies) - `/v4/addon-providers/addon-pulsar/addons/{addon-id}/storage-policies` - Type: `GET`/`PATCH` Define or get offload/retention policies of a [Pulsar add-on](/developers/doc/addons/pulsar/). Retention is how long messages are kept in the topic. Offload is how long messages are kept in the hot storage (NVMe SSD) before being moved to Cellar object storage (S3 compatible, HDD). Example query/response: ```bash { "retentionPolicies": { "sizeInMB": number, "durationInDays": number }, "offloadPolicies": { "durationInDays": number, "sizeInMB": number } } ``` A `null` value means an infinite retention or no offload.