Skip to content

Latest commit

 

History

History
212 lines (146 loc) · 5.96 KB

UsersApi.md

File metadata and controls

212 lines (146 loc) · 5.96 KB

swagger_client.UsersApi

All URIs are relative to https://localhost/api/v1

Method HTTP request Description
get_user_api_key GET /users/me/apikey Get current user's API key
get_user_self GET /users/me Get current user
regen_api_key POST /users/me/apikey Regenerate API Key
update_user_self PUT /users/me Update current user

get_user_api_key

InlineResponse2003 get_user_api_key()

Get current user's API key

Get the currently authenticated user's API key.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: apikey
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.UsersApi()

try: 
    # Get current user's API key
    api_response = api_instance.get_user_api_key()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_user_api_key: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse2003

Authorization

apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain, text/html, text/csv

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_user_self

InlineResponse2002 get_user_self(include=include)

Get current user

Get the currently authenticated user.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: apikey
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
include = 'include_example' # str | Extra fields to include in the response (optional)

try: 
    # Get current user
    api_response = api_instance.get_user_self(include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->get_user_self: %s\n" % e)

Parameters

Name Type Description Notes
include str Extra fields to include in the response [optional]

Return type

InlineResponse2002

Authorization

apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain, text/html, text/csv

[Back to top] [Back to API list] [Back to Model list] [Back to README]

regen_api_key

InlineResponse2004 regen_api_key()

Regenerate API Key

Remove current API key and generate a new one. WARNING you will need to use the returned API key in all subsequent calls.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: apikey
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.UsersApi()

try: 
    # Regenerate API Key
    api_response = api_instance.regen_api_key()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->regen_api_key: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse2004

Authorization

apikey

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json, text/plain, text/html, text/csv

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_user_self

InlineResponse2002 update_user_self(options=options)

Update current user

You can update a few fields on the current user. Each field is optional and you do not need to specify all fields on update.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: apikey
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
options = swagger_client.Options() # Options |  (optional)

try: 
    # Update current user
    api_response = api_instance.update_user_self(options=options)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->update_user_self: %s\n" % e)

Parameters

Name Type Description Notes
options Options [optional]

Return type

InlineResponse2002

Authorization

apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain, text/html, text/csv

[Back to top] [Back to API list] [Back to Model list] [Back to README]