All URIs are relative to https://purity_fb_server/api
| Method | HTTP request | Description |
|---|---|---|
| login | POST /login | |
| logout | POST /logout |
LoginResponse login(api_token)
Log in to the server
from purity_fb import PurityFb, rest
fb = PurityFb("10.255.9.28") # assume the array IP is 10.255.9.28
fb.disable_verify_ssl()
try:
# login to the array with your API_TOKEN
# use *_with_http_info method to get response header as well as body
res = fb.authentication.login_with_http_info(API_TOKEN)
X_AUTH_TOKEN = res[2]['x-auth-token']
except rest.ApiException as e:
print("Exception when logging in to the array: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| api_token | str | the token to log in |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to Overview]
logout()
Log out from the server
from purity_fb import PurityFb, FileSystem, rest
fb = PurityFb("10.255.9.28") # assume the array IP is 10.255.9.28
fb.disable_verify_ssl()
try:
# login to the array with your API_TOKEN
# use *_with_http_info method to get response header as well as body
res = fb.authentication.login_with_http_info(API_TOKEN)
X_AUTH_TOKEN = res[2]['x-auth-token']
# update x-auth-token header using the response of log in
fb.authentication._api_client.default_headers['x-auth-token'] = X_AUTH_TOKEN
except rest.ApiException as e:
print("Exception when logging in to the array: %s\n" % e)
try:
# logout from the array
# use *_with_http_info method to get response header as well as body
fb.authentication.logout_with_http_info()
except rest.ApiException as e:
print("Exception when logging out from the array: %s\n" % e)This endpoint does not need any parameter.
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to Overview]