graviti.openapi.user#

Interfaces about the user.

Module Contents#

Functions#

get_current_user(access_key, url)

Execute the OpenAPI GET /v2/current-user.

graviti.openapi.user.get_current_user(access_key, url)[source]#

Execute the OpenAPI GET /v2/current-user.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

Returns

The response of OpenAPI.

Return type

Dict[str, Any]

Examples

>>> get_current_user("ACCESSKEY-********", "https://api.graviti.com")
{
    "id": "41438e9df9a82a194e1e76cc31c1d8d4",
    "nickname": "czh ual",
    "email": "********@graviti.com",
    "mobile": null,
    "description": "",
    "workspace": "graviti-example",
    "team": null
}