Merge branch '20750-sharing-token-scopes'
[arvados.git] / doc / api / methods / api_client_authorizations.html.textile.liquid
1 ---
2 layout: default
3 navsection: api
4 navmenu: API Methods
5 title: "api_client_authorizations"
6
7 ...
8 {% comment %}
9 Copyright (C) The Arvados Authors. All rights reserved.
10
11 SPDX-License-Identifier: CC-BY-SA-3.0
12 {% endcomment %}
13
14 API endpoint base: @https://{{ site.arvados_api_host }}/arvados/v1/api_client_authorizations@
15
16 Object type: @gj3su@
17
18 Example UUID: @zzzzz-gj3su-0123456789abcde@
19
20 h2. Resource
21
22 The @api_client_authorizations@ resource stores the API tokens that have been issued to permit access the API server.
23
24 An ApiClientAuthorization is *not* a generic Arvados resource.  The full list of properties that belong to an ApiClientAuthorization is:
25
26 table(table table-bordered table-condensed).
27 |_. Attribute|_. Type|_. Description|_. Example|
28 |uuid|string|An identifier used to refer to the token without exposing the actual token.||
29 |api_token|string|The actual token string that is expected in the Authorization header.||
30 |api_client_id|integer|-||
31 |user_id|integer|-||
32 |created_by_ip_address|string|-||
33 |last_used_by_ip_address|string|The network address of the most recent client using this token.||
34 |last_used_at|datetime|Timestamp of the most recent request using this token.||
35 |expires_at|datetime|Time at which the token is no longer valid.  May be set to a time in the past in order to immediately expire a token.||
36 |owner_uuid|string|The user associated with the token.  All operations using this token are checked against the permissions of this user.||
37 |scopes|array|A list of resources this token is allowed to access.  A scope of ["all"] allows all resources.  See "API Authorization":{{site.baseurl}}/api/tokens.html#scopes for details.||
38
39 h2. Methods
40
41 See "Common resource methods":{{site.baseurl}}/api/methods.html for more information about @create@, @delete@, @get@, @list@, and @update@.
42
43 Required arguments are displayed in %{background:#ccffcc}green%.
44
45 h3(#create). create
46
47 Create a new ApiClientAuthorization.
48
49 Regular users may only create self-owned API tokens, but may provide a restricted "scope":{{site.baseurl}}/api/tokens.html#scopes .  Administrators may create API tokens corresponding to any user.
50
51 Arguments:
52
53 table(table table-bordered table-condensed).
54 |_. Argument |_. Type |_. Description |_. Location |_. Example |
55 |api_client_authorization|object||query||
56
57 h3. create_system_auth
58
59 create_system_auth api_client_authorizations
60
61 Arguments:
62
63 table(table table-bordered table-condensed).
64 |_. Argument |_. Type |_. Description |_. Location |_. Example |
65 |api_client_id|integer||query||
66 |scopes|array||query||
67
68 h3(#current). current
69
70 Return the full record associated with the provided API token. This endpoint is often used to check the validity of a given token.
71
72 Arguments:
73
74 table(table table-bordered table-condensed).
75 |_. Argument |_. Type |_. Description |_. Location |_. Example |
76
77 h3. delete
78
79 Delete an existing ApiClientAuthorization.
80
81 Arguments:
82
83 table(table table-bordered table-condensed).
84 |_. Argument |_. Type |_. Description |_. Location |_. Example |
85 {background:#ccffcc}.|uuid|string|The UUID of the ApiClientAuthorization in question.|path||
86
87 h3. get
88
89 Gets an ApiClientAuthorization's metadata by UUID.
90
91 Arguments:
92
93 table(table table-bordered table-condensed).
94 |_. Argument |_. Type |_. Description |_. Location |_. Example |
95 {background:#ccffcc}.|uuid|string|The UUID of the ApiClientAuthorization in question.|path||
96
97 h3. list
98
99 List api_client_authorizations.
100
101 See "common resource list method.":{{site.baseurl}}/api/methods.html#index
102
103 h3. update
104
105 Update attributes of an existing ApiClientAuthorization.
106
107 Arguments:
108
109 table(table table-bordered table-condensed).
110 |_. Argument |_. Type |_. Description |_. Location |_. Example |
111 {background:#ccffcc}.|uuid|string|The UUID of the ApiClientAuthorization in question.|path||
112 |api_client_authorization|object||query||