# API reference

> Every resource and endpoint, generated from the API contract.

Source: https://docs.clouduxe.com/api/reference/

Base URL: `https://api.clouduxe.com/v1`.

## [Account](https://docs.clouduxe.com/api/md/reference/account.md)

Your account.

- `GET /account`: Get your account

## [Catalogue](https://docs.clouduxe.com/api/md/reference/catalogue.md)

Plans at your price, and regions.

- `GET /plans`: List plans
- `GET /plans/{planId}`: Get a plan
- `GET /regions`: List regions

## [Orders](https://docs.clouduxe.com/api/md/reference/orders.md)

Ordering services, paid from wallet credit.

- `POST /orders/preview`: Preview an order
- `GET /orders`: List orders
- `POST /orders`: Create an order
- `GET /orders/{orderId}`: Get an order
- `PATCH /orders/{orderId}`: Update an order

## [Services](https://docs.clouduxe.com/api/md/reference/services.md)

Your VPS, Dedicated and proxy services.

- `GET /services`: List services
- `GET /services/{serviceId}`: Get a service
- `PATCH /services/{serviceId}`: Update a service
- `GET /services/{serviceId}/images`: List a server's OS images
- `GET /services/{serviceId}/usage`: Get a service's traffic
- `GET /services/{serviceId}/plan-options`: List plan change options

## [Server actions](https://docs.clouduxe.com/api/md/reference/server-actions.md)

Power, console, reinstall and password reset, and the actions they start.

- `POST /services/{serviceId}/power`: Run a power action
- `POST /services/{serviceId}/reinstall`: Reinstall a server
- `POST /services/{serviceId}/reset-password`: Reset a server's password
- `GET /services/{serviceId}/actions`: List a service's actions
- `GET /actions/{actionId}`: Get an action
- `GET /actions/{actionId}/secret`: Retrieve an action's secret
- `DELETE /actions/{actionId}/secret`: Delete an action's secret

## [Lifecycle](https://docs.clouduxe.com/api/md/reference/lifecycle.md)

Plan changes, cancellation and termination.

- `POST /services/{serviceId}/plan-change`: Change a service's plan
- `PUT /services/{serviceId}/cancellation`: Set cancellation at period end
- `POST /services/{serviceId}/terminate`: Terminate a service

## [Firewall](https://docs.clouduxe.com/api/md/reference/firewall.md)

A server's Shield firewall.

- `GET /services/{serviceId}/firewall`: Get a firewall
- `PUT /services/{serviceId}/firewall/protection`: Turn protection on or off
- `PUT /services/{serviceId}/firewall/default-policy`: Set the default policy
- `POST /services/{serviceId}/firewall/rules`: Add a firewall rule
- `PATCH /services/{serviceId}/firewall/rules/{ruleId}`: Update a firewall rule
- `DELETE /services/{serviceId}/firewall/rules/{ruleId}`: Delete a firewall rule
- `POST /services/{serviceId}/firewall/blocked-ips`: Block an address
- `DELETE /services/{serviceId}/firewall/blocked-ips/{ip}`: Unblock an address
- `POST /services/{serviceId}/firewall/trusted-ips`: Trust an address
- `DELETE /services/{serviceId}/firewall/trusted-ips/{ip}`: Untrust an address
- `POST /services/{serviceId}/firewall/presets`: Apply a firewall preset
- `GET /firewall-presets`: List firewall presets

## [SSH keys](https://docs.clouduxe.com/api/md/reference/ssh-keys.md)

Your SSH key library.

- `GET /ssh-keys`: List SSH keys
- `POST /ssh-keys`: Add an SSH key
- `GET /ssh-keys/{sshKeyId}`: Get an SSH key
- `PATCH /ssh-keys/{sshKeyId}`: Update an SSH key
- `DELETE /ssh-keys/{sshKeyId}`: Delete an SSH key

## [Billing](https://docs.clouduxe.com/api/md/reference/billing.md)

Invoices and wallet credit.

- `GET /invoices`: List invoices
- `GET /invoices/{invoiceId}`: Get an invoice
- `GET /invoices/{invoiceId}/pdf`: Get an invoice PDF link
- `GET /wallet`: Get your wallet
- `GET /wallet/transactions`: List wallet transactions

## [Support](https://docs.clouduxe.com/api/md/reference/support.md)

Tickets and attachments.

- `GET /support/departments`: List support departments
- `GET /tickets`: List tickets
- `POST /tickets`: Open a ticket
- `GET /tickets/{ticketId}`: Get a ticket
- `POST /tickets/{ticketId}/replies`: Reply to a ticket
- `POST /tickets/{ticketId}/close`: Close a ticket
- `POST /attachments`: Start an attachment upload
- `POST /attachments/{attachmentId}/complete`: Finish an attachment upload
- `GET /attachments/{attachmentId}`: Get an attachment

## [Webhooks](https://docs.clouduxe.com/api/md/reference/webhooks.md)

Webhook endpoints and events.

- `GET /webhook-endpoints`: List webhook endpoints
- `POST /webhook-endpoints`: Create a webhook endpoint
- `GET /webhook-endpoints/{endpointId}`: Get a webhook endpoint
- `PATCH /webhook-endpoints/{endpointId}`: Update a webhook endpoint
- `DELETE /webhook-endpoints/{endpointId}`: Delete a webhook endpoint
- `POST /webhook-endpoints/{endpointId}/rotate-secret`: Rotate a webhook secret
- `POST /webhook-endpoints/{endpointId}/test`: Send a test event
- `POST /events/{eventId}/redeliver`: Redeliver an event
- `GET /webhook-deliveries/{deliveryId}`: Get a webhook delivery
- `GET /events`: List events
- `GET /events/{eventId}`: Get an event

## [API tokens](https://docs.clouduxe.com/api/md/reference/api-tokens.md)

Tokens: list and revoke. Tokens are made in the panel, at /account/api-tokens.

- `GET /api-tokens`: List API tokens
- `GET /api-tokens/current`: Get the current token
- `GET /api-tokens/{tokenId}`: Get an API token
- `DELETE /api-tokens/{tokenId}`: Revoke an API token

## [Protection](https://docs.clouduxe.com/api/md/reference/protection.md)

A protected server's DDoS protection, read-only: status, traffic now, and its attack history.

- `GET /services/{serviceId}/protection`: Get protection status
- `GET /services/{serviceId}/protection/incidents`: List attacks
- `GET /services/{serviceId}/protection/incidents/{incidentId}`: Get an attack
