Groups Endpoint

GET /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 all groups 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}/groups
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/groups/"
  },
  "data": [
    {
      "href": "~/groups/14e73b2a-2240-e411-accd-005056805d2b",
      "dataType": "Group",
      "id": "14e73b2a-2240-e411-accd-005056805d2b",
      "name": "Business",
      "description": "Business",
      "siteId": "e442c992-7318-e211-92ad-000c29753f96"
    },
    {
      "href": "~/groups/fe42c992-7318-e211-92ad-000c29753f96",
      "dataType": "Group",
      "id": "fe42c992-7318-e211-92ad-000c29753f96",
      "name": "demo group",
      "description": "demo group",
      "siteId": "e442c992-7318-e211-92ad-000c29753f96"
    },
    {
      "href": "~/groups/f842c992-7318-e211-92ad-000c29753f96",
      "dataType": "Group",
      "id": "f842c992-7318-e211-92ad-000c29753f96",
      "name": "group 3",
      "description": "this is group 3",
      "siteId": "e442c992-7318-e211-92ad-000c29753f96"
    }
  ]
}
Data Types: Group
Requests a list of Groups. 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 /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 specific group 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}/groups/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/groups/7dcba6e7-e86d-e511-80d0-0050568dfc50/"
  },
  "data": [
    {
      "href": "~/groups/7dcba6e7-e86d-e511-80d0-0050568dfc50",
      "dataType": "Group",
      "id": "7dcba6e7-e86d-e511-80d0-0050568dfc50",
      "name": "Test Group",
      "description": "Group Description",
      "siteId": "00000000-0000-0000-0000-000000000000"
    }
  ]
}
Data Types: Group
Requests a group by 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 Group Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /groups/{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 a specific group 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}/groups/{id}/users
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/groups/14e73b2a-2240-e411-accd-005056805d2b/users"
  },
  "data": [
    {
      "href": "~/groups/14e73b2a-2240-e411-accd-005056805d2b/users/0426601e-808d-e211-bde2-0013210b5170",
      "dataType": "User",
      "id": "0426601e-808d-e211-bde2-0013210b5170",
      "name": "demo.human",
      "userid": "human",
      "firstName": "Demo",
      "middleInitial": "",
      "lastName": "demoman",
      "passwordExpires": "9999-12-31T00:00:00",
      "userIdExpires": "2014-03-10T07:53:38.947",
      "emailAddress": "tim@cool.com",
      "siteId": "e442c992-7318-e211-92ad-000c29753f96",
      "userIdNeverExpires": true,
      "passwordNeverExpires": true,
      "enabled": true,
      "lastIpAddress": ""
    }
  ],
  "pagination": {
    "dataType": "PagedData",
    "href": "",
    "first": "",
    "last": "",
    "limit": 200,
    "next": "",
    "previous": "",
    "totalRecords": 1
  }
}
Data Types: User
Requests users from a group by Group 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 Group Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /groups/{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 specific group 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}/groups/{id}/users/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/groups/14e73b2a-2240-e411-accd-005056805d2b/users/0426601e-808d-e211-bde2-0013210b5170"
  },
  "data": [
    {
      "href": "~/groups/14e73b2a-2240-e411-accd-005056805d2b/users/0426601e-808d-e211-bde2-0013210b5170/0426601e-808d-e211-bde2-0013210b5170",
      "dataType": "User",
      "id": "0426601e-808d-e211-bde2-0013210b5170",
      "name": "demo.human",
      "userid": "human",
      "firstName": "Demo",
      "middleInitial": "",
      "lastName": "demoman",
      "passwordExpires": "9999-12-31T00:00:00",
      "userIdExpires": "2014-03-10T07:53:38.947",
      "emailAddress": "tim@cool.com",
      "siteId": "e442c992-7318-e211-92ad-000c29753f96",
      "userIdNeverExpires": true,
      "passwordNeverExpires": true,
      "enabled": true,
      "lastIpAddress": ""
    }
  ],
  "pagination": {
    "dataType": "PagedData",
    "href": "",
    "first": "",
    "last": "",
    "limit": 200,
    "next": "",
    "previous": "",
    "totalRecords": 1
  }
}
Data Types: User
Requests users from a group by Group Id and User Id. The first id is the Group Id and the second Id 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 Group Id
id guid User Id
password string Password from Visual Vault
userName string User Name from Visual Vault

POST /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 using token as a variable named AccessToken curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "name": "Test Group", "description": "Group Description", "siteId": "id of the site" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/groups
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "POST",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/groups/"
  },
  "data": {
    "href": "~/groups/45ea70ca-fd71-e511-befe-98991b71acc0",
    "dataType": "Group",
    "id": "45ea70ca-fd71-e511-befe-98991b71acc0",
    "name": "Test Group",
    "description": "Group Description",
    "siteId": "12001200-l500-1230-0880-000zsd40001i"
  }
}
Data Types: Group
Creates a new Group. Be sure to add a valid siteId. siteId will be a guid value.
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

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