Skip to content

Latest commit

 

History

History
79 lines (50 loc) · 2.14 KB

AuthorizationApi.md

File metadata and controls

79 lines (50 loc) · 2.14 KB

notehub_py.AuthorizationApi

All URIs are relative to https://api.notefile.net

Method HTTP request Description
login POST /auth/login

login

Login200Response login(login_request)

Gets a session token from the API from a username and password.

Example

import notehub_py
from notehub_py.models.login200_response import Login200Response
from notehub_py.models.login_request import LoginRequest
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)


# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.AuthorizationApi(api_client)
    login_request = {"username":"name@example.com","password":"test-password"} # LoginRequest | 

    try:
        api_response = api_instance.login(login_request)
        print("The response of AuthorizationApi->login:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AuthorizationApi->login: %s\n" % e)

Parameters

Name Type Description Notes
login_request LoginRequest

Return type

Login200Response

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
500 Internal Server Error -

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