Pivot UserAuth API
If you have access to this API, you can create, read, or edit your UserAuth
objects that represent user authentications.
Pivot must be running in native users mode.
The response strings for currentPass
and passHistory
are hashed passwords. They are not plain text passwords.
Get all UserAuth objects or a get single UserAuth with a name you specify
Returns a list of all UserAuth
objects, or returns a UserAuth
with a {name}
that you specify.
URL
GET /api/v1/user-auths/{name}
Success response
Code | Description |
---|---|
200 | OK |
Selected error response
Code | Example body |
---|---|
404 Not Found | ”error": "Not found." |
Sample request
curl --location --request GET 'http://localhost:9095/api/v1/user-auths' \
--header 'x-imply-api-token:<token>'
Response body
[
{
"name": "string",
"currentPass": "string",
"passHistory": [
"string"
],
"isTwoFactorAuthEnabled": false,
"twoFactorAuthSecret": "string"
}
]
Create or update a UserAuth by name
Creates or updates a UserAuth
with a {name}
that you specify.
URL
POST /api/v1/user-auths/{name}
Request body
curl -X POST --header "Content-Type:application/json" --header "x-imply-api-token:<token>" --data '
{
"userAuth": {
"name": "string",
"currentPass": "string",
"passHistory": [
"string"
],
"isTwoFactorAuthEnabled": false,
"twoFactorAuthSecret": "string"
}
}
Success response
Code | Description |
---|---|
200 | OK |
Selected error response
Code | Example body |
---|---|
404 Not Found | ”error": "Not found." |
Response body
[
{
"name": "string",
"currentPass": "string",
"passHistory": [
"string"
],
"isTwoFactorAuthEnabled": false,
"twoFactorAuthSecret": "string"
}
]
Delete a UserAuth by name
Deletes a UserAuth
with a {name}
that you specify.
URL
DELETE /api/v1/user-auths/{name}
Sample request
curl -X DELETE --header "x-imply-api-token:<token>" localhost:9095/api/v1/user-auths/<userAuthName>
Success response
Code | Description |
---|---|
200 | OK |
Selected error response
Code | Example body |
---|---|
404 Not Found | ”error": "Not found." |