-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #841 from gooddata/snapshot-master-69354ebc-to-rel…
…/dev [bot] Merge master/69354ebc into rel/dev
- Loading branch information
Showing
9 changed files
with
658 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
docs/content/en/latest/administration/users/create_user_api_token.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: "create_user_api_token" | ||
linkTitle: "create_user_api_token" | ||
weight: 10 | ||
no_list: true | ||
superheading: "catalog_user." | ||
--- | ||
|
||
|
||
|
||
``create_user_api_token(user_id: str, api_token_id: str)`` | ||
|
||
Create a new user api token. | ||
|
||
{{% parameters-block title="Parameters"%}} | ||
{{< parameter p_name="user_id" p_type="string" >}} | ||
User identification string. e.g. "admin" | ||
{{< /parameter >}} | ||
{{< parameter p_name="api_token_id" p_type="string" >}} | ||
API token identification string. e.g. "admin_token" | ||
{{< /parameter >}} | ||
{{% /parameters-block %}} | ||
|
||
{{% parameters-block title="Returns" %}} | ||
{{< parameter p_type="CatalogApiToken" >}} | ||
Instance of CatalogApiToken holding the information about API token (its id, and bearer token). | ||
{{< /parameter >}} | ||
{{% /parameters-block %}} | ||
|
||
## Example | ||
|
||
```python | ||
sdk.catalog_user.create_user_api_token(user_id="admin", api_token_id="admin_token") | ||
``` |
31 changes: 31 additions & 0 deletions
31
docs/content/en/latest/administration/users/delete_user_api_token.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: "delete_user_api_token" | ||
linkTitle: "delete_user_api_token" | ||
weight: 10 | ||
no_list: true | ||
superheading: "catalog_user." | ||
--- | ||
|
||
|
||
|
||
``delete_user_api_token(user_id: str, api_token_id: str)`` | ||
|
||
Delete user api token. | ||
|
||
{{% parameters-block title="Parameters"%}} | ||
{{< parameter p_name="user_id" p_type="string" >}} | ||
User identification string. e.g. "admin" | ||
{{< /parameter >}} | ||
{{< parameter p_name="api_token_id" p_type="string" >}} | ||
API token identification string. e.g. "admin_token" | ||
{{< /parameter >}} | ||
{{% /parameters-block %}} | ||
|
||
{{% parameters-block title="Returns" None="yes" %}} | ||
{{% /parameters-block %}} | ||
|
||
## Example | ||
|
||
```python | ||
sdk.catalog_user.delete_user_api_token(user_id="admin", api_token_id="admin_token") | ||
``` |
34 changes: 34 additions & 0 deletions
34
docs/content/en/latest/administration/users/get_user_api_token.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: "get_user_api_token" | ||
linkTitle: "get_user_api_token" | ||
weight: 10 | ||
no_list: true | ||
superheading: "catalog_user." | ||
--- | ||
|
||
|
||
|
||
``get_user_api_token(user_id: str, api_token_id: str)`` | ||
|
||
Get user api token. | ||
|
||
{{% parameters-block title="Parameters"%}} | ||
{{< parameter p_name="user_id" p_type="string" >}} | ||
User identification string. e.g. "admin" | ||
{{< /parameter >}} | ||
{{< parameter p_name="api_token_id" p_type="string" >}} | ||
API token identification string. e.g. "admin_token" | ||
{{< /parameter >}} | ||
{{% /parameters-block %}} | ||
|
||
{{% parameters-block title="Returns" %}} | ||
{{< parameter p_type="CatalogApiToken" >}} | ||
Instance of CatalogApiToken holding the information about API token. | ||
Note that the bearer token is not returned. It will always be None. | ||
{{< /parameter >}} | ||
{{% /parameters-block %}} | ||
## Example | ||
|
||
```python | ||
sdk.catalog_user.get_user_api_token(user_id="admin", api_token_id="admin_token") | ||
``` |
32 changes: 32 additions & 0 deletions
32
docs/content/en/latest/administration/users/list_user_api_tokens.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: "list_user_api_tokens" | ||
linkTitle: "list_user_api_tokens" | ||
weight: 10 | ||
no_list: true | ||
superheading: "catalog_user." | ||
--- | ||
|
||
|
||
|
||
``list_user_api_tokens(user_id: str)`` | ||
|
||
List all user API tokens. | ||
|
||
{{% parameters-block title="Parameters"%}} | ||
{{< parameter p_name="user_id" p_type="string" >}} | ||
User identification string. e.g. "admin" | ||
{{< /parameter >}} | ||
{{% /parameters-block %}} | ||
|
||
{{% parameters-block title="Returns" %}} | ||
{{< parameter p_type="list[CatalogApiToken]" >}} | ||
List of CatalogApiToken instances holding the information about users API tokens. | ||
Note that the bearer token is not returned. It will always be None. | ||
{{< /parameter >}} | ||
{{% /parameters-block %}} | ||
|
||
## Example | ||
|
||
```python | ||
sdk.catalog_user.list_user_api_tokens(user_id="admin") | ||
``` |
12 changes: 12 additions & 0 deletions
12
gooddata-sdk/gooddata_sdk/catalog/user/entity_model/api_token.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# (C) 2024 GoodData Corporation | ||
from typing import Optional | ||
|
||
from attrs import define | ||
|
||
from gooddata_sdk.catalog.base import Base | ||
|
||
|
||
@define(auto_attribs=True, kw_only=True) | ||
class CatalogApiToken(Base): | ||
id: str | ||
bearer_token: Optional[str] = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.