Users Endpoint

GET /users

#!/bin/sh # script to get token AccessToken=$(curl -X POST -d "client_id={clientId}&client_secret={clientSecret}&username={userName}&password={password}&grant_type=password" \ https://demo.visualvault.com/oauth/token | python -c 'import sys, json; print json.load(sys.stdin)["access_token"]') # run command to request users using token as a variable named AccessToken curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/users
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/users/"
  },
  "data": [
    {
      "href": "~/users/d5e6122c-1578-e511-80d0-0050568dfc50",
      "dataType": "User",
      "id": "d5e6122c-1578-e511-80d0-0050568dfc50",
      "name": "bill.nye",
      "userid": "bill.nye",
      "firstName": "billy",
      "middleInitial": "",
      "lastName": "nile",
      "passwordExpires": "9999-12-31T00:00:00",
      "userIdExpires": "2016-10-15T10:00:07.143",
      "emailAddress": "nye@nope.com",
      "siteId": "f4d77693-9c6e-e511-80d0-0050568dfc50",
      "userIdNeverExpires": true,
      "passwordNeverExpires": true,
      "enabled": true,
      "lastIpAddress": ""
    },
    {
      "href": "~/users/8cc04401-e378-e511-80d0-0050568dfc50",
      "dataType": "User",
      "id": "8cc04401-e378-e511-80d0-0050568dfc50",
      "name": "rootRaiderss",
      "userid": "rootRaiderss",
      "firstName": "new root",
      "middleInitial": "",
      "lastName": "new Raider",
      "passwordExpires": "2016-10-22T10:33:00",
      "userIdExpires": "2016-10-16T10:33:00",
      "emailAddress": "jimmyparatres@gmail.com",
      "siteId": "f4d77693-9c6e-e511-80d0-0050568dfc50",
      "userIdNeverExpires": true,
      "passwordNeverExpires": true,
      "enabled": true,
      "lastIpAddress": ""
    }
  ]
}
Data Types: User
Requests all users. May use optional query string parameter here.
Parameters
Key Type Description
clientId guid Client Id from Visual Vault
clientSecret guid Client Secret from Visual Vault
customeralias string The alias of the customer you want to connect to
databasealias string The alias of the database of the customer you want to connect to
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /users/{id}

#!/bin/sh # script to get token AccessToken=$(curl -X POST -d "client_id={clientId}&client_secret={clientSecret}&username={userName}&password={password}&grant_type=password" \ https://demo.visualvault.com/oauth/token | python -c 'import sys, json; print json.load(sys.stdin)["access_token"]') # run command to request a user by user id using token as a variable named AccessToken curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/users/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/users/2ec89f14-e678-e511-80d0-0050568dfc50"
  },
  "data": [
    {
      "href": "~/users/2ec89f14-e678-e511-80d0-0050568dfc50",
      "dataType": "User",
      "id": "2ec89f14-e678-e511-80d0-0050568dfc50",
      "name": "NewNew",
      "userid": "NewNew",
      "firstName": "New",
      "middleInitial": "",
      "lastName": "New",
      "passwordExpires": "2016-10-22T10:55:29.623",
      "userIdExpires": "2016-10-16T10:55:29.843",
      "emailAddress": "jimmy@gmail.com",
      "siteId": "00000000-0000-0000-0000-000000000000",
      "userIdNeverExpires": true,
      "passwordNeverExpires": true,
      "enabled": true,
      "lastIpAddress": ""
    }
  ]
}
Data Types: User
Requests a user by User Id
Parameters
Key Type Description
clientId guid Client Id from Visual Vault
clientSecret guid Client Secret from Visual Vault
customeralias string The alias of the customer you want to connect to
databasealias string The alias of the database of the customer you want to connect to
id guid User Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /users/{id}/webtoken

#!/bin/sh # script to get token AccessToken=$(curl -X POST -d "client_id={clientId}&client_secret={clientSecret}&username={userName}&password={password}&grant_type=password" \ https://demo.visualvault.com/oauth/token | python -c 'import sys, json; print json.load(sys.stdin)["access_token"]') # run command to request a webtoken for a user by user id using token as a variable named AccessToken curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/users/{id}/webToken
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/users/2ec89f14-e678-e511-80d0-0050568dfc50/webtoken"
  },
  "data": {
    "webToken": "36f38161-e878-e511-80d0-0050568d3d8b"
  }
}
Requests a web login token for a user by User Id.
Parameters
Key Type Description
clientId guid Client Id from Visual Vault
clientSecret guid Client Secret from Visual Vault
customeralias string The alias of the customer you want to connect to
databasealias string The alias of the database of the customer you want to connect to
id guid User Id
password string Password from Visual Vault
userName string User Name from Visual Vault

POST /users

#!/bin/sh # script to get token AccessToken=$(curl -X POST -d "client_id={clientId}&client_secret={clientSecret}&username={userName}&password={password}&grant_type=password" \ https://demo.visualvault.com/oauth/token | python -c 'import sys, json; print json.load(sys.stdin)["access_token"]') # run command to create a user using token as a variable named AccessToken curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "userid": "NewNew", "firstName": "New", "lastName": "New", "emailaddress": "jimmy@gmail.com", "password": "password" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/users?siteId={siteId}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "POST",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/users?siteId={siteId}"
  },
  "data": {
    "href": "~/users/2ec89f14-e678-e511-80d0-0050568dfc50",
    "dataType": "User",
    "id": "2ec89f14-e678-e511-80d0-0050568dfc50",
    "name": "NewNew",
    "userid": "NewNew",
    "firstName": "New",
    "middleInitial": "",
    "lastName": "New",
    "passwordExpires": "2016-10-22T10:55:29.623",
    "userIdExpires": "2016-10-16T10:55:29.843",
    "emailAddress": "jimmy@gmail.com",
    "siteId": "25040000-4050-1100-1010-048002220000",
    "userIdNeverExpires": true,
    "passwordNeverExpires": true,
    "enabled": true,
    "lastIpAddress": ""
  }
}
Data Types: User
Creates a user. Above fields name through password are required for user creation. Be sure to add a user to a site with a siteId.
Parameters
Key Type Description
clientId guid Client Id from Visual Vault
clientSecret guid Client Secret from Visual Vault
customeralias string The alias of the customer you want to connect to
databasealias string The alias of the database of the customer you want to connect to
password string Password from Visual Vault
siteId guid Site Id
userName string User Name from Visual Vault

PUT /users/{id}

#!/bin/sh # script to get token AccessToken=$(curl -X POST -d "client_id={clientId}&client_secret={clientSecret}&username={userName}&password={password}&grant_type=password" \ https://demo.visualvault.com/oauth/token | python -c 'import sys, json; print json.load(sys.stdin)["access_token"]') # run command to update a user by user id using token as a variable named AccessToken curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "firstName": "New First name", "lastName": "New Last name", "emailaddress": "jimmy@gmail.com" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/users/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "PUT",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/users/2ec89f14-e678-e511-80d0-0050568dfc50"
  },
  "data": {
    "href": "~/users/2ec89f14-e678-e511-80d0-0050568dfc50",
    "dataType": "User",
    "id": "2ec89f14-e678-e511-80d0-0050568dfc50",
    "name": "NewNew",
    "userid": "NewNew",
    "firstName": "New First name",
    "middleInitial": "",
    "lastName": "New Last name",
    "passwordExpires": "2016-10-22T10:55:00",
    "userIdExpires": "2016-10-16T10:55:00",
    "emailAddress": "jimmy@gmail.com",
    "siteId": "00000000-0000-0000-0000-000000000000",
    "userIdNeverExpires": true,
    "passwordNeverExpires": true,
    "enabled": true,
    "lastIpAddress": ""
  }
}
Data Types: User
Updates a user by User Id.
Parameters
Key Type Description
clientId guid Client Id from Visual Vault
clientSecret guid Client Secret from Visual Vault
customeralias string The alias of the customer you want to connect to
databasealias string The alias of the database of the customer you want to connect to
id guid User Id
password string Password from Visual Vault
userName string User Name from Visual Vault