Skip to content

Latest commit

 

History

History
82 lines (54 loc) · 2.37 KB

UserApi.md

File metadata and controls

82 lines (54 loc) · 2.37 KB

groundlight_openapi_client.UserApi

All URIs are relative to https://api.groundlight.ai/device-api

Method HTTP request Description
who_am_i GET /v1/me

who_am_i

InlineResponse2002 who_am_i()

Retrieve the current user.

Example

  • Api Key Authentication (ApiToken):
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import user_api
from groundlight_openapi_client.model.inline_response2002 import InlineResponse2002
from pprint import pprint
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
# See configuration.py for a list of all supported configuration parameters.
configuration = groundlight_openapi_client.Configuration(
    host = "https://api.groundlight.ai/device-api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiToken
configuration.api_key['ApiToken'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiToken'] = 'Bearer'

# Enter a context with an instance of the API client
with groundlight_openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = user_api.UserApi(api_client)

    # example, this endpoint has no required or optional parameters
    try:
        api_response = api_instance.who_am_i()
        pprint(api_response)
    except groundlight_openapi_client.ApiException as e:
        print("Exception when calling UserApi->who_am_i: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse2002

Authorization

ApiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -

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