Profile v4.119.0
Profile View
Returns information about the current User. This can be used to see who is acting in applications where more than one token is managed. For example, in third-party OAuth applications.
This endpoint is always accessible, no matter what OAuth scopes the acting token has.
Authorizations
personalAccessToken | |
oauth |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile
linode-cli profile view
Response Samples
{
"authentication_type": "password",
"authorized_keys": [
null
],
"email": "example-user@gmail.com",
"email_notifications": true,
"ip_whitelist_enabled": false,
"lish_auth_method": "keys_only",
"referrals": {
"code": "871be32f49c1411b14f29f618aaf0c14637fb8d3",
"completed": 0,
"credit": 0,
"pending": 0,
"total": 0,
"url": "https://www.linode.com/?r=871be32f49c1411b14f29f618aaf0c14637fb8d3"
},
"restricted": false,
"timezone": "US/Eastern",
"two_factor_auth": true,
"uid": 1234,
"username": "exampleUser"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
authentication_type | string Enum:
password
github This account’s Cloud Manager authentication type. Authentication types are chosen through Cloud Manager and authorized when logging into your account. These authentication types are either the user’s password (in conjunction with their username), or the name of their indentity provider such as GitHub. For example, if a user:
Note: This functionality may not yet be available in Cloud Manager. See the Cloud Manager Changelog for the latest updates. | ||||||||||||
authorized_keys Nullable | array of strings The list of SSH Keys authorized to use Lish for your User. This value is ignored if | ||||||||||||
email | string <email> Your email address. This address will be used for communication with Linode as necessary. | ||||||||||||
email_notifications | boolean If true, you will receive email notifications about account activity. If false, you may still receive business-critical communications through email. | ||||||||||||
ip_whitelist_enabled | boolean If true, logins for your User will only be allowed from whitelisted IPs. This setting is currently deprecated, and cannot be enabled. If you disable this setting, you will not be able to re-enable it. | ||||||||||||
lish_auth_method | string Enum:
password_keys
keys_only
disabled The authentication methods that are allowed when connecting to the Linode Shell (Lish).
| ||||||||||||
referrals | object Information about your status in our referral program. This information becomes accessible after this Profile’s Account has established at least $25.00 USD of total payments.
| ||||||||||||
restricted | boolean If true, your User has restrictions on what can be accessed on your Account. To get details on what entities/actions you can access/perform, see /profile/grants. | ||||||||||||
timezone | string The timezone you prefer to see times in. This is not used by the API directly. It is provided for the benefit of clients such as the Linode Cloud Manager and other clients built on the API. All times returned by the API are in UTC. | ||||||||||||
two_factor_auth | boolean If true, logins from untrusted computers will require Two Factor Authentication. See /profile/tfa-enable to enable Two Factor Authentication. | ||||||||||||
uid | integer Your unique ID in our system. This value will never change, and can safely be used to identify your User. | ||||||||||||
username | string Your username, used for logging in to our system. |
errors | array of objects
|
Profile Update
Update information in your Profile. This endpoint requires the “account:read_write” OAuth Scope.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Request Body Schema
authorized_keys Nullable | array of strings The list of SSH Keys authorized to use Lish for your User. This value is ignored if |
email | string <email> Your email address. This address will be used for communication with Linode as necessary. |
email_notifications | boolean If true, you will receive email notifications about account activity. If false, you may still receive business-critical communications through email. |
ip_whitelist_enabled | boolean If true, logins for your User will only be allowed from whitelisted IPs. This setting is currently deprecated, and cannot be enabled. If you disable this setting, you will not be able to re-enable it. |
lish_auth_method | string Enum:
password_keys
keys_only
disabled The authentication methods that are allowed when connecting to the Linode Shell (Lish).
|
restricted | boolean If true, your User has restrictions on what can be accessed on your Account. To get details on what entities/actions you can access/perform, see /profile/grants. |
timezone | string The timezone you prefer to see times in. This is not used by the API directly. It is provided for the benefit of clients such as the Linode Cloud Manager and other clients built on the API. All times returned by the API are in UTC. |
two_factor_auth | boolean If true, logins from untrusted computers will require Two Factor Authentication. See /profile/tfa-enable to enable Two Factor Authentication. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"email": "example-user@gmail.com",
"timezone": "US/Eastern",
"email_notifications": true,
"lish_auth_method": "keys_only",
"authorized_keys": null,
"two_factor_auth": true,
"restricted": false
}' \
https://api.linode.com/v4/profile
linode-cli profile update \
--email example-user@gmail.com \
--timezone US/Eastern \
--email_notifications true \
--list_auth_method keys_only \
--two_factor_auth true \
--restricted false
Response Samples
{
"authentication_type": "password",
"authorized_keys": [
null
],
"email": "example-user@gmail.com",
"email_notifications": true,
"ip_whitelist_enabled": false,
"lish_auth_method": "keys_only",
"referrals": {
"code": "871be32f49c1411b14f29f618aaf0c14637fb8d3",
"completed": 0,
"credit": 0,
"pending": 0,
"total": 0,
"url": "https://www.linode.com/?r=871be32f49c1411b14f29f618aaf0c14637fb8d3"
},
"restricted": false,
"timezone": "US/Eastern",
"two_factor_auth": true,
"uid": 1234,
"username": "exampleUser"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
authentication_type | string Enum:
password
github This account’s Cloud Manager authentication type. Authentication types are chosen through Cloud Manager and authorized when logging into your account. These authentication types are either the user’s password (in conjunction with their username), or the name of their indentity provider such as GitHub. For example, if a user:
Note: This functionality may not yet be available in Cloud Manager. See the Cloud Manager Changelog for the latest updates. | ||||||||||||
authorized_keys Nullable | array of strings The list of SSH Keys authorized to use Lish for your User. This value is ignored if | ||||||||||||
email | string <email> Your email address. This address will be used for communication with Linode as necessary. | ||||||||||||
email_notifications | boolean If true, you will receive email notifications about account activity. If false, you may still receive business-critical communications through email. | ||||||||||||
ip_whitelist_enabled | boolean If true, logins for your User will only be allowed from whitelisted IPs. This setting is currently deprecated, and cannot be enabled. If you disable this setting, you will not be able to re-enable it. | ||||||||||||
lish_auth_method | string Enum:
password_keys
keys_only
disabled The authentication methods that are allowed when connecting to the Linode Shell (Lish).
| ||||||||||||
referrals | object Information about your status in our referral program. This information becomes accessible after this Profile’s Account has established at least $25.00 USD of total payments.
| ||||||||||||
restricted | boolean If true, your User has restrictions on what can be accessed on your Account. To get details on what entities/actions you can access/perform, see /profile/grants. | ||||||||||||
timezone | string The timezone you prefer to see times in. This is not used by the API directly. It is provided for the benefit of clients such as the Linode Cloud Manager and other clients built on the API. All times returned by the API are in UTC. | ||||||||||||
two_factor_auth | boolean If true, logins from untrusted computers will require Two Factor Authentication. See /profile/tfa-enable to enable Two Factor Authentication. | ||||||||||||
uid | integer Your unique ID in our system. This value will never change, and can safely be used to identify your User. | ||||||||||||
username | string Your username, used for logging in to our system. |
errors | array of objects
|
Authorized Apps List
This is a collection of OAuth apps that you’ve given access to your Account, and includes the level of access granted.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/apps
linode-cli profile apps-list
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-15T00:01:01",
"id": 123,
"label": "example-app",
"scopes": "linodes:read_only",
"thumbnail_url": null,
"website": "example.org"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array of objects
| ||||||||||||||
page | integer The current page. | ||||||||||||||
pages | integer The total number of pages. | ||||||||||||||
results | integer The total number of results. |
errors | array of objects
|
App Access Revoke
Expires this app token. This token may no longer be used to access your Account.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Path Parameters
appId | integer RequiredThe authorized app ID to manage. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/profile/apps/123
linode-cli profile app-delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array of objects
|
Authorized App View
Returns information about a single app you’ve authorized to access your Account.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Path Parameters
appId | integer RequiredThe authorized app ID to manage. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/apps/123
linode-cli profile app-view 1234
Response Samples
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-15T00:01:01",
"id": 123,
"label": "example-app",
"scopes": "linodes:read_only",
"thumbnail_url": null,
"website": "example.org"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created Filterable | string <date-time> When this app was authorized. |
expiry Filterable Nullable | string <date-time> When the app’s access to your account expires. If |
id | integer This authorization’s ID, used for revoking access. |
label | string The name of the application you’ve authorized. |
scopes | string <oauth-scopes> The OAuth scopes this app was authorized with. This defines what parts of your Account the app is allowed to access. |
thumbnail_url | string <url> The URL at which this app’s thumbnail may be accessed. |
website | string <url> The website where you can get more information about this app. |
errors | array of objects
|
Trusted Devices List
Returns a paginated list of active TrustedDevices for your User. Browsers with an active Remember Me Session are logged into your account until the session expires or is revoked.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/devices
linode-cli profile devices-list
Response Samples
{
"data": [
{
"created": "2018-01-01T01:01:01",
"expiry": "2018-01-31T01:01:01",
"id": 123,
"last_authenticated": "2018-01-05T12:57:12",
"last_remote_addr": "12.34.56.78",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Vivaldi/2.1.1337.36\n"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array of objects
| ||||||||||||
page | integer The current page. | ||||||||||||
pages | integer The total number of pages. | ||||||||||||
results | integer The total number of results. |
errors | array of objects
|
Trusted Device Revoke
Revoke an active TrustedDevice for your User. Once a TrustedDevice is revoked, this device will have to log in again before accessing your Linode account.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Path Parameters
deviceId | integer RequiredThe ID of the TrustedDevice |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/profile/devices/123
linode-cli profile device-revoke 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array of objects
|
Trusted Device View
Returns a single active TrustedDevice for your User.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Path Parameters
deviceId | integer RequiredThe ID of the TrustedDevice |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/devices/123
linode-cli profile device-view 123
Response Samples
{
"created": "2018-01-01T01:01:01",
"expiry": "2018-01-31T01:01:01",
"id": 123,
"last_authenticated": "2018-01-05T12:57:12",
"last_remote_addr": "12.34.56.78",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Vivaldi/2.1.1337.36\n"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string <date-time> When this Remember Me session was started. This corresponds to the time of login with the “Remember Me” box checked. |
expiry | string <date-time> When this TrustedDevice session expires. Sessions typically last 30 days. |
id | integer The unique ID for this TrustedDevice |
last_authenticated | string <date-time> The last time this TrustedDevice was successfully used to authenticate to login.linode.com. |
last_remote_addr | string The last IP Address to successfully authenticate with this TrustedDevice. |
user_agent | string The User Agent of the browser that created this TrustedDevice session. |
errors | array of objects
|
Grants List
This returns a GrantsResponse describing what the acting User has been granted access to. For unrestricted users, this will return a 204 and no body because unrestricted users have access to everything without grants. This will not return information about entities you do not have access to. This endpoint is useful when writing third-party OAuth applications to see what options you should present to the acting User.
For example, if they do not have global.add_linodes
, you might not display a button to deploy a new Linode.
Any client may access this endpoint; no OAuth scopes are required.
Authorizations
personalAccessToken | |
oauth |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/grants
Response Samples
{
"domain": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"global": {
"account_access": "read_only",
"add_domains": true,
"add_firewalls": true,
"add_images": true,
"add_linodes": true,
"add_longview": true,
"add_nodebalancers": true,
"add_stackscripts": true,
"add_volumes": true,
"cancel_account": false,
"longview_subscription": true
},
"image": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"linode": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"longview": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"nodebalancer": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"stackscript": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"volume": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
]
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
domain | array of objects The grants this User has pertaining to Domains on this Account. There will be one entry per Domain on the Account.
| ||||||||||||||||||||||
global | object A structure containing the Account-level grants a User has.
| ||||||||||||||||||||||
image | array of objects The grants this User has pertaining to Images on this Account. There will be one entry per Image on the Account.
| ||||||||||||||||||||||
linode | array of objects The grants this User has pertaining to Linodes on this Account. There will be one entry per Linode on the Account.
| ||||||||||||||||||||||
longview | array of objects The grants this User has pertaining to Longview Clients on this Account. There will be one entry per Longview Client on the Account.
| ||||||||||||||||||||||
nodebalancer | array of objects The grants this User has pertaining to NodeBalancers on this Account. There will be one entry per NodeBalancer on the Account.
| ||||||||||||||||||||||
stackscript | array of objects The grants this User has pertaining to StackScripts on this Account. There will be one entry per StackScript on the Account.
| ||||||||||||||||||||||
volume | array of objects The grants this User has pertaining to Volumes on this Account. There will be one entry per Volume on the Account.
|
errors | array of objects
|
Logins List
Returns a collection of successful account logins from this user during the last 90 days.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/logins
linode-cli profile logins-list
Response Samples
{
"data": [
{
"datetime": "2018-01-01T00:01:01",
"id": 1234,
"ip": "192.0.2.0",
"restricted": true,
"username": "example_user"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array of objects
| ||||||||||
page | integer The current page. | ||||||||||
pages | integer The total number of pages. | ||||||||||
results | integer The total number of results. |
errors | array of objects
|
Login View
Returns a login object displaying information about a successful account login from this user.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Path Parameters
loginId | integer RequiredThe ID of the login object to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/logins/1234
linode-cli profile login-view 1234
Response Samples
{
"datetime": "2018-01-01T00:01:01",
"id": 1234,
"ip": "192.0.2.0",
"restricted": true,
"username": "example_user"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
datetime | string <date-time> When the login was initiated. |
id | integer The unique ID of this login object. |
ip | string <ip> The remote IP address that requested the login. |
restricted | boolean True if the User that was logged into was a restricted User, false otherwise. |
username | string The username of the User that was logged into. |
errors | array of objects
|
User Preferences View
View a list of user preferences tied to the OAuth client that generated the token making the request. The user preferences endpoints allow consumers of the API to store arbitrary JSON data, such as a user’s font size preference or preferred display name. User preferences are available for each OAuth client registered to your account, and as such an account can have multiple user preferences.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X GET \
https://api.linode.com/v4/profile/preferences
Response Samples
{
"key1": "value1",
"key2": "value2"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
A dictionary of user preferences.
errors | array of objects
|
User Preferences Update
Updates a user’s preferences. These preferences are tied to the OAuth client that generated the token making the request. The user preferences endpoints allow consumers of the API to store arbitrary JSON data, such as a user’s font size preference or preferred display name. An account may have multiple preferences. Preferences, and the pertaining request body, may contain any arbitrary JSON data that the user would like to store.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Request Body Schema
Arbitrary JSON of your choosing.
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"key1": "value1",
"key1": "value2"
}' \
https://api.linode.com/v4/profile/preferences
Response Samples
{
"key1": "value1",
"key2": "value2"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
An object of user preferences.
errors | array of objects
|
SSH Keys List
Returns a collection of SSH Keys you’ve added to your Profile.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/sshkeys
linode-cli sshkeys list
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"id": 42,
"label": "My SSH Key",
"ssh_key": null
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array of objects
| ||||||||
page | integer The current page. | ||||||||
pages | integer The total number of pages. | ||||||||
results | integer The total number of results. |
errors | array of objects
|
SSH Key Add
Adds an SSH Key to your Account profile.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Request Body Schema
label | string
1..64
charactersA label for the key. |
ssh_key | string <ssh-key> The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "My SSH Key"
"ssh_key": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
}' \
https://api.linode.com/v4/profile/sshkeys
linode-cli sshkeys create \
--label "My SSH Key"
--ssh_key "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 42,
"label": "My SSH Key",
"ssh_key": null
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string <date-time> The date this key was added. |
id | integer The unique identifier of an SSH Key object. |
label | string
<= 64
charactersA label for the SSH Key. |
ssh_key | string <ssh-key> The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy. |
errors | array of objects
|
SSH Key Delete
Deletes an SSH Key you have access to.
Note: deleting an SSH Key will not remove it from any Linode or Disk that was deployed with authorized_keys
. In those cases, the keys must be manually deleted on the Linode or Disk. This endpoint will only delete the key’s association from your Profile.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Path Parameters
sshKeyId | integer RequiredThe ID of the SSHKey |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authoriztion: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/profile/sshkeys/42
linode-cli sshkey delete 42
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array of objects
|
SSH Key View
Returns a single SSH Key object identified by id
that you have access to view.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Path Parameters
sshKeyId | integer RequiredThe ID of the SSHKey |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/sshkeys/42
linode-cli sshkeys view 42
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 42,
"label": "My SSH Key",
"ssh_key": null
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string <date-time> The date this key was added. |
id | integer The unique identifier of an SSH Key object. |
label | string
<= 64
charactersA label for the SSH Key. |
ssh_key | string <ssh-key> The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy. |
errors | array of objects
|
SSH Key Update
Updates an SSH Key that you have permission to read_write
.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Path Parameters
sshKeyId | integer RequiredThe ID of the SSHKey |
Request Body Schema
label | string
<= 64
charactersA label for the SSH Key. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "my laptop"
}' \
https://api.linode.com/v4/profile/sshkey/42
linode-cli sshkey update 42 \
--label "my laptop"
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 42,
"label": "My SSH Key",
"ssh_key": null
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string <date-time> The date this key was added. |
id | integer The unique identifier of an SSH Key object. |
label | string
<= 64
charactersA label for the SSH Key. |
ssh_key | string <ssh-key> The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy. |
errors | array of objects
|
Two Factor Authentication Disable
Disables Two Factor Authentication for your User. Once successful, login attempts from untrusted computers will only require a password before being successful. This is less secure, and is discouraged.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/profile/tfa-disable
linode-cli profile tfa-disable
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array of objects
|
Two Factor Secret Create
Generates a Two Factor secret for your User. TFA will not be enabled until you have successfully confirmed the code you were given with tfa-enable-confirm (see below). Once enabled, logins from untrusted computers will be required to provide a TFA code before they are successful.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/profile/tfa-enable
linode-cli profile tfa-enable
Response Samples
{
"expiry": "2018-03-01T00:01:01",
"secret": "5FXX6KLACOC33GTC"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
expiry | string <date-time> When this Two Factor secret expires. |
secret | string Your Two Factor secret. This is used to generate time-based two factor codes required for logging in. Doing this will be required to confirm TFA an actually enable it. |
errors | array of objects
|
Two Factor Authentication Confirm/Enable
Confirms that you can successfully generate Two Factor codes and enables TFA on your Account. Once this is complete, login attempts from untrusted computers will be required to provide a Two Factor code before they are successful.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Request Body Schema
tfa_code | string The Two Factor code you generated with your Two Factor secret. These codes are time-based, so be sure it is current. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"tfa_code": "213456"
}' \
https://api.linode.com/v4/profile/tfa-enable-confirm
linode-cli profile tfa-confirm \
--tfa_code 213456
Response Samples
{
"scratch": "sample two factor scratch"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
scratch | string A one-use code that can be used in place of your Two Factor code, in case you are unable to generate one. Keep this in a safe place to avoid being locked out of your Account. |
errors | array of objects
|
Personal Access Tokens List
Returns a paginated list of Personal Access Tokens currently active for your User.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/tokens
linode-cli profile tokens-list
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-01T13:46:32",
"id": 123,
"label": "linode-cli",
"scopes": "*",
"token": "abcdefghijklmnop"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array of objects
| ||||||||||||
page | integer The current page. | ||||||||||||
pages | integer The total number of pages. | ||||||||||||
results | integer The total number of results. |
errors | array of objects
|
Personal Access Token Create
Creates a Personal Access Token for your User. The raw token will be returned in the response, but will never be returned again afterward so be sure to take note of it. You may create a token with at most the scopes of your current token. The created token will be able to access your Account until the given expiry, or until it is revoked.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Request Body Schema
expiry | string <date-time> When this token should be valid until. If omitted, the new token will be valid until it is manually revoked. |
label Filterable | string
1..100
charactersThis token’s label. This is for display purposes only, but can be used to more easily track what you’re using each token for. |
scopes | string <oauth-scope> The scopes to create the token with. These cannot be changed after creation, and may not exceed the scopes of the acting token. If omitted, the new token will have the same scopes as the acting token. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"scopes": "*",
"expiry": "2018-01-01T13:46:32",
"label": "linode-cli"
}' \
https://api.linode.com/v4/profile/tokens
linode-cli profile token-create \
--scopes '*' \
--expiry '2018-01-01T13:46:32' \
--label linode-cli
Response Samples
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-01T13:46:32",
"id": 123,
"label": "linode-cli",
"scopes": "*",
"token": "abcdefghijklmnop"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created Filterable | string <date-time> The date and time this token was created. |
expiry | string <date-time> When this token will expire. Personal Access Tokens cannot be renewed, so after this time the token will be completely unusable and a new token will need to be generated. Tokens may be created with “null” as their expiry and will never expire unless revoked. |
id | integer This token’s unique ID, which can be used to revoke it. |
label Filterable | string
1..100
charactersThis token’s label. This is for display purposes only, but can be used to more easily track what you’re using each token for. |
scopes | string <oauth-scopes> The scopes this token was created with. These define what parts of the Account the token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with access to |
token | string The token used to access the API. When the token is created, the full token is returned here. Otherwise, only the first 16 characters are returned. |
errors | array of objects
|
Personal Access Token Revoke
Revokes a Personal Access Token. The token will be invalidated immediately, and requests using that token will fail with a 401. It is possible to revoke access to the token making the request to revoke a token, but keep in mind that doing so could lose you access to the api and require you to create a new token through some other means.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Path Parameters
tokenId | integer RequiredThe ID of the token to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/profile/tokens/123
linode-cli profile token-delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array of objects
|
Personal Access Token View
Returns a single Personal Access Token.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Path Parameters
tokenId | integer RequiredThe ID of the token to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/tokens/123
linode-cli profile token-view 123
Response Samples
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-01T13:46:32",
"id": 123,
"label": "linode-cli",
"scopes": "*",
"token": "abcdefghijklmnop"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created Filterable | string <date-time> The date and time this token was created. |
expiry | string <date-time> When this token will expire. Personal Access Tokens cannot be renewed, so after this time the token will be completely unusable and a new token will need to be generated. Tokens may be created with “null” as their expiry and will never expire unless revoked. |
id | integer This token’s unique ID, which can be used to revoke it. |
label Filterable | string
1..100
charactersThis token’s label. This is for display purposes only, but can be used to more easily track what you’re using each token for. |
scopes | string <oauth-scopes> The scopes this token was created with. These define what parts of the Account the token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with access to |
token | string The token used to access the API. When the token is created, the full token is returned here. Otherwise, only the first 16 characters are returned. |
errors | array of objects
|
Personal Access Token Update
Updates a Personal Access Token.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Path Parameters
tokenId | integer RequiredThe ID of the token to access. |
Request Body Schema
label Filterable | string
1..100
charactersThis token’s label. This is for display purposes only, but can be used to more easily track what you’re using each token for. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "linode-cli"
}' \
https://api.linode.com/v4/profile/tokens/123
linode-cli profile token-update 123 \
--label linode-cli
Response Samples
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-01T13:46:32",
"id": 123,
"label": "linode-cli",
"scopes": "*",
"token": "abcdefghijklmnop"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created Filterable | string <date-time> The date and time this token was created. |
expiry | string <date-time> When this token will expire. Personal Access Tokens cannot be renewed, so after this time the token will be completely unusable and a new token will need to be generated. Tokens may be created with “null” as their expiry and will never expire unless revoked. |
id | integer This token’s unique ID, which can be used to revoke it. |
label Filterable | string
1..100
charactersThis token’s label. This is for display purposes only, but can be used to more easily track what you’re using each token for. |
scopes | string <oauth-scopes> The scopes this token was created with. These define what parts of the Account the token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with access to |
token | string The token used to access the API. When the token is created, the full token is returned here. Otherwise, only the first 16 characters are returned. |
errors | array of objects
|