Authentication
Total endpoints: 2
Example base URL: https://<ROBOT_IP>/rest
Required access for this section: PUBLIC for /auth/, authenticated bearer token for /auth/refresh/
Authenticate Client
- Endpoint:
/api/v2/auth/ - Function: Authenticate client.
- Method:
GET - Parameters:
username(query,str | None). Default:None- Shell Command:
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/auth/"
headers = {}
params = {'username': 'example'}
response = requests.get(url, headers=headers, params=params, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Refresh Token
- Endpoint:
/api/v2/auth/refresh/ - Function: Refresh token.
- Method:
GET - Parameters: none
- Shell Command:
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/auth/refresh/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, timeout=10)
print(response.status_code)
print(response.headers.get("Authorization"))
print(response.json())
- Response Example (
200):
The refreshed JWT is returned in the Authorization response header.