Sites Endpoint

GET /sites

#!/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 list of sites using token as a variable AccessToken curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/sites
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/"
  },
  "data": [
    {
      "href": "~/sites/e442c992-7318-e211-92ad-000c29753f96",
      "dataType": "Site",
      "id": "e442c992-7318-e211-92ad-000c29753f96",
      "name": "Home",
      "description": "Home Site",
      "siteType": "Location",
      "status": "Open"
    },
    {
      "href": "~/sites/2310f5f9-0a44-e411-accd-005056805d2b",
      "dataType": "Site",
      "id": "2310f5f9-0a44-e411-accd-005056805d2b",
      "name": "Boston",
      "description": "Boston",
      "siteType": "Location",
      "status": "Open"
    }
  ]
}
Data Types: Site
Requests a list of sites. 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 /sites/{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 site by id using token as a variable AccessToken curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/sites/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/f4d77693-9c6e-e511-80d0-0050568dfc50"
  },
  "data": [
    {
      "href": "~/sites/f4d77693-9c6e-e511-80d0-0050568dfc50",
      "dataType": "Site",
      "id": "f4d77693-9c6e-e511-80d0-0050568dfc50",
      "name": "Test Site",
      "description": "Test Site Description",
      "siteType": "Location",
      "status": "Open"
    }
  ]
}
Data Types: Site
Requests a site by Site 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 Site Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /sites/{id}/groups

#!/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 groups of a site by site id using token as a variable AccessToken curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/sites/{id}/groups
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/e442c992-7318-e211-92ad-000c29753f96/groups"
  },
  "data": [
    {
      "href": "~/sites/e442c992-7318-e211-92ad-000c29753f96/groups/f242c992-7318-e211-92ad-000c29753f96",
      "dataType": "Group",
      "id": "f242c992-7318-e211-92ad-000c29753f96",
      "name": "All Users",
      "description": "All Users",
      "siteId": "e442c992-7318-e211-92ad-000c29753f96"
    },
    {
      "href": "~/sites/e442c992-7318-e211-92ad-000c29753f96/groups/bed7679b-808d-e211-bde2-0013210b5170",
      "dataType": "Group",
      "id": "bed7679b-808d-e211-bde2-0013210b5170",
      "name": "CEO",
      "description": "CEO",
      "siteId": "e442c992-7318-e211-92ad-000c29753f96"
    },
    {
      "href": "~/sites/e442c992-7318-e211-92ad-000c29753f96/groups/fe42c992-7318-e211-92ad-000c29753f96",
      "dataType": "Group",
      "id": "fe42c992-7318-e211-92ad-000c29753f96",
      "name": "VaultAccess",
      "description": "Full Vault Access",
      "siteId": "e442c992-7318-e211-92ad-000c29753f96"
    },
    {
      "href": "~/sites/e442c992-7318-e211-92ad-000c29753f96/groups/f842c992-7318-e211-92ad-000c29753f96",
      "dataType": "Group",
      "id": "f842c992-7318-e211-92ad-000c29753f96",
      "name": "VaultAdmins",
      "description": "Admin Tools Access",
      "siteId": "e442c992-7318-e211-92ad-000c29753f96"
    }
  ]
}
Data Types: Group
Requests all groups of a site by Site Id. 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
id guid Site Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /sites/{id}/groups/{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 group from a site by site id and group id using token as a variable AccessToken curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/sites/{id}/groups/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/e442c992-7318-e211-92ad-000c29753f96/groups/bed7679b-808d-e211-bde2-0013210b5170"
  },
  "data": [
    {
      "href": "~/sites/e442c992-7318-e211-92ad-000c29753f96/groups/bed7679b-808d-e211-bde2-0013210b5170",
      "dataType": "Group",
      "id": "bed7679b-808d-e211-bde2-0013210b5170",
      "name": "CEO",
      "description": "CEO",
      "siteId": "e442c992-7318-e211-92ad-000c29753f96"
    }
  ]
}
Data Types: Group
Requests a group of a site by Site Id and Group Id. The first id is the Site Id and the second id is the Group 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 Site Id
id guid Group Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /sites/{id}/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 all users from a specific site 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}/sites/{id}/users
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/users"
  },
  "data": [
    {
      "href": "~/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/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": "~/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/users/8cc04401-e378-e511-80d0-0050568dfc50",
      "dataType": "User",
      "id": "8cc04401-e378-e511-80d0-0050568dfc50",
      "name": "rootRaiderss",
      "userid": "rootRaiderss",
      "firstName": "root",
      "middleInitial": "",
      "lastName": "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 users from a site by Site Id. 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
id guid Site Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /sites/{id}/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 of a specific site by site id and 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}/sites/{id}/users/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/users/8cc04401-e378-e511-80d0-0050568dfc50"
  },
  "data": [
    {
      "href": "~/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/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 a user by Site Id and User Id. The first id is the Site Id and the second is the 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 Site Id
id guid User Id
password string Password from Visual Vault
userName string User Name from Visual Vault

POST /sites

#!/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 site using token as a variable AccessToken curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "name": "Test Site", "description": "Test Site Description" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/sites
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "POST",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/"
  },
  "data": {
    "href": "~/sites/f4d77693-9c6e-e511-80d0-0050568dfc50",
    "dataType": "Site",
    "id": "f4d77693-9c6e-e511-80d0-0050568dfc50",
    "name": "Test Site",
    "description": "Test Site Description",
    "siteType": "Location",
    "status": "Open"
  }
}
Data Types: Site
Creates a site. The name and description fields are mandatory for request.
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

POST /sites/{id}/groups

#!/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 group for a site by site id using token as a variable AccessToken curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "name": "site group", "description": "GroupDescription" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/sites/{id}/groups
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "POST",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/groups"
  },
  "data": {
    "href": "~/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/groups/79089af4-e178-e511-80d0-0050568dfc50",
    "dataType": "Group",
    "id": "79089af4-e178-e511-80d0-0050568dfc50",
    "name": "site group",
    "description": "GroupDescription",
    "siteId": "f4d77693-9c6e-e511-80d0-0050568dfc50"
  }
}
Data Types: Group
Creates a group for a site by Site Id. The name and description fields are required for group creation.
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 Site Id
password string Password from Visual Vault
userName string User Name from Visual Vault

POST /sites/{id}/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 of a site by site id using token as a variable named AccessToken curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "name": "rootRaider", "userid": "rootRaiderss", "firstName": "root", "lastName": "Raider", "emailaddress": "jimmyparatres@gmail.com", "password": "password" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/sites/{id}/users
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "POST",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/users"
  },
  "data": {
    "href": "~/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/users/8cc04401-e378-e511-80d0-0050568dfc50",
    "dataType": "User",
    "id": "8cc04401-e378-e511-80d0-0050568dfc50",
    "name": "rootRaiderss",
    "userid": "rootRaiderss",
    "firstName": "root",
    "middleInitial": "",
    "lastName": "Raider",
    "passwordExpires": "2016-10-22T10:33:28.183",
    "userIdExpires": "2016-10-16T10:33:28.887",
    "emailAddress": "jimmyparatres@gmail.com",
    "siteId": "f4d77693-9c6e-e511-80d0-0050568dfc50",
    "userIdNeverExpires": true,
    "passwordNeverExpires": true,
    "enabled": true,
    "lastIpAddress": ""
  }
}
Data Types: User
Creates a user for a site by Site Id. The above fields in the request name through password are mandatory for user creation.
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 Site Id
password string Password from Visual Vault
userName string User Name from Visual Vault

PUT /sites/{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 site using token as a variable AccessToken curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "name": "New Test Site", "description": "New Test Site Description" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/sites/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "PUT",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/"
  },
  "data": {
    "href": "~/sites/f4d77693-9c6e-e511-80d0-0050568dfc50",
    "dataType": "Site",
    "id": "f4d77693-9c6e-e511-80d0-0050568dfc50",
    "name": "New Test Site",
    "description": "New Test Site Description",
    "siteType": "Location",
    "status": "Open"
  }
}
Data Types: Site
Updates a site by Site 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 Site Id
password string Password from Visual Vault
userName string User Name from Visual Vault

PUT /sites/{id}/groups/{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 group from a site by group id and site id using token as a variable AccessToken curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "name": "new site group name", "description": " new GroupDescription" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/sites/{id}/groups/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "PUT",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/groups/79089af4-e178-e511-80d0-0050568dfc50"
  },
  "data": {
    "href": "~/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/groups/79089af4-e178-e511-80d0-0050568dfc50",
    "dataType": "Group",
    "id": "79089af4-e178-e511-80d0-0050568dfc50",
    "name": "new site group name",
    "description": "new GroupDescription",
    "siteId": "f4d77693-9c6e-e511-80d0-0050568dfc50"
  }
}
Data Types: Group
Updates a group of a site by Site Id and Group Id. The first id is the Site Id and the second id is the Group Id.
Parameters
Key Type Description
cid guid Group Id
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 Site Id
password string Password from Visual Vault
userName string User Name from Visual Vault

PUT /sites/{id}/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 of a site by site id and user id using token as a variable named AccessToken curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "name": "rootRaider", "userid": "rootRaiderss", "firstName": "new root", "lastName": "new Raider", "emailaddress": "jimmyparatres@gmail.com", "password": "password" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/sites/{id}/users/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "PUT",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/users/8cc04401-e378-e511-80d0-0050568dfc50"
  },
  "data": {
    "href": "~/sites/f4d77693-9c6e-e511-80d0-0050568dfc50/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
Updates a user of a site by Site Id and User Id. The first id is the Site Id and the second is the 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 Site Id
id guid User Id
password string Password from Visual Vault
userName string User Name from Visual Vault