Documents API Endpoint

DELETE /documents/{documentId}

#!/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"]') # script to delete a document by doc id using Access Token as a variable curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents/{documentId}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "DELETE",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/documents/94888e71-d26d-e511-80d0-0050568d3d8b"
  }
}
deletes a document by Document 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
documentId guid Document Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /documents

#!/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"]') # script to access a document from a query string paramater using AccessToken as a variable # query string mandatory to filter search for a document using this endpoint curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents/?q=name%20eq%20%27gen-1%27
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/documents/?q=name eq 'gen-1'"
  },
  "data": [
    {
      "href": "~/Documents/e10f2106-8c72-e511-befe-98991b71acc0",
      "dataType": "Document",
      "id": "b5d82c06-8c72-e511-befe-98991b71acc0",
      "documentId": "e10f2106-8c72-e511-befe-98991b71acc0",
      "name": "GEN-1",
      "description": "search.txt",
      "releaseState": 1,
      "checkInStatus": 0,
      "revision": "1",
      "reviewDate": "2015-10-14T00:00:00",
      "expireDate": "2015-10-14T00:00:00",
      "archive": 0,
      "abstract": "",
      "keywords": "",
      "changeText": "",
      "folderId": "10000000-1000-2000-1111-100000000010",
      "folderName": "General",
      "folderPath": "/General",
      "fileId": "e30f2106-8c72-e511-befe-98991b71acc0",
      "fileName": "search.txt",
      "fileSize": 1453,
      "extension": "txt",
      "contentType": "text/plain",
      "checkedInBy": "{userName}",
      "checkedOutById": "id",
      "checkedOutBy": "{userName}",
      "checkOutDate": "2015-10-14T08:55:43.983",
      "createDate": "2015-10-14T08:55:43.923",
      "createById": "id",
      "createBy": "",
      "modifyDate": "2015-10-14T08:55:44.013",
      "modifyById": "id",
      "modifyBy": ""
    }
  ],
  "pagination": {
    "dataType": "PagedData",
    "href": "",
    "first": "",
    "last": "",
    "limit": 200,
    "next": "",
    "previous": "",
    "totalRecords": 1
  }
}
Data Types: Document
Searches for a document from VisualVault using a query string equivalent to name = gen-1. Query string parameter mandatory for this endpoint. Please see query syntax section for more details.
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 /documents/{documentId}

#!/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"]') # script to access a document by id using AccessToken as a variable curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/Documents/{documentId}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/documents?id=e10f2106-8c72-e511-befe-98991b71acc0"
  },
  "data": {
    "href": "~/documents/e10f2106-8c72-e511-befe-98991b71acc0",
    "dataType": "Document",
    "id": "b5d82c06-8c72-e511-befe-98991b71acc0",
    "documentId": "e10f2106-8c72-e511-befe-98991b71acc0",
    "name": "GEN-1",
    "description": "search.txt",
    "releaseState": 1,
    "checkInStatus": 0,
    "revision": "1",
    "reviewDate": "2015-10-14T00:00:00",
    "expireDate": "2015-10-14T00:00:00",
    "archive": 0,
    "abstract": "",
    "keywords": "",
    "changeText": null,
    "folderId": "10000000-1000-2000-1111-100000000010",
    "folderName": "General",
    "folderPath": "/General",
    "fileId": "e30f2106-8c72-e511-befe-98991b71acc0",
    "fileName": "search.txt",
    "fileSize": 1453,
    "extension": "txt",
    "contentType": "text/plain",
    "checkedInBy": "{userName}",
    "checkedOutById": "id",
    "checkedOutBy": "{userName}",
    "checkOutDate": "2015-10-14T08:55:43.983",
    "createDate": "2015-10-14T08:55:43.923",
    "createById": "id",
    "createBy": "{userName}",
    "modifyDate": "2015-10-14T08:55:44.013",
    "modifyById": "id",
    "modifyBy": "{userName}"
  }
}
Data Types: Document
Script to access a document by Document 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
documentId guid Document Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /documents/{documentId}/revisions

#!/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"]') # script to request revisions of a document by id using AcessToken as a variable curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents/{documentId}/revisions
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/documents/e10f2106-8c72-e511-befe-98991b71acc0/revisions"
  },
  "data": [
    {
      "href": "~/documents/e10f2106-8c72-e511-befe-98991b71acc0/revisions/b5d82c06-8c72-e511-befe-98991b71acc0",
      "dataType": "Document",
      "id": "b5d82c06-8c72-e511-befe-98991b71acc0",
      "documentId": "e10f2106-8c72-e511-befe-98991b71acc0",
      "name": "GEN-1",
      "description": "search.txt",
      "releaseState": 1,
      "checkInStatus": 0,
      "revision": "1",
      "reviewDate": "2015-10-14T00:00:00",
      "expireDate": "2015-10-14T00:00:00",
      "archive": 0,
      "abstract": "",
      "keywords": "",
      "changeText": "",
      "folderId": "10000000-1000-2000-1111-100000000010",
      "folderName": "General",
      "folderPath": "/General",
      "fileId": "e30f2106-8c72-e511-befe-98991b71acc0",
      "fileName": "search.txt",
      "fileSize": 1453,
      "extension": "txt",
      "contentType": "text/plain",
      "checkedInBy": "{userName}",
      "checkedOutById": "id",
      "checkedOutBy": "{userName}",
      "checkOutDate": "2015-10-14T08:55:43.983",
      "createDate": "2015-10-14T08:55:43.923",
      "createById": "id",
      "createBy": "",
      "modifyDate": "2015-10-14T08:55:44.013",
      "modifyById": "id",
      "modifyBy": ""
    }
  ]
}
Data Types: Document
Lists all revisions of a document by Document 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
documentId guid Document Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /documents/{documentId}/revisions/{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"]') # script to request a specific revision of a document by id using AcessToken as a variable curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents/{documentId}/revisions/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/documents/e10f2106-8c72-e511-befe-98991b71acc0/revisions/b5d82c06-8c72-e511-befe-98991b71acc0"
  },
  "data": {
    "href": "~/documents/e10f2106-8c72-e511-befe-98991b71acc0/revisions/b5d82c06-8c72-e511-befe-98991b71acc0",
    "dataType": "Document",
    "id": "b5d82c06-8c72-e511-befe-98991b71acc0",
    "documentId": "e10f2106-8c72-e511-befe-98991b71acc0",
    "name": "GEN-1",
    "description": "search.txt",
    "releaseState": 1,
    "checkInStatus": 0,
    "revision": "1",
    "reviewDate": "2015-10-14T00:00:00",
    "expireDate": "2015-10-14T00:00:00",
    "archive": 0,
    "abstract": "",
    "keywords": "",
    "changeText": "",
    "folderId": "10000000-1000-2000-1111-100000000010",
    "folderName": "General",
    "folderPath": "/General",
    "fileId": "e30f2106-8c72-e511-befe-98991b71acc0",
    "fileName": "search.txt",
    "fileSize": 1453,
    "extension": "txt",
    "contentType": "text/plain",
    "checkedInBy": "{userName}",
    "checkedOutById": "id",
    "checkedOutBy": "{userName}",
    "checkOutDate": "2015-10-14T08:55:43.983",
    "createDate": "2015-10-14T08:55:43.923",
    "createById": "id",
    "createBy": "",
    "modifyDate": "2015-10-14T08:55:44.013",
    "modifyById": "id",
    "modifyBy": ""
  }
}
Data Types: Document
Requests all revisions of a document by Document Id and Revision Id called 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
documentId guid Document Id
id guid document revision id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /documents/{documentId}/indexfields

#!/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"]') # script to request index fields of a specific document by id using AcessToken as a variable curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents/{documentId}/indexfields
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/documents/98eefc3c-2040-e411-b405-005056806ba3/indexfields"
  },
  "data": [
    {
      "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/indexfield/99eefc3c-2040-e411-b405-005056806ba3",
      "dataType": "DocumentIndexField",
      "id": "99eefc3c-2040-e411-b405-005056806ba3",
      "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
      "fieldId": "307f8927-bf1b-e311-abed-000c291aac29",
      "fieldType": 6,
      "label": "Departments",
      "description": "Departments List",
      "ordinalPosition": 0,
      "required": true,
      "units": "",
      "value": "Human Resources",
      "createDate": "2013-09-12T15:22:37.727",
      "createById": "id",
      "createBy": "{userName}",
      "modifyDate": "2014-09-05T17:35:22.713",
      "modifyById": "id",
      "modifyBy": "{userName}"
    },
    {
      "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/indexfield/9aeefc3c-2040-e411-b405-005056806ba3",
      "dataType": "DocumentIndexField",
      "id": "9aeefc3c-2040-e411-b405-005056806ba3",
      "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
      "fieldId": "58fb37c0-1c40-e411-b405-005056806ba3",
      "fieldType": 1,
      "label": "Employee Name",
      "description": "Name of Employee or potential Employee",
      "ordinalPosition": 0,
      "required": false,
      "units": "",
      "value": "John Smith",
      "createDate": "2014-09-19T16:48:16.597",
      "createById": "id",
      "createBy": "{userName}",
      "modifyDate": "2014-09-19T16:48:16.597",
      "modifyById": "id",
      "modifyBy": "{userName}"
    },
    {
      "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/indexfield/9beefc3c-2040-e411-b405-005056806ba3",
      "dataType": "DocumentIndexField",
      "id": "9beefc3c-2040-e411-b405-005056806ba3",
      "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
      "fieldId": "382b6ac9-1c40-e411-b405-005056806ba3",
      "fieldType": 1,
      "label": "Employee ID",
      "description": "ID of the Employee",
      "ordinalPosition": 0,
      "required": false,
      "units": "",
      "value": "558588",
      "createDate": "2014-09-19T16:48:32.04",
      "createById": "id",
      "createBy": "{userName}",
      "modifyDate": "2014-09-19T16:48:32.04",
      "modifyById": "id",
      "modifyBy": "{userName}"
    }
  ]
}
Data Types: DocumentIndexField
Requests all index fields of a document by Document 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
documentId guid Document Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /documents/{documentId}/indexfields/{fieldId}

#!/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"]') # script to request a specific index field of a specific document by id using AcessToken as a variable curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents/{documentId}/indexfields/{fieldId}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/documents/98eefc3c-2040-e411-b405-005056806ba3/indexfields/9aeefc3c-2040-e411-b405-005056806ba3"
  },
  "data": {
    "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/indexfield/9aeefc3c-2040-e411-b405-005056806ba3",
    "dataType": "DocumentIndexField",
    "id": "9aeefc3c-2040-e411-b405-005056806ba3",
    "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
    "fieldId": "58fb37c0-1c40-e411-b405-005056806ba3",
    "fieldType": 1,
    "label": "Employee Name",
    "description": "Name of Employee or potential Employee",
    "ordinalPosition": 0,
    "required": false,
    "units": "",
    "value": "John Smith",
    "createDate": "2014-09-19T16:48:16.597",
    "createById": "id",
    "createBy": "{userName}",
    "modifyDate": "2014-09-19T16:48:16.597",
    "modifyById": "id",
    "modifyBy": "{userName}"
  }
}
Data Types: DocumentIndexField
Requests indexfields of a document by Document Id and Index Field 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
documentId guid Document Id
fieldId guid Index Field Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /documents/{documentId}/revisions/{id}/indexfields

#!/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"]') # script to request index fields of a specific revision of a document by id using AcessToken as a variable curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents/{documentId}/revisions/{id}/indexfields
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/documents/98eefc3c-2040-e411-b405-005056806ba3/revisions/4400ce3c-2040-e411-accd-005056805d2b/indexfields"
  },
  "data": [
    {
      "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/revisions/4400ce3c-2040-e411-accd-005056805d2b/indexfields/99eefc3c-2040-e411-b405-005056806ba3",
      "dataType": "DocumentIndexField",
      "id": "99eefc3c-2040-e411-b405-005056806ba3",
      "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
      "fieldId": "307f8927-bf1b-e311-abed-000c291aac29",
      "fieldType": 6,
      "label": "Departments",
      "description": "Departments List",
      "ordinalPosition": 0,
      "required": true,
      "units": "",
      "value": "Human Resources",
      "createDate": "2013-09-12T15:22:37.727",
      "createById": "id",
      "createBy": "{userName}",
      "modifyDate": "2014-09-05T17:35:22.713",
      "modifyById": "id",
      "modifyBy": "{userName}"
    },
    {
      "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/revisions/4400ce3c-2040-e411-accd-005056805d2b/indexfields/9aeefc3c-2040-e411-b405-005056806ba3",
      "dataType": "DocumentIndexField",
      "id": "9aeefc3c-2040-e411-b405-005056806ba3",
      "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
      "fieldId": "58fb37c0-1c40-e411-b405-005056806ba3",
      "fieldType": 1,
      "label": "Employee Name",
      "description": "Name of Employee or potential Employee",
      "ordinalPosition": 0,
      "required": false,
      "units": "",
      "value": "John Smith",
      "createDate": "2014-09-19T16:48:16.597",
      "createById": "id",
      "createBy": "{userName}",
      "modifyDate": "2014-09-19T16:48:16.597",
      "modifyById": "id",
      "modifyBy": "{userName}"
    },
    {
      "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/revisions/4400ce3c-2040-e411-accd-005056805d2b/indexfields/9beefc3c-2040-e411-b405-005056806ba3",
      "dataType": "DocumentIndexField",
      "id": "9beefc3c-2040-e411-b405-005056806ba3",
      "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
      "fieldId": "382b6ac9-1c40-e411-b405-005056806ba3",
      "fieldType": 1,
      "label": "Employee ID",
      "description": "ID of the Employee",
      "ordinalPosition": 0,
      "required": false,
      "units": "",
      "value": "558588",
      "createDate": "2014-09-19T16:48:32.04",
      "createById": "id",
      "createBy": "{userName}",
      "modifyDate": "2014-09-19T16:48:32.04",
      "modifyById": "id",
      "modifyBy": "{userName}"
    }
  ]
}
Data Types: DocumentIndexField
Requests all index fields of a document by Document Id and Revision 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
documentId guid Document Id
id guid Revision Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /documents/{documentId}/revisions/{id}/indexfields/{fieldId}

#!/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"]') # script to request a specific index field of a specefic revision of a document by id using AcessToken as a variable curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents/{documentId}/revisions/{id}/indexfields/{fieldId}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/documents/98eefc3c-2040-e411-b405-005056806ba3/revisions/4400ce3c-2040-e411-accd-005056805d2b/indexfields/307f8927-bf1b-e311-abed-000c291aac29"
  },
  "data": {
    "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/revisions/4400ce3c-2040-e411-accd-005056805d2b/indexfields/99eefc3c-2040-e411-b405-005056806ba3",
    "dataType": "DocumentIndexField",
    "id": "99eefc3c-2040-e411-b405-005056806ba3",
    "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
    "fieldId": "307f8927-bf1b-e311-abed-000c291aac29",
    "fieldType": 6,
    "label": "Departments",
    "description": "Departments List",
    "ordinalPosition": 0,
    "required": true,
    "units": "",
    "value": "Human Resources",
    "createDate": "2013-09-12T15:22:37.727",
    "createById": "id",
    "createBy": "{userName}",
    "modifyDate": "2014-09-05T17:35:22.713",
    "modifyById": "id",
    "modifyBy": "{userName}"
  }
}
Data Types: DocumentIndexField
Requests all index fields of a document by Document Id, Revision Id, and Index Field 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
documentId guid Document Id
fieldId guid Index Field Id
id guid Revision Id
password string Password from Visual Vault
userName string User Name from Visual Vault

PUT /documents/{documentId}/indexfields/{fieldId}

#!/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"]') # script to udpate a specific index field of a specific document by id using AcessToken as a variable # the value field is a mandatory field for update. user can also update label and description as long as value is submitted as well. curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "value": "Jon Smith" }' \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents/{documentId}/indexfields/{fieldId}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "PUT",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/documents/98eefc3c-2040-e411-b405-005056806ba3/indexfields/58fb37c0-1c40-e411-b405-005056806ba3"
  },
  "data": {
    "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/indexfields/9aeefc3c-2040-e411-b405-005056806ba3",
    "dataType": "DocumentIndexField",
    "id": "9aeefc3c-2040-e411-b405-005056806ba3",
    "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
    "fieldId": "58fb37c0-1c40-e411-b405-005056806ba3",
    "fieldType": 1,
    "label": "Employee Name",
    "description": "Name of Employee or potential Employee",
    "ordinalPosition": 6,
    "required": false,
    "units": "",
    "value": "Jon Smith",
    "createDate": "2014-09-19T16:48:16.597",
    "createById": "id",
    "createBy": "{userName}",
    "modifyDate": "2014-09-19T16:48:16.597",
    "modifyById": "id",
    "modifyBy": "{userName}"
  }
}
Data Types: DocumentIndexField
Updates an index field by Document Id and Index Field Id. Value must be a submited field to be updates. User can also update label, and description as long as value is submited as well.
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
documentId guid Document Id
fieldId guid Index Field Id
password string Password from Visual Vault
userName string User Name from Visual Vault

PUT /documents/{documentId}/indexfields

#!/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"]') # script to udpate index fields of a specific document by id using AcessToken as a variable # must use Json serialized KeyValuePairs with the Key being either the label or FieldId curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "indexfields": "{\"Employee Name\":\"John Smith\",\"Employee ID\":\"558588\"}" }' \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents/{documentId}/indexfields
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "PUT",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/Documents/98eefc3c-2040-e411-b405-005056806ba3/Indexfields"
  },
  "data": [
    {
      "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/indexfields/9aeefc3c-2040-e411-b405-005056806ba3",
      "dataType": "DocumentIndexField",
      "id": "9aeefc3c-2040-e411-b405-005056806ba3",
      "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
      "fieldId": "58fb37c0-1c40-e411-b405-005056806ba3",
      "fieldType": 1,
      "label": "Employee Name",
      "description": "Name of Employee or potential Employee",
      "ordinalPosition": 0,
      "required": false,
      "units": "",
      "value": "John Smith",
      "createDate": "2014-09-19T16:48:16.597",
      "createById": "id",
      "createBy": "{userName}",
      "modifyDate": "2014-09-19T16:48:16.597",
      "modifyById": "id",
      "modifyBy": "{userName}"
    },
    {
      "href": "~/documents/98eefc3c-2040-e411-b405-005056806ba3/indexfields/9beefc3c-2040-e411-b405-005056806ba3",
      "dataType": "DocumentIndexField",
      "id": "9beefc3c-2040-e411-b405-005056806ba3",
      "dhId": "4400ce3c-2040-e411-accd-005056805d2b",
      "fieldId": "382b6ac9-1c40-e411-b405-005056806ba3",
      "fieldType": 1,
      "label": "Employee ID",
      "description": "ID of the Employee",
      "ordinalPosition": 0,
      "required": false,
      "units": "",
      "value": "558588",
      "createDate": "2014-09-19T16:48:32.04",
      "createById": "id",
      "createBy": "{userName}",
      "modifyDate": "2014-09-19T16:48:32.04",
      "modifyById": "id",
      "modifyBy": "{userName}"
    }
  ]
}
Data Types: DocumentIndexField
Updates index fields by Document Id. Request must use Json serialized KeyValuePairs with the Key being either the label or Field 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
documentId guid Document Id
password string Password from Visual Vault
userName string User Name from Visual Vault

POST /documents

#!/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"]') # script to create a new document curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "folderId": "10000000-1000-2000-1111-100000000010", "documentState": 1, "name": "example", "description": "new doc", "revision": "1", "allowNoFile": true, "fileLength": 0, "fileName": "example2.csv", "indexFields": "{}" }' \ https://demo.visualvault.com/api/v1/{customerAlias}/{databasealias}/documents
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "POST",
    "href": "https://demo.visualvault.com/api/v1/testjones/default/documents/"
  },
  "data": {
    "href": "~/documents/fcdcd188-2a7f-e511-bf02-008cfa482110",
    "dataType": "Document",
    "id": "bfa3d288-2a7f-e511-bf02-008cfa482110",
    "documentId": "fcdcd188-2a7f-e511-bf02-008cfa482110",
    "name": "GEN-11",
    "description": "new doc",
    "releaseState": 1,
    "checkInStatus": 0,
    "revision": "1",
    "reviewDate": "2016-07-26T10:20:37.55",
    "expireDate": "2016-10-24T10:20:37.55",
    "archive": 0,
    "abstract": "",
    "keywords": "",
    "changeText": null,
    "folderId": "10000000-1000-2000-1111-100000000010",
    "folderName": "General",
    "folderPath": "/General",
    "fileId": "fedcd188-2a7f-e511-bf02-008cfa482110",
    "fileName": "example2.csv",
    "fileSize": 0,
    "extension": "csv",
    "contentType": "application/octet-stream",
    "checkedInBy": "{userName}",
    "checkedOutById": "5eefec33-ca71-e511-befe-98991b71acc0",
    "checkedOutBy": "{userName}",
    "checkOutDate": "2015-10-30T10:20:37.553",
    "createDate": "2015-10-30T10:20:37.55",
    "createById": "5eefec33-ca71-e511-befe-98991b71acc0",
    "createBy": "{userName}",
    "modifyDate": "2015-10-30T10:20:37.553",
    "modifyById": "5eefec33-ca71-e511-befe-98991b71acc0",
    "modifyBy": "{userName}"
  }
}
Data Types: Document
Creates a new document. Now you may upload files to this documentId from the creation.
Parameters
Key Type Description
string notation for empty set of indexFields
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