node-red-contrib-linode
Version:
Use Linode API to provides the ability to programmatically manage the full range of Linode products and services / Swagger with Node-Red.
1,302 lines (1,213 loc) • 784 kB
YAML
openapi: 3.0.1
info:
version: 4.102.0
title: Linode API
description: |
## Introduction
The Linode API provides the ability to programmatically manage the full
range of Linode products and services.
This reference is designed to assist application developers and system
administrators. Each endpoint includes descriptions, request syntax, and
examples using standard HTTP requests. Response data is returned in JSON
format.
This document was generated from our OpenAPI Specification. See the
<a target="_top" href="https://www.openapis.org">OpenAPI website</a> for more information.
<a target="_top" href="/docs/api/openapi.yaml">Download the Linode OpenAPI Specification</a>.
## Changelog
<a target="_top" href="https://developers.linode.com/changelog">View our Changelog</a> to see release
notes on all changes made to our API.
## Access and Authentication
Some endpoints are publicly accessible without requiring authentication.
All endpoints affecting your Account, however, require either a Personal
Access Token or OAuth authentication (when using third-party
applications).
### Personal Access Token
The easiest way to access the API is with a Personal Access Token (PAT)
generated from the
<a target="_top" href="https://cloud.linode.com/profile/tokens">Linode Cloud Manager</a> or
the [Create Personal Access Token](/docs/api/profile/#personal-access-token-create) endpoint.
All scopes for the OAuth security model ([defined below](/docs/api/profile/#oauth)) apply to this
security model as well.
#### Authentication
| Security Scheme Type: | HTTP |
|-----------------------|------|
| **HTTP Authorization Scheme** | bearer |
### OAuth
If you only need to access the Linode API for personal use,
we recommend that you create a [personal access token](/docs/api/#personal-access-token).
If you're designing an application that can authenticate with an arbitrary Linode user, then
you should use the OAuth 2.0 workflows presented in this section.
For a more detailed example of an OAuth 2.0 implementation, see our guide on [How to Create an OAuth App with the Linode Python API Library](/docs/platform/api/how-to-create-an-oauth-app-with-the-linode-python-api-library/#oauth-2-authentication-exchange).
Before you implement OAuth in your application, you first need to create an OAuth client. You can do this [with the Linode API](/docs/api/account/#oauth-client-create) or [via the Cloud Manager](https://cloud.linode.com/profile/clients):
- When creating the client, you'll supply a `label` and a `redirect_uri` (referred to as the Callback URL in the Cloud Manager).
- The response from this endpoint will give you a `client_id` and a `secret`.
- Clients can be public or private, and are private by default. You can choose to make the client public when it is created.
- A private client is used with applications which can securely store the client secret (that is, the secret returned to you when you first created the client). For example, an application running on a secured server that only the developer has access to would use a private OAuth client. This is also called a confidential client in some OAuth documentation.
- A public client is used with applications where the client secret is not guaranteed to be secure. For example, a native app running on a user's computer may not be able to keep the client secret safe, as a user could potentially inspect the source of the application. So, native apps or apps that run in a user's browser should use a public client.
- Public and private clients follow different workflows, as described below.
#### OAuth Workflow
The OAuth workflow is a series of exchanges between your third-party app and Linode. The workflow is used
to authenticate a user before an application can start making API calls on the user's behalf.
Notes:
- With respect to the diagram in [section 1.2 of RFC 6749](https://tools.ietf.org/html/rfc6749#section-1.2), login.linode.com (referred to in this section as the *login server*)
is the Resource Owner and the Authorization Server; api.linode.com (referred to here as the *api server*) is the Resource Server.
- The OAuth spec refers to the private and public workflows listed below as the [authorization code flow](https://tools.ietf.org/html/rfc6749#section-1.3.1) and [implicit flow](https://tools.ietf.org/html/rfc6749#section-1.3.2).
| PRIVATE WORKFLOW | PUBLIC WORKFLOW |
|------------------|------------------|
| 1. The user visits the application's website and is directed to login with Linode. | 1. The user visits the application's website and is directed to login with Linode. |
| 2. Your application then redirects the user to Linode's [login server](https://login.linode.com) with the client application's `client_id` and requested OAuth `scope`, which should appear in the URL of the login page. | 2. Your application then redirects the user to Linode's [login server](https://login.linode.com) with the client application's `client_id` and requested OAuth `scope`, which should appear in the URL of the login page. |
| 3. The user logs into the login server with their username and password. | 3. The user logs into the login server with their username and password. |
| 4. The login server redirects the user to the specificed redirect URL with a temporary authorization `code` (exchange code) in the URL. | 4. The login server redirects the user back to your application with an OAuth `access_token` embedded in the redirect URL's hash. This is temporary and expires in two hours. No `refresh_token` is issued. Therefore, once the `access_token` expires, a new one will need to be issued by having the user log in again. |
| 5. The application issues a POST request (*see below*) to the login server with the exchange code, `client_id`, and the client application's `client_secret`. | |
| 6. The login server responds to the client application with a new OAuth `access_token` and `refresh_token`. The `access_token` is set to expire in two hours. | |
| 7. The `refresh_token` can be used by contacting the login server with the `client_id`, `client_secret`, `grant_type`, and `refresh_token` to get a new OAuth `access_token` and `refresh_token`. The new `access_token` is good for another two hours, and the new `refresh_token`, can be used to extend the session again by this same method. | |
#### OAuth Private Workflow - Additional Details
The following information expands on steps 5 through 7 of the private workflow:
Once the user has logged into Linode and you have received an exchange code,
you will need to trade that exchange code for an `access_token` and `refresh_token`. You
do this by making an HTTP POST request to the following address:
```
https://login.linode.com/oauth/token
```
Make this request as `application/x-www-form-urlencoded` or as
`multipart/form-data` and include the following parameters in the POST body:
| PARAMETER | DESCRIPTION |
|-----------|-------------|
| grant_type | The grant type you're using for renewal. Currently only the string "refresh_token" is accepted. |
| client_id | Your app's client ID. |
| client_secret | Your app's client secret. |
| code | The code you just received from the redirect. |
You'll get a response like this:
```json
{
"scope": "linodes:read_write",
"access_token": "03d084436a6c91fbafd5c4b20c82e5056a2e9ce1635920c30dc8d81dc7a6665c"
"token_type": "bearer",
"expires_in": 7200,
}
```
Included in the reponse is an `access_token`. With this token, you can proceed to make
authenticated HTTP requests to the API by adding this header to each request:
```
Authorization: Bearer 03d084436a6c91fbafd5c4b20c82e5056a2e9ce1635920c30dc8d81dc7a6665c
```
#### OAuth Reference
| Security Scheme Type | OAuth 2.0 |
|-----------------------|--------|
| **Authorization URL** | https://login.linode.com/oauth/authorize |
| **Token URL** | https://login.linode.com/oauth/token |
| **Scopes** | <ul><li>`account:read_only` - Allows access to GET information about your Account.</li><li>`account:read_write` - Allows access to all endpoints related to your Account.</li><li>`domains:read_only` - Allows access to GET Domains on your Account.</li><li>`domains:read_write` - Allows access to all Domain endpoints.</li><li>`events:read_only` - Allows access to GET your Events.</li><li>`events:read_write` - Allows access to all endpoints related to your Events.</li><li>`firewall:read_only` - Allows access to GET information about your Firewalls.</li><li>`firewall:read_write` - Allows access to all Firewall endpoints.</li><li>`images:read_only` - Allows access to GET your Images.</li><li>`images:read_write` - Allows access to all endpoints related to your Images.</li><li>`ips:read_only` - Allows access to GET your ips.</li><li>`ips:read_write` - Allows access to all endpoints related to your ips.</li><li>`linodes:read_only` - Allows access to GET Linodes on your Account.</li><li>`linodes:read_write` - Allow access to all endpoints related to your Linodes.</li><li>`lke:read_only` - Allows access to GET LKE Clusters on your Account.</li><li>`lke:read_write` - Allows access to all endpoints related to LKE Clusters on your Account.</li><li>`longview:read_only` - Allows access to GET your Longview Clients.</li><li>`longview:read_write` - Allows access to all endpoints related to your Longview Clients.</li><li>`maintenance:read_only` - Allows access to GET information about Maintenance on your account.</li><li>`nodebalancers:read_only` - Allows access to GET NodeBalancers on your Account.</li><li>`nodebalancers:read_write` - Allows access to all NodeBalancer endpoints.</li><li>`object_storage:read_only` - Allows access to GET information related to your Object Storage.</li><li>`object_storage:read_write` - Allows access to all Object Storage endpoints.</li><li>`stackscripts:read_only` - Allows access to GET your StackScripts.</li><li>`stackscripts:read_write` - Allows access to all endpoints related to your StackScripts.</li><li>`volumes:read_only` - Allows access to GET your Volumes.</li><li>`volumes:read_write` - Allows access to all endpoints related to your Volumes.</li></ul><br/>|
## Requests
Requests must be made over HTTPS to ensure transactions are encrypted. The
following Request methods are supported:
| METHOD | USAGE |
|--------|-------|
| GET | Retrieves data about collections and individual resources. |
| POST | For collections, creates a new resource of that type. Also used to perform actions on action endpoints. |
| PUT | Updates an existing resource. |
| DELETE | Deletes a resource. This is a destructive action. |
## Responses
Actions will return one following HTTP response status codes:
| STATUS | DESCRIPTION |
|---------|-------------|
| 200 OK | The request was successful. |
| 202 Accepted | The request was successful, but processing has not been completed. The response body includes a "warnings" array containing the details of incomplete processes. |
| 204 No Content | The server successfully fulfilled the request and there is no additional content to send. |
| 400 Bad Request | You submitted an invalid request (missing parameters, etc.). |
| 401 Unauthorized | You failed to authenticate for this resource. |
| 403 Forbidden | You are authenticated, but don't have permission to do this. |
| 404 Not Found | The resource you're requesting does not exist. |
| 429 Too Many Requests | You've hit a rate limit. |
| 500 Internal Server Error | Please [open a Support Ticket](/docs/api/support/#support-ticket-open). |
## Errors
Success is indicated via <a href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes" target="_top">Standard HTTP status codes</a>.
`2xx` codes indicate success, `4xx` codes indicate a request error, and
`5xx` errors indicate a server error. A
request error might be an invalid input, a required parameter being omitted,
or a malformed request. A server error means something went wrong processing
your request. If this occurs, please
[open a Support Ticket](/docs/api/support/#support-ticket-open)
and let us know. Though errors are logged and we work quickly to resolve issues,
opening a ticket and providing us with reproducable steps and data is always helpful.
The `errors` field is an array of the things that went wrong with your request.
We will try to include as many of the problems in the response as possible,
but it's conceivable that fixing these errors and resubmitting may result in
new errors coming back once we are able to get further along in the process
of handling your request.
Within each error object, the `field` parameter will be included if the error
pertains to a specific field in the JSON you've submitted. This will be
omitted if there is no relevant field. The `reason` is a human-readable
explanation of the error, and will always be included.
## Pagination
Resource lists are always paginated. The response will look similar to this:
```json
{
"data": [ ... ],
"page": 1,
"pages": 3,
"results": 300
}
```
* Pages start at 1. You may retrieve a specific page of results by adding
`?page=x` to your URL (for example, `?page=4`). If the value of `page`
exceeds `2^64/page_size`, the last possible page will be returned.
* Page sizes default to 100,
and can be set to return between 25 and 500. Page size can be set using
`?page_size=x`.
## Filtering and Sorting
Collections are searchable by fields they include, marked in the spec as
`x-linode-filterable: true`. Filters are passed
in the `X-Filter` header and are formatted as JSON objects. Here is a request
call for Linode Types in our "standard" class:
```Shell
curl "https://api.linode.com/v4/linode/types" \
-H '
X-Filter: {
"class": "standard"
}'
```
The filter object's keys are the keys of the object you're filtering,
and the values are accepted values. You can add multiple filters by
including more than one key. For example, filtering for "standard" Linode
Types that offer one vcpu:
```Shell
curl "https://api.linode.com/v4/linode/types" \
-H '
X-Filter: {
"class": "standard",
"vcpus": 1
}'
```
In the above example, both filters are combined with an "and" operation.
However, if you wanted either Types with one vcpu or Types in our "standard"
class, you can add an operator:
```Shell
curl "https://api.linode.com/v4/linode/types" \
-H '
X-Filter: {
"+or": [
{ "vcpus": 1 },
{ "class": "standard" }
]
}'
```
Each filter in the `+or` array is its own filter object, and all conditions
in it are combined with an "and" operation as they were in the previous example.
Other operators are also available. Operators are keys of a Filter JSON
object. Their value must be of the appropriate type, and they are evaluated
as described below:
| OPERATOR | TYPE | DESCRIPTION |
|----------|--------|-----------------------------------|
| +and | array | All conditions must be true. |
| +or | array | One condition must be true. |
| +gt | number | Value must be greater than number. |
| +gte | number | Value must be greater than or equal to number. |
| +lt | number | Value must be less than number. |
| +lte | number | Value must be less than or equal to number. |
| +contains | string | Given string must be in the value. |
| +neq | string | Does not equal the value. |
| +order_by | string | Attribute to order the results by - must be filterable. |
| +order | string | Either "asc" or "desc". Defaults to "asc". Requires `+order_by`. |
For example, filtering for [Linode Types](/docs/api/linode-types/)
that offer memory equal to or higher than 61440:
```Shell
curl "https://api.linode.com/v4/linode/types" \
-H '
X-Filter: {
"memory": {
"+gte": 61440
}
}'
```
You can combine and nest operators to construct arbitrarily-complex queries.
For example, give me all [Linode Types](/docs/api/linode-types/)
which are either `standard` or `highmem` class, or
have between 12 and 20 vcpus:
```Shell
curl "https://api.linode.com/v4/linode/types" \
-H '
X-Filter: {
"+or": [
{
"+or": [
{
"class": "standard"
},
{
"class": "highmem"
}
]
},
{
"+and": [
{
"vcpus": {
"+gte": 12
}
},
{
"vcpus": {
"+lte": 20
}
}
]
}
]
}'
```
## Rate Limiting
With the Linode API, you can make up to 1,600 general API requests every two minutes per user as
determined by IP adddress or by OAuth token. Additionally, there are endpoint specfic limits defined below.
**Note:** There may be rate limiting applied at other levels outside of the API, for example, at the load balancer.
`/stats` endpoints have their own dedicated limits of 100 requests per minute per user.
These endpoints are:
* [View Linode Statistics](/docs/api/linode-instances/#linode-statistics-view)
* [View Linode Statistics (year/month)](/docs/api/linode-instances/#statistics-yearmonth-view)
* [View NodeBalancer Statistics](/docs/api/nodebalancers/#nodebalancer-statistics-view)
* [List Managed Stats](/docs/api/managed/#managed-stats-list)
Object Storage endpoints have a dedicated limit of 750 requests per second per user.
The Object Storage endpoints are:
* [Object Storage Endpoints](/docs/api/object-storage/)
Opening Support Tickets has a dedicated limit of 2 requests per minute per user.
That endpoint is:
* [Open Support Ticket](/docs/api/support/#support-ticket-open)
Accepting Service Transfers has a dedicated limit of 2 requests per minute per user.
That endpoint is:
* [Service Transfer Accept](/docs/api/account/#service-transfer-accept)
## CLI (Command Line Interface)
The <a href="https://github.com/linode/linode-cli" target="_top">Linode CLI</a> allows you to easily
work with the API using intuitive and simple syntax. It requires a
[Personal Access Token](/docs/api/#personal-access-token)
for authentication, and gives you access to all of the features and functionality
of the Linode API that are documented here with CLI examples.
Endpoints that do not have CLI examples are currently unavailable through the CLI, but
can be accessed via other methods such as Shell commands and other third-party applications.
contact:
name: Linode
url: https://linode.com
email: support@linode.com
servers:
- url: https://api.linode.com/v4
- url: https://api.linode.com/v4beta
paths:
/account:
x-linode-cli-command: account
get:
x-linode-grant: read_only
tags:
- Account
summary: Account View
description: >
Returns the contact and billing information related to
your Account.
operationId: getAccount
x-linode-cli-action: view
security:
- personalAccessToken: []
- oauth:
- account:read_only
responses:
'200':
description: Returns a single Account object.
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account
- lang: CLI
source: >
linode-cli account view
put:
x-linode-grant: read_write
tags:
- Account
summary: Account Update
description: >
Updates contact and billing information
related to your Account.
operationId: updateAccount
x-linode-cli-action: update
security:
- personalAccessToken: []
- oauth:
- account:read_write
requestBody:
description: Update contact and billing information.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
responses:
'200':
description: The updated Account.
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"address_1": "123 Main St.",
"address_2": "Suite 101",
"city": "Philadelphia",
"company": "My Company, LLC",
"country": "US",
"email": "jsmith@mycompany.com",
"first_name": "John",
"last_name": "Smith",
"phone": "555-555-1212",
"state": "PA",
"zip": 19102,
}
}' \
https://api.linode.com/v4/account
- lang: CLI
source: >
linode-cli account update \
--first_name John \
--last_name Smith
/account/cancel:
x-linode-cli-command: account
post:
x-linode-grant: read_write
tags:
- Account
summary: Account Cancel
description: >
Cancels an active Linode account. This action will cause
Linode to attempt to charge the credit card on file for the remaining
balance. An error will occur if Linode fails to charge the credit card
on file. Restricted users will not be able to cancel an account.
operationId: cancelAccount
x-linode-cli-action: cancel
security:
- personalAccessToken: []
- oauth:
- account:read_write
requestBody:
description: >
Supply a comment stating the reason that you are cancelling your account.
required: true
content:
application/json:
schema:
properties:
comments:
type: string
description: >
Any reason for cancelling the account, and any other comments
you might have about your Linode service.
example: "I'm consolidating multiple accounts into one."
responses:
'200':
description: Account cancelled
content:
application/json:
schema:
type: object
properties:
survey_link:
type: string
description: A link to Linode's exit survey.
example: {'survey_link':
'https://alinktothesurvey.com'}
'409':
description: Could not charge the credit card on file
content:
application/json:
schema:
type: object
properties:
errors:
type: array
items:
type: object
properties:
reason:
type: string
description: >
A string explaining that the account could not be cancelled
because there is an outstanding balance on the account
that must be paid first.
example: >
We were unable to charge your credit
card for services rendered. We cannot cancel
this account until the balance has been paid.
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"comments": "I am consolidating my accounts."
}' \
https://api.linode.com/v4/account/cancel
- lang: CLI
source: >
linode-cli account cancel \
--comments "I'm consolidating my accounts"
/account/credit-card:
x-linode-cli-command: account
post:
x-linode-grant: read_write
tags:
- Account
summary: Credit Card Add/Edit
description: |
**DEPRECATED**. Please use Payment Method Add ([POST /account/payment-methods](/docs/api/account/#payment-method-add)).
Adds a credit card Payment Method to your account and sets it as the default method.
operationId: createCreditCard
x-linode-cli-action: update-card
security:
- personalAccessToken: []
- oauth:
- account:read_write
requestBody:
description: Update the credit card information associated with your Account.
required: true
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/CreditCard'
responses:
'200':
description: Credit Card updated.
content:
application/json:
schema:
type: object
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"card_number": "4111111111111111",
"expiry_month": 11,
"expiry_year": 2020,
"cvv": "111"
}' \
https://api.linode.com/v4/account/credit-card
- lang: CLI
source: >
linode-cli account update-card \
--card_number 4111111111111111 \
--expiry_month 11 \
--expiry_year 2025 \
--cvv 111
/account/entity-transfers:
get:
deprecated: true
x-linode-grant: unrestricted only
parameters:
- $ref: '#/components/parameters/pageOffset'
- $ref: '#/components/parameters/pageSize'
tags:
- Account
summary: Entity Transfers List
description: >
**DEPRECATED**. Please use [Service Transfers List](/docs/api/account/#service-transfers-list).
operationId: getEntityTransfers
security:
- personalAccessToken: []
- oauth:
- account:read_only
responses:
'200':
description: >
Returns a paginated list of Entity Transfer objects containing the details of all transfers that have been
created and accepted by this account.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/EntityTransfer'
page:
$ref: '#/components/schemas/PaginationEnvelope/properties/page'
pages:
$ref: '#/components/schemas/PaginationEnvelope/properties/pages'
results:
$ref: '#/components/schemas/PaginationEnvelope/properties/results'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/entity-transfers
post:
deprecated: true
x-linode-grant: unrestricted only
tags:
- Account
summary: Entity Transfer Create
description: >
**DEPRECATED**. Please use [Service Transfer Create](/docs/api/account/#service-transfer-create).
operationId: createEntityTransfer
security:
- personalAccessToken: []
- oauth:
- account:read_write
requestBody:
description: The entities to include in this transfer request.
content:
application/json:
schema:
required:
- entities
type: object
properties:
entities:
$ref: '#/components/schemas/EntityTransfer/properties/entities'
responses:
'200':
description: >
Returns an Entity Transfer object for the request.
content:
application/json:
schema:
$ref: '#/components/schemas/EntityTransfer'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"entities": {
"linodes": [
111,
222
]
}
}' \
https://api.linode.com/v4/account/entity-transfers
/account/entity-transfers/{token}:
parameters:
- name: token
in: path
description: The UUID of the Entity Transfer.
required: true
schema:
type: string
format: uuid
get:
deprecated: true
x-linode-grant: unrestricted only
tags:
- Account
summary: Entity Transfer View
description: >
**DEPRECATED**. Please use [Service Transfer View](/docs/api/account/#service-transfer-view).
operationId: getEntityTransfer
security:
- personalAccessToken: []
- oauth:
- account:read_only
responses:
'200':
description: >
Returns an Entity Transfer object containing the details of the transfer for the specified token.
content:
application/json:
schema:
$ref: '#/components/schemas/EntityTransfer'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/entity-transfers/123E4567-E89B-12D3-A456-426614174000
delete:
deprecated: true
x-linode-grant: unrestricted only
tags:
- Account
summary: Entity Transfer Cancel
description: >
**DEPRECATED**. Please use [Service Transfer Cancel](/docs/api/account/#service-transfer-cancel).
operationId: deleteEntityTransfer
security:
- personalAccessToken: []
- oauth:
- account:read_write
responses:
'200':
description: >
Entity Transfer cancelled.
content:
application/json:
schema:
type: object
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/account/entity-transfers/123E4567-E89B-12D3-A456-426614174000
/account/entity-transfers/{token}/accept:
parameters:
- name: token
in: path
description: The UUID of the Entity Transfer.
required: true
schema:
type: string
format: uuid
post:
deprecated: true
x-linode-grant: unrestricted only
tags:
- Account
summary: Entity Transfer Accept
description: >
**DEPRECATED**. Please use [Service Transfer Accept](/docs/api/account/#service-transfer-accept).
operationId: acceptEntityTransfer
security:
- personalAccessToken: []
- oauth:
- account:read_write
responses:
'200':
description: >
Entity Transfer accepted.
content:
application/json:
schema:
type: object
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/account/entity-transfers/123E4567-E89B-12D3-A456-426614174000/accept
/account/events:
x-linode-cli-command: events
get:
x-linode-grant: read_only
parameters:
- $ref: '#/components/parameters/pageOffset'
- $ref: '#/components/parameters/pageSize'
tags:
- Account
summary: Events List
description: >
Returns a collection of Event objects representing
actions taken on your Account from the last 90 days.
The Events returned depend on your grants.
operationId: getEvents
x-linode-cli-action: list
security:
- personalAccessToken: []
- oauth:
- events:read_only
responses:
'200':
description: >
Returns a paginated lists of Event objects from
the last 90 days.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Event'
page:
$ref: '#/components/schemas/PaginationEnvelope/properties/page'
pages:
$ref: '#/components/schemas/PaginationEnvelope/properties/pages'
results:
$ref: '#/components/schemas/PaginationEnvelope/properties/results'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/events
- lang: CLI
source: >
linode-cli events list
/account/events/{eventId}:
x-linode-cli-command: events
parameters:
- name: eventId
in: path
description: The ID of the Event.
required: true
schema:
type: integer
get:
x-linode-grant: read_only
tags:
- Account
summary: Event View
description: >
Returns a single Event object.
operationId: getEvent
x-linode-cli-action: view
security:
- personalAccessToken: []
- oauth:
- events:read_only
responses:
'200':
description: An Event object
content:
application/json:
schema:
$ref: '#/components/schemas/Event'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/events/123
- lang: CLI
source: >
linode-cli events view 123
/account/events/{eventId}/read:
x-linode-cli-command: events
parameters:
- name: eventId
in: path
description: The ID of the Event to designate as read.
required: true
schema:
type: integer
post:
x-linode-grant: read_only
tags:
- Account
summary: Event Mark as Read
description: Marks a single Event as read.
operationId: eventRead
x-linode-cli-action: mark-read
security:
- personalAccessToken: []
- oauth:
- events:read_only
responses:
'200':
description: Event read.
content:
application/json:
schema:
type: object
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/account/events/123/read
- lang: CLI
source: >
linode-cli events mark-read 123
/account/events/{eventId}/seen:
x-linode-cli-command: events
parameters:
- name: eventId
in: path
description: The ID of the Event to designate as seen.
required: true
schema:
type: integer
post:
x-linode-grant: read_write
tags:
- Account
summary: Event Mark as Seen
description: >
Marks all Events up to and including this Event by ID as seen.
operationId: eventSeen
x-linode-cli-action: mark-seen
security:
- personalAccessToken: []
- oauth:
- events:read_only
responses:
'200':
description: Events seen.
content:
application/json:
schema:
type: object
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/account/events/123/seen
- lang: CLI
source: >
linode-cli events mark-seen 123
/account/invoices:
x-linode-cli-command: account
get:
x-linode-grant: read_only
parameters:
- $ref: '#/components/parameters/pageOffset'
- $ref: '#/components/parameters/pageSize'
tags:
- Account
summary: Invoices List
description: >
Returns a paginated list of Invoices against your Account.
operationId: getInvoices
x-linode-cli-action: invoices-list
security:
- personalAccessToken: []
- oauth:
- account:read_only
responses:
'200':
description: Returns a paginated list of Invoice objects.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Invoice'
page:
$ref: '#/components/schemas/PaginationEnvelope/properties/page'
pages:
$ref: '#/components/schemas/PaginationEnvelope/properties/pages'
results:
$ref: '#/components/schemas/PaginationEnvelope/properties/results'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/invoices
- lang: CLI
source: >
linode-cli account invoices-list
/account/invoices/{invoiceId}:
x-linode-cli-command: account
parameters:
- name: invoiceId
in: path
description: The ID of the Invoice.
required: true
schema:
type: integer
get:
x-linode-grant: read_only
tags:
- Account
summary: Invoice View
description: Returns a single Invoice object.
operationId: getInvoice
x-linode-cli-action: invoice-view
security:
- personalAccessToken: []
- oauth:
- account:read_only
responses:
'200':
description: An Invoice object
content:
application/json:
schema:
$ref: '#/components/schemas/Invoice'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/invoices/123
- lang: CLI
source: >
linode-cli account invoice-view 123
/account/invoices/{invoiceId}/items:
x-linode-cli-command: account
parameters:
- name: invoiceId
in: path
description: The ID of the Invoice.
required: true
schema:
type: integer
get:
x-linode-grant: read_only
parameters:
- $ref: '#/components/parameters/pageOffset'
- $ref: '#/components/parameters/pageSize'
tags:
- Account
summary: Invoice Items List
description: Returns a paginated list of Invoice items.
operationId: getInvoiceItems
x-linode-cli-action: invoice-items
security:
- personalAccessToken: []
- oauth:
- account:read_only
responses:
'200':
description: A paginated list of InvoiceItem objects
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/InvoiceItem'
page:
$ref: '#/components/schemas/PaginationEnvelope/properties/page'
pages:
$ref: '#/components/schemas/PaginationEnvelope/properties/pages'
results:
$ref: '#/components/schemas/PaginationEnvelope/properties/results'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/invoices/123/items
- lang: CLI
source: >
linode-cli account invoice-items 123
/account/logins:
x-linode-cli-command: account
get:
tags:
- Account
summary: User Logins List All
description: >
Returns a collection of successful logins for all users on the account during the last
90 days. This command can only be accessed by the unrestricted users of an account.
operationId: getAccountLogins
x-linode-cli-action: logins-list
security:
- personalAccessToken: []
- oauth:
- account:read_only
responses:
'200':
description: >
A collection of successful logins for all users on the account during the last
90 days.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Login'
page:
$ref: '#/components/schemas/PaginationEnvelope/properties/page'
pages:
$ref: '#/components/schemas/PaginationEnvelope/properties/pages'
results:
$ref: '#/components/schemas/PaginationEnvelope/properties/results'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/logins
- lang: CLI
source: >
linode-cli account logins-list
/account/logins/{loginId}:
parameters:
- name: loginId
in: path
description: The ID of the login object to access.
required: true
schema:
type: integer
x-linode-cli-command: account
get:
tags:
- Account
summary: Login View
description: >
Returns a Login object that displays information about a successful login.
The logins that can be viewed can be for any user on the account, and are not
limited to only the logins of the user that is accessing this API endpoint.
This command can only be accessed by the unrestricted users of the account.
operationId: getAccountLogin
x-linode-cli-action: login-view
security:
- personalAccessToken: []
- oauth:
- account:read_only
responses:
'200':
description: The requested login object.
content:
application/json:
schema:
$ref: '#/components/schemas/Login'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/logins/1234
- lang: CLI
source: >
linode-cli account login-view 1234
/account/maintenance:
x-linode-cli-command: account
get:
x-linode-grant: read_only
servers:
- url: https://api.linode.com/v4beta
tags:
- Account
summary: Maintenance List
description: >
Returns a collection of Maintenance objects for any entity
a user has permissions to view.
Currently, Linodes are the only entities available for viewing.
**Beta**: This endpoint is in beta. Please make sure to prepend all requests with
`/v4beta` instead of `/v4`, and be aware that this endpoint may receive breaking
updates in the future. This notice will be removed when this endpoint is out of
beta.
operationId: getMaintenance
x-linode-cli-action: maintenance-list
security:
- personalAccessToken: []
- oauth:
- maintenance:read_only
responses:
'200':
description: Returns a paginated list of Maintenance objects.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Maintenance'
page:
$ref: '#/components/schemas/PaginationEnvelope/properties/page'
pages:
$ref: '#/components/schemas/PaginationEnvelope/properties/pages'
results:
$ref: '#/components/schemas/PaginationEnvelope/properties/results'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4beta/account/maintenance
- lang: CLI
source: >
linode-cli account maintenance-list
/account/notifications:
x-linode-cli-command: account
get:
x-linode-grant: read_only
tags:
- Account
summary: Notifications List
description: >
Returns a collection of Notification objects representing
important, often time-sensitive items related to your Account.
You cannot interact directly with Notifications, and a Notification will disappear
when the circumstances causing it have been resolved. For
example, if you have an important Ticket open, you must respond to the
Ticket to dismiss the Notification.
operationId: getNotifications
x-linode-cli-action: notifications-list
security:
- personalAccessToken: []
- oauth:
- account:read_only
responses:
'200':
description: Returns a paginated list of Notification objects.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Notification'
page:
$ref: '#/components/schemas/PaginationEnvelope/properties/page'
pages:
$ref: '#/components/schemas/PaginationEnvelope/properties/pages'
results:
$ref: '#/components/schemas/PaginationEnvelope/properties/results'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/notifications
- lang: CLI
source: >
linode-cli account notifications-list
/account/oauth-clients:
x-linode-cli-command: account
get:
x-linode-grant: read_only
parameters:
- $ref: '#/components/parameters/pageOffset'
- $ref: '#/components/parameters/pageSize'
tags:
- Account
summary: OAuth Clients List
description: >
Returns a paginated list of OAuth Cl