### Beta Program Start Date Example Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/types.md Provides an example of the Beta Program start date-time format. ```json "2023-07-11T00:00:00" ``` -------------------------------- ### Label Example Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/types.md Provides an example of a string value representing the name of a Beta Program. ```json "Example Open Beta" ``` -------------------------------- ### ID Example Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/types.md Provides an example of a unique identifier for a Beta Program. ```json "example_open" ``` -------------------------------- ### Linode API v4 Overview Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/README.md This section provides an overview of the Linode API v4, including getting started guides, common patterns, and links to detailed reference documentation. ```APIDOC ## Overview and Getting Started This documentation provides a comprehensive technical reference for the Linode API v4. It is automatically generated from the OpenAPI 3.0 specification. ### Key Sections: - **index.md**: API overview, quick start guide, common patterns, and reference links. - **endpoints.md**: Complete list of all HTTP endpoints organized by category. - **types.md**: All request and response type definitions. - **configuration.md**: Details on authentication, rate limiting, pagination, and filtering. - **errors.md**: Information on error codes, response formats, and error handling best practices. ### API Reference by Resource Type: - **api-reference/**: Detailed documentation for major resource categories including Linode instances, databases, firewalls, volumes, domains, VPCs, images, buckets, account, users, network interfaces, disks, IP addresses, clusters, and tags. ``` -------------------------------- ### List Longview Types CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Use this command to list available Longview types and their associated prices. This command requires no special setup beyond having the Linode CLI installed. ```bash linode-cli longview types ``` -------------------------------- ### Is Default Payment Method Example Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/types.md Provides an example of a boolean value indicating if a Payment Method is the default for automatic charges. ```json true ``` -------------------------------- ### Setup Go Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/quick-examples.md Initialize the Linode API client in Go, setting the API token from an environment variable. ```go package main import ( "github.com/linode/linodego" "context" "os" ) func main() { token := os.Getenv("LINODE_TOKEN") client := linodego.NewClient(nil) client.SetToken(token) } ``` -------------------------------- ### Get Account Information Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/index.md Example of how to retrieve your account details using the Linode API. Requires an Authorization header with a bearer token. ```bash # Get account information curl -H "Authorization: Bearer your_token" \ https://api.linode.com/v4/account ``` -------------------------------- ### Enroll in a Beta Program via CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md This CLI command enrolls your account into a specified beta program. Use `--id` followed by the beta program's identifier, such as 'example_open'. ```bash linode-cli betas enroll --id example_open ``` -------------------------------- ### Get Node Pool CLI Example Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Use this command to retrieve a specific Node Pool by its ID. This requires read-only access to LKE resources. ```bash linode-cli lke pool-view 12345 456 ``` -------------------------------- ### Set up Python Virtual Environment Source: https://github.com/linode/linode-api-docs/blob/development/archived-readme.md Recommended steps to set up a Python 3 virtual environment for local development. Ensure you have Python 3 installed. ```bash virtualenv -p python3 venv source venv/bin/activate pip install -r requirements.txt ``` -------------------------------- ### GET /{apiVersion}/networking/firewalls/templates Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Lists available firewall templates, including those for VPC and public interfaces. These templates come with pre-configured protection rules to simplify firewall setup. ```APIDOC ## GET /{apiVersion}/networking/firewalls/templates ### Description Returns a paginated list of a firewall templates. There are firewall templates specifically for VPC interfaces and public interfaces. Firewall templates come with some protection rules already configured. ### Method GET ### Endpoint `/{apiVersion}/networking/firewalls/templates` ### Parameters #### Query Parameters - **page** (integer) - Optional - The page of a collection to return. - **page_size** (integer) - Optional - The number of items to return per page. ### Responses #### Success Response (200) - Returns a paginated list of firewall templates. #### Error Response See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ``` -------------------------------- ### Boot a Linode Instance Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/linode-instances.md Use this command to boot a Linode. If the Linode has multiple config profiles, the system will attempt to select one based on the last booted profile or a default if only one exists. ```bash linode-cli linodes boot 123 ``` -------------------------------- ### Get a Specific IP Address (CLI) Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Retrieve detailed information about a single IP address on your account. Replace the example IP with the actual IP address you want to query. ```bash linode-cli ip-view 97.107.143.141 ``` -------------------------------- ### Setup Bash/cURL Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/quick-examples.md Set up your API token and define a helper function for making API requests with cURL. ```bash export LINODE_TOKEN="your_api_token" # Example function linode_api() { curl -s -H "Authorization: Bearer $LINODE_TOKEN" \ -H "Content-Type: application/json" \ "$@" } ``` -------------------------------- ### Account Payment CLI Example Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Use the Linode CLI to create a payment. Specify the amount in USD and optionally a payment method ID. ```bash linode-cli account payment-create \ --usd 120.50 \ --payment_method_id 123 ``` -------------------------------- ### Create a Linode Instance Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/index.md Example for creating a new Linode instance. Specify the region, type, and a label for the instance. Requires POST method, Authorization header, and JSON content type. ```bash # Create a Linode instance curl -X POST https://api.linode.com/v4/linode/instances \ -H "Authorization: Bearer your_token" \ -H "Content-Type: application/json" \ -d '{ "region": "us-east", "type": "g6-standard-1", "label": "my-instance" }' ``` -------------------------------- ### GET /{apiVersion}/account/entity-transfers/{token} Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Get an entity transfer. This operation is deprecated. Please use the 'Get a service transfer request' operation instead. ```APIDOC ## GET /{apiVersion}/account/entity-transfers/{token} ### Description Get an entity transfer. This operation is deprecated. Please use the 'Get a service transfer request' operation instead. ### Method GET ### Endpoint /{apiVersion}/account/entity-transfers/{token} ### Responses #### Success Response (200) Returns an Entity Transfer object containing the details of the transfer for the specified token. #### Error Response (default) See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ### Authentication Required Yes ``` -------------------------------- ### Get Kubernetes Cluster Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/clusters.md Get a specific Cluster by ID. ```APIDOC ## GET /{apiVersion}/lke/clusters/{clusterId} ### Description Get a specific Cluster by ID. ### Method GET ### Endpoint /{apiVersion}/lke/clusters/{clusterId} ### Responses #### Success Response (200) Returns a single Kubernetes cluster. #### Error Response See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ``` -------------------------------- ### Full Stack: Create and Configure an Instance Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/quick-examples.md A bash script that automates the creation of a Linode instance, waits for it to boot, and retrieves its IP address. It requires a Linode API token as a command-line argument. ```Bash #!/bin/bash set -e LINODE_TOKEN="$1" INSTANCE_LABEL="web-server-1" REGION="us-east" TYPE="g6-standard-2" IMAGE="linode/ubuntu22.04" # Create instance INSTANCE=$(curl -s -X POST https://api.linode.com/v4/linode/instances \ -H "Authorization: Bearer $LINODE_TOKEN" \ -H "Content-Type: application/json" \ -d "{ "label": "$INSTANCE_LABEL", "region": "$REGION", "type": "$TYPE", "image": "$IMAGE" }") INSTANCE_ID=$(echo $INSTANCE | jq -r '.id') echo "Created instance: $INSTANCE_ID" # Wait for instance to boot echo "Waiting for instance to boot..." while true; do STATUS=$(curl -s -H "Authorization: Bearer $LINODE_TOKEN" \ https://api.linode.com/v4/linode/instances/$INSTANCE_ID | jq -r '.status') if [ "$STATUS" = "running" ]; then break fi echo "Status: $STATUS" sleep 5 done # Get instance IP IP=$(curl -s -H "Authorization: Bearer $LINODE_TOKEN" \ https://api.linode.com/v4/linode/instances/$INSTANCE_ID | jq -r '.ipv4[0]') echo "Instance is running at $IP" ``` -------------------------------- ### Create Linode Instance Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/quick-examples.md Provision a new Linode virtual machine. Specify image, label, region, type, and root password. ```bash # cURL curl -X POST https://api.linode.com/v4/linode/instances \ -H "Authorization: Bearer $LINODE_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "image": "linode/ubuntu22.04", "label": "my-instance", "region": "us-east", "type": "g6-standard-1", "root_pass": "your_root_password" }' ``` ```python # Python instance = client.instances.create( label="my-instance", region="us-east", type_class="standard", image="linode/ubuntu22.04", ) print(f"Created instance {instance.id}") ``` ```javascript // Node.js const response = await fetch('https://api.linode.com/v4/linode/instances', { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ label: 'my-instance', region: 'us-east', type: 'g6-standard-1', image: 'linode/ubuntu22.04' }) }); const instance = await response.json(); console.log(instance.id); ``` -------------------------------- ### Page Number Example Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/types.md Example of a page number, typically used for pagination in API responses. ```json 1 ``` -------------------------------- ### Setup JavaScript/Node.js Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/quick-examples.md Configure authorization headers for API requests in JavaScript/Node.js using an environment variable for your API token. ```javascript const token = process.env.LINODE_TOKEN; const headers = { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }; ``` -------------------------------- ### POST /{apiVersion}/linode/instances/{linodeId}/boot Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Boots a Linode you have permission to modify. It handles configuration profiles and interface settings to ensure a successful boot. ```APIDOC ## POST /{apiVersion}/linode/instances/{linodeId}/boot ### Description Boots a Linode you have permission to modify. If the Linode is using config profiles, and no parameters are given, a config profile is chosen for this boot based on the following criteria: - If there is only one config profile for this Linode, it will be used. - If there is more than one config profile, the last booted config will be used. - If there is more than one config profile and none were the last to be booted (because the Linode was never booted or the last booted config was deleted) an error will be returned. If the Linode is using Linode interfaces, where `interface_generation` is set as `linode`, an error is returned if the Linode has to boot without any interface defined. ### Method POST ### Endpoint `/{apiVersion}/linode/instances/{linodeId}/boot` ### Parameters #### Path Parameters - **apiVersion** (string) - Required - The API version. - **linodeId** (string) - Required - The ID of the Linode to boot. ### Request Body Required: No ### Response #### Success Response (200) - **message** (string) - Boot started. #### Response Example ```json { "message": "Boot started." } ``` **Authentication Required:** Yes ``` -------------------------------- ### GET /apiVersion/databases/engines/{engineId} Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Get a Managed Databases engine. Displays information for a single Managed Databases engine type and version. ```APIDOC ## GET /apiVersion/databases/engines/{engineId} ### Description Get a Managed Databases engine. Display information for a single Managed Databases engine type and version. Run the [List Managed Databases engines](https://techdocs.akamai.com/linode-api/reference/get-databases-engines) operation and store the `id` for the applicable database engine. ### Method GET ### Endpoint /apiVersion/databases/engines/{engineId} ### Parameters #### Query Parameters - **page** (integer) - Optional - The page of a collection to return. - **page_size** (integer) - Optional - The number of items to return per page. ### Responses #### Success Response (200) Returns information for a single Managed Databases engine type and version. #### Error Response (default) See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ``` -------------------------------- ### Create a Longview Client using CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Use this command to create a new Longview client. You must provide a label for the client. The output will include an install code and API key for configuration. ```bash linode-cli longview create \ --label client789 ``` -------------------------------- ### List Supported Services CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md This CLI command lists all currently supported service types for monitoring. This operation is beta and requires the 'v4beta' path in its URL. ```bash linode-cli monitor service-list ``` -------------------------------- ### GET /{apiVersion}/vpcs/{vpcId} Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Retrieves detailed information about a single VPC. This endpoint allows users to get specific details for a given VPC ID. ```APIDOC ## GET /{apiVersion}/vpcs/{vpcId} ### Description Get a VPC Get information about a single VPC. ### Method GET ### Endpoint `/{apiVersion}/vpcs/{vpcId}` ### Parameters #### Path Parameters - **vpcId** (string) - Required - The ID of the VPC to retrieve. ### Responses #### Success Response (200) - Description: A VPC object. #### Error Response - Description: See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. **Authentication Required:** Yes ``` -------------------------------- ### GET /{apiVersion}/networking/firewalls/templates/{slug} Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Gets a `vpc` or `public` firewall template you can use with Linode VPC and public interfaces. Firewall templates come with some protection rules already configured. ```APIDOC ## GET /{apiVersion}/networking/firewalls/templates/{slug} ### Description Gets a `vpc` or `public` firewall template you can use with Linode VPC and public interfaces. Firewall templates come with some protection rules already configured. ### Method GET ### Endpoint `/{apiVersion}/networking/firewalls/templates/{slug}` ### Parameters #### Query Parameters - **page** (integer) - Optional - The page of a collection to return. - **page_size** (integer) - Optional - The number of items to return per page. ### Responses #### Success Response (200) - Returns a `vpc` or `public` firewall template for interface firewalls. #### Response Example { "example": "response body" } **Authentication Required:** Yes ``` -------------------------------- ### Create a Linode Instance with CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/linode-instances.md Use this command to create a new Linode instance with specified configurations, including label, root password, region, type, and optional settings like stackscripts and authorized keys. ```bash linode-cli linodes create \ --label linode123 \ --root_pass aComplex@Password \ --booted true \ --stackscript_id 10079 \ --stackscript_data '{"gh_username": "linode"}' \ --region us-east \ --disk_encryption enabled\ --placement-group.id 528 \ --type g6-standard-2 \ --authorized-keys "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer" \ --authorized-users "myUser" \ --authorized-users "secondaryUser" \ --metadata.user_data "I2Nsb3VkLWNvbmZpZw==" \ --firewall-id 9000 ``` -------------------------------- ### Create Domain CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/domains.md Use the CLI to create a new domain. You must own the domain and point your registrar to Linode's nameservers. ```bash linode-cli domains create \ --type master \ --domain example.org \ --soa_email admin@example.org ``` -------------------------------- ### Get Object Storage Cluster Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/clusters.md Retrieves details for a specific Object Storage cluster. This endpoint is deprecated and maintained for backward compatibility. It's recommended to use the 'Get a region' endpoint instead. ```APIDOC ## GET /object-storage/clusters/{clusterId} ### Description Retrieves details for a specific Object Storage cluster. This endpoint is deprecated and maintained for backward compatibility. It's recommended to use the 'Get a region' endpoint instead. ### Method GET ### Endpoint /object-storage/clusters/{clusterId} ### Parameters #### Path Parameters - **clusterId** (string) - Required - The ID of the Object Storage cluster to retrieve. ### Response #### Success Response (200) - **clusterId** (string) - The ID of the Object Storage cluster. - **region** (string) - The region where the cluster is located. - **status** (string) - The current status of the cluster. #### Response Example ```json { "clusterId": "us-east-1", "region": "us-east-1", "status": "active" } ``` ``` -------------------------------- ### Create an OAuth Client using CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Use this command to create a new OAuth client. You must provide a label and a redirect URI. ```bash linode-cli account client-create \ --label Test_Client_1 \ --redirect_uri https://example.org/callback ``` -------------------------------- ### GET /{apiVersion}/nodebalancers/{nodeBalancerId}/configs/{configId}/nodes/{nodeId} Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Retrieves detailed information about a single NodeBalancer node. This endpoint is used to get specific details about a backend node for a configured port. ```APIDOC ## GET /{apiVersion}/nodebalancers/{nodeBalancerId}/configs/{configId}/nodes/{nodeId} ### Description Get a NodeBalancer's node Returns information about a single Node, a backend for this NodeBalancer's configured port. ### Method GET ### Endpoint /{apiVersion}/nodebalancers/{nodeBalancerId}/configs/{configId}/nodes/{nodeId} ### Parameters #### Path Parameters - **nodeBalancerId** (string) - Required - The ID of the NodeBalancer. - **configId** (string) - Required - The ID of the configuration. - **nodeId** (string) - Required - The ID of the node. ### Responses #### Success Response (200) - **node** (object) - A paginated list of NodeBalancer nodes. #### Error Response - **default** - See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ``` -------------------------------- ### List Linode Kernels via CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Use this command to list all available kernels. Consider using pagination for extensive lists. ```bash linode-cli kernels list ``` -------------------------------- ### View an Image using CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/images.md Use this command to retrieve information about a specific image, whether public or private. Public image IDs start with 'linode/', while private image IDs start with 'private/'. ```bash linode-cli images view linode/debian9 ``` -------------------------------- ### Initialize Linode Client with Environment Variable (Python) Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/best-practices.md Use the Python linode-api4 library to initialize the client by reading the API token from the LINODE_TOKEN environment variable. ```python import os from linode_api4 import LinodeClient token = os.environ['LINODE_TOKEN'] client = LinodeClient(token) ``` -------------------------------- ### GET /{apiVersion}/lke/clusters/{clusterId}/pools/{poolId} Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Retrieves details for a specific Node Pool by its ID within a Kubernetes cluster. Use this to get detailed information about a particular node pool's configuration. ```APIDOC ## GET /{apiVersion}/lke/clusters/{clusterId}/pools/{poolId} ### Description Get a node pool. Get a specific Node Pool by ID. ### Method GET ### Endpoint /{apiVersion}/lke/clusters/{clusterId}/pools/{poolId} ### Parameters #### Path Parameters - **clusterId** (string) - Required - The ID of the Kubernetes cluster. - **poolId** (string) - Required - The ID of the Node Pool to retrieve. ### Response #### Success Response (200) - **pool** (object) - The requested Node Pool object. #### Response Example { "pool": { "id": "456", "type": "ondemand", "count": 3, "node_resources": { "type": "g6-standard-2" } } } ``` -------------------------------- ### Get a Kernel Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Returns information about a single Kernel. ```APIDOC ## GET /{apiVersion}/linode/kernels/{kernelId} ### Description Returns information about a single Kernel. ### Method GET ### Endpoint /{apiVersion}/linode/kernels/{kernelId} ### Response #### Success Response (200) - A single Kernel object. #### Response Example { "example": "Kernel Object" } ``` -------------------------------- ### POST /linode/instances Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Creates a Linode Instance on your Account. Requires the 'add_linodes' grant. You can create Linodes using public or private images, cloud-init, StackScripts, backups, or by creating an empty Linode. ```APIDOC ## POST /linode/instances ### Description Creates a Linode Instance on your Account. In order for this request to complete successfully, your User must have the `add_linodes` grant. Creating a new Linode will incur a charge on your Account. ### Method POST ### Endpoint /linode/instances ### Parameters #### Request Body - **type** (string) - Required - The desired Linode Type. Run `List Linode types` to get more information. - **region** (string) - Required - The desired Region. Run `List regions` to get more information. - **image** (string) - Required if not using backups or StackScripts - The distribution or private image to use for the Linode. - **root_pass** (string) - Required if using images or StackScripts - The root password for the Linode. - **swap_size** (integer) - Optional - The size of the swap disk in MB. Defaults to 512 if not specified. - **authorized_keys** (array of strings) - Optional - A list of SSH public keys to be added to the root user's `authorized_keys` file. - **authorized_users** (array of strings) - Optional - A list of usernames for whom SSH keys should be added. These users must have an SSH Key associated with your Profile. - **stackscript_id** (integer) - Required if using StackScripts - The ID of the StackScript to use. - **backup_id** (integer) - Required if using backups - The ID of the backup to restore from. - **cloud_init** (string) - Optional - A base-64 encoded cloud-config file for automated configuration. - **tags** (array of strings) - Optional - A list of tags to apply to the Linode. - **interface_generation** (string) - Optional - Specifies the interface type ('legacy' or 'default') to use for network configuration. ### Request Example ```json { "type": "g6-nanode-1", "region": "us-east", "image": "linode/ubuntu22.04", "root_pass": "your_strong_password", "authorized_keys": ["ssh-rsa AAAAB3NzaC1yc2EAAA... user@example.com"] } ``` ### Response #### Success Response (200) - **id** (integer) - The unique ID of the newly created Linode. - **label** (string) - The user-defined label for the Linode. - **status** (string) - The current status of the Linode (e.g., "provisioning", "running"). - **created** (string) - The date and time the Linode was created. - **updated** (string) - The date and time the Linode was last updated. #### Response Example ```json { "id": 1234567, "label": "my-new-linode", "status": "provisioning", "created": "2023-10-27T10:00:00Z", "updated": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### GET /user Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/types.md Retrieves information for a specific user. ```APIDOC ## GET /user ### Description Retrieves information for a specific user. ### Method GET ### Endpoint /user ### Response #### Success Response (200) An empty object indicates success, with user details expected to be present in a real implementation. #### Response Example ```json {} ``` ``` -------------------------------- ### List Linodes using CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/linode-instances.md Use this command to list all Linodes accessible via the CLI. Ensure the Linode CLI is installed and configured. ```bash linode-cli linodes list ``` -------------------------------- ### GET /account/agreements Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Returns all agreements and their acceptance status for your account. ```APIDOC ## GET /account/agreements ### Description Returns all agreements and their acceptance status for your account. ### Method GET ### Endpoint `/{apiVersion}/account/agreements` ### Responses #### Success Response (200) The status of each acceptance agreement for your account. #### Default Error Response See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ### Authentication Required Yes ``` -------------------------------- ### Create a Domain (Python) Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/quick-examples.md Create a new domain using the client library, providing domain name, type, and SOA email. ```Python # Python domain = client.domains.create( domain="example.com", type="master", soa_email="admin@example.com" ) print(f"Created domain {domain.domain}") ``` -------------------------------- ### Get Account Information Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/index.md Retrieves information about the authenticated account. ```APIDOC ## GET /account ### Description Retrieves information about the authenticated account. ### Method GET ### Endpoint https://api.linode.com/v4/account ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -H "Authorization: Bearer your_token" https://api.linode.com/v4/account ``` ### Response #### Success Response (200) - **id** (integer) - The unique ID of the account. - **company** (string) - The company name associated with the account. - **email** (string) - The contact email address for the account. - **balance** (integer) - The current account balance in cents. - **credit_limit** (integer) - The account's credit limit in cents. - **gravatar_id** (string) - The Gravatar ID associated with the account's email. - **first_name** (string) - The first name of the account holder. - **last_name** (string) - The last name of the account holder. - **phone_number** (string) - The phone number associated with the account. - **tax_id** (string) - The tax ID of the account. - **state** (string) - The state of the account holder. - **address_1** (string) - The first line of the account holder's address. - **address_2** (string) - The second line of the account holder's address. - **city** (string) - The city of the account holder. - **zip** (string) - The zip code of the account holder. - **country** (string) - The country of the account holder. - **date_created** (datetime) - The date and time the account was created. - **capabilities** (array) - A list of capabilities enabled for this account. - **billing_history** (string) - URL to the billing history. - **payment_methods** (string) - URL to the payment methods. - **users** (string) - URL to the user management endpoint. - **logins** (string) - URL to the login history endpoint. - **notifications** (string) - URL to the notifications endpoint. - **user_defined_fields** (object) - User-defined fields for the account. #### Response Example ```json { "id": 12345, "company": "Example Corp", "email": "user@example.com", "balance": 0, "credit_limit": 100000, "gravatar_id": "a1b2c3d4e5f678901234567890abcdef", "first_name": "John", "last_name": "Doe", "phone_number": "555-555-5555", "tax_id": "12-3456789", "state": "CA", "address_1": "123 Main St", "address_2": "Apt 4B", "city": "Anytown", "zip": "90210", "country": "USA", "date_created": "2020-01-01T10:00:00", "capabilities": [ "Linode", "Block Storage" ], "billing_history": "/v4/account/billing/history", "payment_methods": "/v4/account/payment-methods", "users": "/v4/account/users", "logins": "/v4/account/logins", "notifications": "/v4/account/notifications", "user_defined_fields": {} } ``` ``` -------------------------------- ### POST /linode/instances Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/linode-instances.md Creates a new Linode instance on your account. Requires the 'add_linodes' grant. Supports creation using public/private images, cloud-init, StackScripts, backups, VLANs, or as an empty instance. ```APIDOC ## POST /linode/instances ### Description Creates a Linode Instance on your Account. Requires the `add_linodes` grant. Linodes can be created using various methods including public/private images, cloud-init, StackScripts, backups, or attached to a private VLAN. You can also create an empty Linode for advanced use cases. ### Method POST ### Endpoint /linode/instances ### Parameters #### Request Body - **type** (string) - Required - The desired Linode type (e.g., "g6-nanode-1"). Use `GET /linode/types` to list available types. - **region** (string) - Required - The desired region for the Linode (e.g., "us-east"). Use `GET /regions` to list available regions. - **image** (string) - Optional - The ID or label of the image to deploy. Required for image-based creation. - **root_pass** (string) - Optional - The root password for the Linode. Required for image-based and StackScript creation if not using SSH keys. - **authorized_keys** (array of strings) - Optional - A list of SSH public keys to install for the root user. - **authorized_users** (array of strings) - Optional - A list of usernames whose SSH keys are already associated with your profile. - **swap_size** (integer) - Optional - The size of the swap disk in MB. Defaults to 512MB if not specified and an image is used. - **stackscript_id** (integer) - Optional - The ID of a StackScript to use for deployment. - **stackscript_data** (object) - Optional - Data to pass to the StackScript. - **backup_id** (integer) - Optional - The ID of a backup to restore from. - **private_ip** (boolean) - Optional - Whether to create the Linode with a private IP address. Defaults to false. - **interfaces** (array) - Optional - Configuration for network interfaces, including VLANs. See API reference for detailed schema. - **cloud_init** (string) - Optional - A base-64 encoded cloud-config script for automated configuration. Requires a compatible image and region. - **tags** (array of strings) - Optional - A list of tags to apply to the Linode. Requires unrestricted User status. - **booted** (boolean) - Optional - Whether the Linode should be booted after creation. Defaults to true. If false, the Linode remains offline. - **label** (string) - Optional - A label for the Linode. - **interface_generation** (string) - Optional - Specifies the interface type ('default' or 'legacy'). Use 'default' to prefer Linode interfaces when available. ### Request Example ```json { "type": "g6-nanode-1", "region": "us-east", "image": "linode/ubuntu22.04", "root_pass": "your_strong_password", "authorized_keys": ["ssh-rsa AAAAB3NzaC1yc2E... user@example.com"] } ``` ### Response #### Success Response (200 OK) - **id** (integer) - The unique ID of the newly created Linode. - **label** (string) - The label of the Linode. - **type** (string) - The type of the Linode. - **region** (string) - The region where the Linode was created. - **image** (string) - The image used for the Linode. - **status** (string) - The current status of the Linode (e.g., "provisioning", "running"). - **created** (string) - The date and time the Linode was created. - **ipv4** (array of strings) - List of IPv4 addresses assigned to the Linode. - **ipv6** (object) - IPv6 addressing information. #### Response Example ```json { "id": 12345678, "label": "my-new-linode", "type": "g6-nanode-1", "region": "us-east", "image": "linode/ubuntu22.04", "status": "provisioning", "created": "2023-10-27T10:00:00Z", "ipv4": ["192.0.2.1"], "ipv6": { "range": "2001:db8::/64", "gateway": "fe80::1" } } ``` ``` -------------------------------- ### POST /beta-program Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/types.md Enrolls the account in a specified Beta Program by its ID. ```APIDOC ## POST /beta-program ### Description Enrolls the account in a specified Beta Program by its ID. ### Method POST ### Endpoint /beta-program ### Parameters #### Request Body - **id** (string) - Required - The unique identifier of the Beta Program. ### Request Example ```json { "id": "beta_program_id_string" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the Beta Program. #### Response Example ```json { "id": "beta_program_id_string" } ``` ``` -------------------------------- ### Get NodeBalancer Statistics Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Retrieves detailed statistics for a specified NodeBalancer. ```APIDOC ## GET /apiVersion/nodebalancers/{nodeBalancerId}/stats ### Description Returns detailed statistics about the requested NodeBalancer. ### Method GET ### Endpoint /apiVersion/nodebalancers/{nodeBalancerId}/stats ### Parameters #### Path Parameters - **nodeBalancerId** (string) - Required - The ID of the NodeBalancer to retrieve statistics for. ### Response #### Success Response (200) - **stats** (object) - Contains the statistics for the NodeBalancer. - **connections** (array of objects) - Connection statistics. - **timestamp** (string) - The timestamp of the statistic. - **total** (integer) - Total connections. - **active** (integer) - Active connections. - **bytes_in** (array of objects) - Bytes received statistics. - **timestamp** (string) - The timestamp of the statistic. - **value** (integer) - Bytes received. - **bytes_out** (array of objects) - Bytes sent statistics. - **timestamp** (string) - The timestamp of the statistic. - **value** (integer) - Bytes sent. #### Response Example { "stats": { "connections": [ {"timestamp": "2023-01-01T10:00:00", "total": 1000, "active": 50}, {"timestamp": "2023-01-01T10:05:00", "total": 1100, "active": 55} ], "bytes_in": [ {"timestamp": "2023-01-01T10:00:00", "value": 10485760}, {"timestamp": "2023-01-01T10:05:00", "value": 11534336} ], "bytes_out": [ {"timestamp": "2023-01-01T10:00:00", "value": 5242880}, {"timestamp": "2023-01-01T10:05:00", "value": 5767168} ] } } ``` -------------------------------- ### Import Domain CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/domains.md Use the CLI to import a domain zone from a remote nameserver. Ensure your nameserver allows zone transfers. ```bash linode-cli domains import --domain example.com --remote_nameserver examplenameserver.com ``` -------------------------------- ### Get a NodeBalancer Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Retrieves the details of a specific NodeBalancer that the user has access to. ```APIDOC ## GET /{apiVersion}/nodebalancers/{nodeBalancerId} ### Description Returns a single NodeBalancer you can access. ### Method GET ### Endpoint /{apiVersion}/nodebalancers/{nodeBalancerId} ### Parameters #### Path Parameters - **nodeBalancerId** (string) - Required - The ID of the NodeBalancer to retrieve. ### Responses #### Success Response (200) - Description: The requested NodeBalancer object. #### Error Response - Description: See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ``` -------------------------------- ### GET /account/events/{eventId} Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Retrieves a single event object by its ID. ```APIDOC ## GET /account/events/{eventId} ### Description Returns a single event object. ### Method GET ### Endpoint /{apiVersion}/account/events/{eventId} ### Response #### Success Response (200) - An Event object. #### Error Response - See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ``` -------------------------------- ### GET /{apiVersion}/vpcs Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/vpcs.md Retrieves a paginated list of all VPCs on the account. ```APIDOC ## GET /{apiVersion}/vpcs ### Description Display all VPCs on your account. ### Method GET ### Endpoint `/{apiVersion}/vpcs` ### Parameters #### Query Parameters - **page** (integer) - Optional - The page of a collection to return. - **page_size** (integer) - Optional - The number of items to return per page. ### Responses #### Success Response (200) - A paginated list of VPC objects. #### Error Response - See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ``` -------------------------------- ### List All Beta Programs via CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Execute this CLI command to retrieve a list of all active beta programs available. This command does not require any specific beta ID. ```bash linode-cli betas list ``` -------------------------------- ### Get Account Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/account.md Returns the contact and billing information related to your account. ```APIDOC ## GET /{apiVersion}/account ### Description Returns the contact and billing information related to your account. ### Method GET ### Endpoint /{apiVersion}/account ### Responses #### Success Response (200) - **account** (object) - A single account object. #### Response Example { "example": "response body" } ``` -------------------------------- ### Create Linode CLI Token with Minimal Scopes Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/best-practices.md This example demonstrates creating a Linode CLI token with specific, limited scopes for a particular task. Avoid using wildcard scopes ('*') for better security. ```bash # ✅ Good: Minimal scopes for specific task linode-cli token create \ --scopes "linodes:read_write,linodes:delete" \ --label "Instance management" # ❌ Bad: Excessive scopes linode-cli token create \ --scopes "*" \ --label "Full access" ``` -------------------------------- ### Create Linode Instance Configuration Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Use this command to add a new configuration profile to a Linode instance. Ensure you have the correct Linode ID and disk IDs. ```bash linode-cli linodes config-create 7590910 \ --label "My Config" \ --devices.sda.disk_id 123456 \ --devices.sdb.disk_id 123457 ``` -------------------------------- ### Empty Object Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/types.md An example of an API response that returns an empty object. ```APIDOC ## Empty Object The API responds with an empty object. ### Definition ```json {} ``` ``` -------------------------------- ### GET /{apiVersion}/support/tickets/{ticketId} Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Retrieves a specific support ticket under your account. ```APIDOC ## GET /{apiVersion}/support/tickets/{ticketId} ### Description Returns a specific support ticket under your account. ### Method GET ### Endpoint `/{apiVersion}/support/tickets/{ticketId}` ### Response #### Success Response (200) - Returns a single support ticket. #### Response Example { "example": "response body" } **Authentication Required:** Yes ``` -------------------------------- ### View Enrolled Beta Program via CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Use this CLI command to view a specific beta program your account is enrolled in. Replace `$betaId` with the actual beta program ID. ```bash linode-cli betas enrolled-view $betaId ``` -------------------------------- ### Get a Region Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Retrieves information about a specific Linode region using its ID. ```APIDOC ## GET /apiVersion/regions/{regionId} ### Description Returns a single Region. ### Method GET ### Endpoint /apiVersion/regions/{regionId} ### Responses #### Success Response (200) A single Region object. #### Default Response See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ``` -------------------------------- ### List All Managed Databases (CLI) Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/api-reference/databases.md Use this command to display all Managed Databases accessible to your user, regardless of engine type. For more detailed information on a particular database instance, make a request to its instance_uri. ```bash linode-cli databases list ``` -------------------------------- ### List Linode Instances Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/index.md This snippet demonstrates how to list all Linode instances associated with your account. An Authorization header is required. ```bash # List Linode instances curl -H "Authorization: Bearer your_token" \ https://api.linode.com/v4/linode/instances ``` -------------------------------- ### Get a personal access token Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Returns a single Personal Access Token. ```APIDOC ## GET /{apiVersion}/profile/tokens/{tokenId} ### Description Returns a single Personal Access Token. ### Method GET ### Endpoint `/{apiVersion}/profile/tokens/{tokenId}` ### Parameters #### Path Parameters - **tokenId** (string) - Required - The ID of the token to retrieve. ### Responses #### Success Response (200) The requested token. #### Error Response (default) See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. **Authentication Required:** Yes ``` -------------------------------- ### Get Payment Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Retrieves detailed information about a specific payment made on the Account. ```APIDOC ## GET /{apiVersion}/account/payments/{paymentId} ### Description Returns information about a specific Payment. ### Method GET ### Endpoint `/{apiVersion}/account/payments/{paymentId}` ### Parameters #### Path Parameters - **paymentId** (integer) - Required - The ID of the Payment to retrieve. ### Responses #### Success Response (200) A Payment object. #### Error Response See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ### Authentication Required Yes ``` -------------------------------- ### Create a StackScript using CLI Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md Use the Linode CLI to create a new StackScript. Specify its label, description, target images, public status, and script content. ```bash linode-cli stackscripts create \ --label a-stackscript \ --description "This StackScript install and configures MySQL" \ --images "linode/debian9" \ --images "linode/debian8" \ --is_public true \ --rev_note "Set up MySQL" \ --script '#!/bin/bash' ``` -------------------------------- ### GET /{apiVersion}/account/payment-methods/{paymentMethodId} Source: https://github.com/linode/linode-api-docs/blob/development/_autodocs/endpoints.md View the details of the specified Payment Method. ```APIDOC ## GET /{apiVersion}/account/payment-methods/{paymentMethodId} ### Description Get a payment method. View the details of the specified Payment Method. ### Method GET ### Endpoint /{apiVersion}/account/payment-methods/{paymentMethodId} ### Parameters #### Path Parameters - **paymentMethodId** (integer) - Required - The ID of the Payment Method to retrieve. ### Responses #### Success Response (200) Returns a Payment Method Object. #### Default Response See [Errors](https://techdocs.akamai.com/linode-api/reference/errors) for the range of possible error response codes. ### Authentication Required Yes ```