Log in and get a timestamp and a session cookie
post
http://<SDWAN_TENANT_IP>/restapi/login
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
A JSON object containing the login and password
Root Schema : schema
Type:
Show Source
object
Example:
{
"login":{
"username":"talariuser",
"password":"talaripass",
"timestamp":"MK3jd3jdso=="
}
}
Nested Schema : login
Type:
Show Source
object
-
password: string
Example:
talaripass
-
username: string
Example:
talariuser
Response
Supported Media Types
- application/json
200 Response
401 Response
Not Logged into the SDWAN-Edge device
Root Schema : 401NotLoggedin
Type:
Show Source
object
-
message: string
Example:
Not logged in.
-
status: string
Example:
fail
403 Response
Insufficient Userlevel
Root Schema : 403InsufficientUserLevel
Type:
Show Source
object
-
message: string
Example:
User Level for user <user_name> is not sufficient for this <URL value> operation.
-
required_user_level: string
Example:
ADMIN
-
status: string
Example:
fail
-
user_level: string
Example:
GUEST
-
user_name: string
Example:
username
405 Response
Invalid request method
Root Schema : 405ExpectedPost
Type:
Show Source
object
-
message: string
Example:
Operation must use a POST
-
status: string
Example:
fail
Examples
Example of Accessing the API with cURL
The following example shows how to log in by submitting a POST request on the REST resource using cURL. If the request requires a timestamp, use the timestamp from the response of the /login API. For more information about cURL, see Use cURL.
curl -X POST \
-c cookies.txt \
-d@request.json \
--header "Content-Type: application/json" \
"https://$IPADDR/restapi/login"
The following shows an example of the contents of the request.json
file sent as the request body.
{ "login":
{
"username":"talariuser",
"password":"<talari password>",
}
}
Example of the Response Body
The following example shows the contents of the response body in JSON format.
{
"status": "success",
"user_level": 1,
"user_level_str": "admin",
"message": "Login Success - Created session for user talariuser - level: admin",
"timestamp": "MTYwNzUyODk0MQ=="
}