Skip to content

Commit 58bd928

Browse files
authored
Merge pull request #276 from nmelehan/account-logins-endpoints
New: /account/logins endpoints
2 parents 0507e8b + 8744761 commit 58bd928

File tree

1 file changed

+98
-5
lines changed

1 file changed

+98
-5
lines changed

openapi.yaml

Lines changed: 98 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,86 @@ paths:
877877
- lang: CLI
878878
source: >
879879
linode-cli account invoice-items 123
880+
/account/logins:
881+
x-linode-cli-command: account
882+
get:
883+
tags:
884+
- Account
885+
summary: List All User Logins
886+
description: >
887+
Returns a collection of successful logins for all users on the account during the last
888+
90 days. This command can only be accessed by the unrestricted users of an account.
889+
operationId: getAccountLogins
890+
x-linode-cli-action: logins-list
891+
security:
892+
- personalAccessToken: []
893+
- oauth:
894+
- account:read_only
895+
responses:
896+
'200':
897+
description: >
898+
A collection of successful logins for all users on the account during the last
899+
90 days.
900+
content:
901+
application/json:
902+
schema:
903+
type: object
904+
properties:
905+
data:
906+
type: array
907+
items:
908+
$ref: '#/components/schemas/Login'
909+
default:
910+
$ref: '#/components/responses/ErrorResponse'
911+
x-code-samples:
912+
- lang: Shell
913+
source: >
914+
curl -H "Authorization: Bearer $TOKEN" \
915+
https://api.linode.com/v4/account/logins
916+
- lang: CLI
917+
source: >
918+
linode-cli account logins-list
919+
/account/logins/{loginId}:
920+
parameters:
921+
- name: loginId
922+
in: path
923+
description: The ID of the login object to access.
924+
required: true
925+
schema:
926+
type: integer
927+
x-linode-cli-command: account
928+
get:
929+
tags:
930+
- Account
931+
summary: View Login
932+
description: >
933+
Returns a Login object that displays information about a successful login.
934+
The logins that can be viewed can be for any user on the account, and are not
935+
limited to only the logins of the user that is accessing this API endpoint.
936+
This command can only be accessed by the unrestricted users of the account.
937+
operationId: getAccountLogin
938+
x-linode-cli-action: login-view
939+
security:
940+
- personalAccessToken: []
941+
- oauth:
942+
- account:read_only
943+
responses:
944+
'200':
945+
description: The requested login object.
946+
content:
947+
application/json:
948+
schema:
949+
$ref: '#/components/schemas/Login'
950+
default:
951+
$ref: '#/components/responses/ErrorResponse'
952+
x-code-samples:
953+
- lang: Shell
954+
source: >
955+
curl -H "Authorization: Bearer $TOKEN" \
956+
https://api.linode.com/v4/account/logins/1234
957+
- lang: CLI
958+
source: >
959+
linode-cli account login-view 1234
880960
/account/notifications:
881961
x-linode-cli-command: account
882962
get:
@@ -11166,7 +11246,7 @@ paths:
1116611246
data:
1116711247
type: array
1116811248
items:
11169-
$ref: '#/components/schemas/Logins'
11249+
$ref: '#/components/schemas/Login'
1117011250
default:
1117111251
$ref: '#/components/responses/ErrorResponse'
1117211252
x-code-samples:
@@ -11208,7 +11288,7 @@ paths:
1120811288
content:
1120911289
application/json:
1121011290
schema:
11211-
$ref: '#/components/schemas/Logins'
11291+
$ref: '#/components/schemas/Login'
1121211292
default:
1121311293
$ref: '#/components/responses/ErrorResponse'
1121411294
x-code-samples:
@@ -16004,11 +16084,10 @@ components:
1600416084
When this Longview Client was last updated.
1600516085
example: 2018-01-01T00:01:01
1600616086
readOnly: true
16007-
Logins:
16087+
Login:
1600816088
type: object
1600916089
description: >
16010-
A collection of successful account logins from this user during the last
16011-
90 days
16090+
An object representing a previous successful login for a User.
1601216091
properties:
1601316092
id:
1601416093
type: integer
@@ -16033,6 +16112,20 @@ components:
1603316112
example: 192.0.2.0
1603416113
readOnly: true
1603516114
x-linode-cli-display: 3
16115+
username:
16116+
type: string
16117+
description: >
16118+
The username of the User that was logged into.
16119+
example: example_user
16120+
readOnly: true
16121+
x-linode-cli-display: 4
16122+
restricted:
16123+
type: boolean
16124+
description: >
16125+
True if the User that was logged into was a restricted User, false otherwise.
16126+
example: true
16127+
readOnly: true
16128+
x-linode-cli-display: 5
1603616129
LongviewSubscription:
1603716130
type: object
1603816131
description: >

0 commit comments

Comments
 (0)