For the complete documentation index, see llms.txt. This page is also available as Markdown.

Auth

To Fetch Auth Token for a Host

post
Body
idstringOptional
macaddressstringOptional
passwordstringOptional
Responses
200

OK

application/json
codeintegerOptional
messagestringOptional
responseanyOptional
post/api/hosts/adm/authenticate
POST /api/hosts/adm/authenticate HTTP/1.1
Host: api.demo.netmaker.io
Content-Type: application/json
Accept: */*
Content-Length: 51

{
  "id": "text",
  "macaddress": "text",
  "password": "text"
}
{
  "code": 1,
  "message": "text",
  "response": null
}

Verify and complete setting up TOTP 2FA for a user

post
Authorizations
Path parameters
usernamestringRequired

Username

Body
otp_auth_urlstringOptional
otp_auth_url_signaturestringOptional
totpstringOptional
Responses
200

OK

application/json
codeintegerOptional
messagestringOptional
responseanyOptional
post/api/users/{username}/auth/complete-totp
POST /api/users/{username}/auth/complete-totp HTTP/1.1
Host: api.demo.netmaker.io
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "otp_auth_url": "text",
  "otp_auth_url_signature": "text",
  "totp": "text"
}
{
  "code": 1,
  "message": "text",
  "response": null
}

Initiate setting up TOTP 2FA for a user

post
Authorizations
Path parameters
usernamestringRequired

Username

Responses
200

OK

application/json
otp_auth_urlstringOptional
otp_auth_url_signaturestringOptional
qr_codestringOptional
post/api/users/{username}/auth/init-totp
POST /api/users/{username}/auth/init-totp HTTP/1.1
Host: api.demo.netmaker.io
Accept: */*
{
  "otp_auth_url": "text",
  "otp_auth_url_signature": "text",
  "qr_code": "text"
}

Verify a user's TOTP token

post
Path parameters
usernamestringRequired

Username

Body
otp_auth_urlstringOptional
otp_auth_url_signaturestringOptional
totpstringOptional
Responses
200

OK

application/json
authTokenstringOptional
userNamestringOptional
post/api/users/{username}/auth/verify-totp
POST /api/users/{username}/auth/verify-totp HTTP/1.1
Host: api.demo.netmaker.io
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "otp_auth_url": "text",
  "otp_auth_url_signature": "text",
  "totp": "text"
}
{
  "authToken": "text",
  "userName": "text"
}

Authenticate a user to retrieve an authorization token

post
Body
passwordstringOptional
usernamestringOptional
Responses
200

OK

application/json
codeintegerOptional
messagestringOptional
responseanyOptional
post/api/users/adm/authenticate
POST /api/users/adm/authenticate HTTP/1.1
Host: api.demo.netmaker.io
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "password": "text",
  "username": "text"
}
{
  "code": 1,
  "message": "text",
  "response": null
}

Last updated

Was this helpful?