Login
1 min
POST
{{url}}/aioc-rest-web/rest/login
Header Parameters
- Content-TypestringExample
- X-XSRF-TOKENstringExample
Body Parameters
- bodystringExample
{ "username": "admin", "password": "admin" }
Responses
200
curl
curl --location --globoff '{{url}}/aioc-rest-web/rest/login' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"body":"string"}'javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"body": "string"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/login", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("{{url}}/aioc-rest-web/rest/login")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"body": "string"
})
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "{{url}}/aioc-rest-web/rest/login"
payload = json.dumps({
"body": "string"
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
{
"sessionId": "a8aa28c1-bd5a-4ea3-9490-47cfee4b52ca"
}