Search MFA Status
1 min
POST
{{url}}/aioc-rest-web/rest/tfa/otpStatus
Path Parameters
- urlstringDefaulturl
Header Parameters
- Content-TypestringDefaultapplication/x-www-form-urlencoded
- X-XSRF-TOKENstringDefault{{csrftoken}}
Form Parameters
- usernamestringDefaultadmin
Responses
200
curl
curl --request POST \
--url {{url}}/aioc-rest-web/rest/tfa/otpStatus \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--header 'x-xsrf-token: {{csrftoken}}' \
--form 'username="admin"'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/x-www-form-urlencoded");
myHeaders.append("x-xsrf-token", "{{csrftoken}}");
var formdata = new FormData();
formdata.append("username", "admin");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: formdata,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/tfa/otpStatus", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "net/http"
url = URI("{{url}}/aioc-rest-web/rest/tfa/otpStatus")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/x-www-form-urlencoded"
request["x-xsrf-token"] = "{{csrftoken}}"
form_data = [['username', File.open('undefined')]]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
python
import requests
url = "{{url}}/aioc-rest-web/rest/tfa/otpStatus"
payload = {}
files=[
]
headers = {
'accept': 'application/json',
'content-type': 'application/x-www-form-urlencoded',
'x-xsrf-token': '{{csrftoken}}'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
200
false