FormTemplates Endpoint

GET /formtemplates

#!/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 form templates 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}/formtemplates
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/demo/default/formtemplates/"
  },
  "data": [
    {
      "href": "~/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96",
      "dataType": "FormTemplate",
      "id": "dc7e2924-7518-e211-92ad-000c29753f96",
      "name": "Purchase Requisition - Template",
      "modifyDate": "2014-11-04T12:22:16.377",
      "modifyById": "1b43c992-7318-e211-92ad-000c29753f96",
      "modifyBy": "{userName}",
      "createDate": "2012-10-17T09:10:18.277",
      "createById": "1b43c992-7318-e211-92ad-000c29753f96",
      "createBy": "{userName}",
      "description": "Purchase Requisition",
      "revisionId": "80183524-7518-e211-92ad-000c29753f96",
      "revision": 1,
      "templateRevision": "1",
      "status": 1
    },
    {
      "href": "~/formtemplates/66576d8b-7518-e211-92ad-000c29753f96",
      "dataType": "FormTemplate",
      "id": "66576d8b-7518-e211-92ad-000c29753f96",
      "name": "Employment Application - Template",
      "modifyDate": "2014-11-04T12:22:50.42",
      "modifyById": "1b43c992-7318-e211-92ad-000c29753f96",
      "modifyBy": "{userName}",
      "createDate": "2012-10-17T09:13:11.43",
      "createById": "1b43c992-7318-e211-92ad-000c29753f96",
      "createBy": "{userName}",
      "description": "Employment Application",
      "revisionId": "ffae728b-7518-e211-92ad-000c29753f96",
      "revision": 1,
      "templateRevision": "1",
      "status": 1
    }
  ]
}
Data Types: FormTemplate
Requests all Form Templates. 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 /formtemplates/{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 form template by 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}/formtemplates/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/demo/default/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/"
  },
  "data": [
    {
      "href": "~/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96",
      "dataType": "FormTemplate",
      "id": "dc7e2924-7518-e211-92ad-000c29753f96",
      "name": "Purchase Requisition - Template",
      "modifyDate": "2014-11-04T12:22:16.377",
      "modifyById": "1b43c992-7318-e211-92ad-000c29753f96",
      "modifyBy": "{userName}",
      "createDate": "2012-10-17T09:10:18.277",
      "createById": "1b43c992-7318-e211-92ad-000c29753f96",
      "createBy": "{userName}",
      "description": "Purchase Requisition",
      "revisionId": "80183524-7518-e211-92ad-000c29753f96",
      "revision": 1,
      "templateRevision": "1",
      "status": 1
    }
  ]
}
Data Types: FormTemplate
Requests the latest released revision of a form template by Form Template 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 Form Template Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /formtemplates/{id}/fields

#!/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 fields from a specific form template by 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}/formtemplates/{id}/fields
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/demo/default/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/fields/"
  },
  "data": {
    "fields": {
      "unit cost 1": "Unit Cost 1",
      "part 4": "Part 4",
      "manager approval": "Manager Approval",
      "justification": "Justification",
      "submiter": "Submiter",
      "revision 1": "Revision 1",
      "ext cost 1": "EXT Cost 1",
      "ext cost 4": "EXT Cost 4",
      "job": "Job",
      "supplier fax": "Supplier Fax",
      "president approval": "President Approval",
      "ext cost 5": "EXT Cost 5",
      "deliver to": "Deliver To",
      "unit of measure 3": "Unit of Measure 3",
      "cfo approval": "CFO Approval",
      "descripition 4": "Descripition 4",
      "unit cost 5": "Unit Cost 5",
      "supplier contact": "Supplier Contact",
      "supplier name": "Supplier Name",
      "supplier address": "Supplier Address",
      "unit of measure 4": "Unit of Measure 4",
      "descripition 2": "Descripition 2",
      "unit cost 6": "Unit Cost 6",
      "part 6": "Part 6",
      "part 2": "Part 2",
      "unit cost 3": "Unit Cost 3",
      "descripition 1": "Descripition 1",
      "part 3": "Part 3",
      "part 5": "Part 5",
      "revision 3": "Revision 3",
      "ext cost 3": "EXT Cost 3",
      "revision 6": "Revision 6",
      "unit of measure 6": "Unit of Measure 6",
      "unit of measure 5": "Unit of Measure 5",
      "ext cost 2": "EXT Cost 2",
      "part 1": "Part 1",
      "revision 2": "Revision 2",
      "revision 5": "Revision 5",
      "qty5": "Qty5",
      "department": "Department",
      "total": "Total",
      "revision 4": "Revision 4",
      "qty2": "Qty2",
      "unit cost 4": "Unit Cost 4",
      "qty4": "Qty4",
      "qty6": "Qty6",
      "supplier phone": "Supplier Phone",
      "descripition 3": "Descripition 3",
      "unit of measure 2": "Unit of Measure 2",
      "descripition 6": "Descripition 6",
      "descripition 5": "Descripition 5",
      "ext cost 6": "EXT Cost 6",
      "unit of measure 1": "Unit of Measure 1",
      "po number": "PO Number",
      "qty1": "Qty1",
      "qty3": "Qty3",
      "unit cost 2": "Unit Cost 2",
      "revisionid": "DhID",
      "instancename": "DhDocID",
      "modifydate": "VVModifyDate",
      "modifyby": "VVModifyBy",
      "modifybyid": "VVModifyByUsID",
      "createdate": "VVCreateDate",
      "createby": "VVCreateBy",
      "createbyid": "VVCreateByUsID"
    },
    "baseFields": [
      "RevisionId",
      "InstanceName",
      "ModifyDate",
      "ModifyById",
      "ModifyBy",
      "CreateDate",
      "CreateById",
      "CreateBy"
    ]
  }
}
Requests the form fields of a form template by Form Template 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 Form Template Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /formtemplates/{id}/forms

#!/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 form instances from a form template by 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}/formtemplates/{id}/forms
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/demo/default/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/forms/"
  },
  "data": [
    {
      "href": "~/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/forms/a6aae3c1-e16d-e511-80d0-0050568dfc50",
      "dataType": "FormInstance",
      "revisionId": "a6aae3c1-e16d-e511-80d0-0050568dfc50",
      "instanceName": "Purchase Requisition TEMPL-1"
    },
    {
      "href": "~/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/forms/eb7aea47-e06d-e511-80d0-0050568d3d8b",
      "dataType": "FormInstance",
      "revisionId": "eb7aea47-e06d-e511-80d0-0050568d3d8b",
      "instanceName": "Purchase Requisition TEMPL-2"
    }
  ]
}
Data Types: FormInstance
Requests form instances of a form template by Form Template 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 Form Template Id
password string Password from Visual Vault
userName string User Name from Visual Vault

GET /formtemplates/{id}/forms/{revisionId}

#!/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 instance of a specific form template by 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}/formtemplates/{id}/forms/{revisionId}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/demo/default/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/forms/8884bd14-e06d-e511-80d0-0050568d3d8b"
  },
  "data": [
    {
      "href": "~/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/forms/8884bd14-e06d-e511-80d0-0050568d3d8b",
      "dataType": "FormInstance",
      "revisionId": "8884bd14-e06d-e511-80d0-0050568d3d8b",
      "instanceName": "Purchase Requisition TEMPL-1"
    }
  ]
}
Data Types: FormInstance
Requests a form instance by Form Template Id and Form Template 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
id guid Form Template Id
password string Password from Visual Vault
revisionId guid Form Template Revision Id
userName string User Name from Visual Vault

POST /formtemplates/{id}/forms

#!/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 an instance of a form, and fill out the form fields from a form template by id using token as a variable named AccessToken curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "formField1": "User input data", "formField2": "More sample data" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/formtemplates/{id}/forms
{
  "meta": {
    "status": 201,
    "statusMsg": "Created",
    "method": "POST",
    "href": "https://demo.visualvault.com/api/v1/demo/default/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/forms/"
  },
  "data": {
    "href": "~/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/forms/8884bd14-e06d-e511-80d0-0050568d3d8b",
    "dataType": "FormInstance",
    "revisionId": "8884bd14-e06d-e511-80d0-0050568d3d8b",
    "instanceName": "Purchase Requisition TEMPL-1",
    "modifyDate": "2015-10-08T10:14:51.773",
    "modifyById": "1b43c992-7318-e211-92ad-000c29753f96",
    "modifyBy": "",
    "createDate": "2015-10-08T10:14:51.773",
    "createById": "1b43c992-7318-e211-92ad-000c29753f96",
    "createBy": "{userName}"
  }
}
Data Types: FormInstance
Creates a new instance of a Form Template by Form Template Id. To fill out the form, fill in the form fields in the body of the request as displayed.
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 Form Template Id
password string Password from Visual Vault
userName string User Name from Visual Vault

POST /formtemplates/{id}/forms/{revisionId}

#!/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 revision of a specific instance of a specific form template by id using token as a variable named AccessToken curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "formField1": "Revised user input data", "formField2": "Revised sample data", "formField3": "Added field" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/formtemplates/{id}/forms/{revisionId}
{
  "meta": {
    "status": 201,
    "statusMsg": "Created",
    "method": "POST",
    "href": "https://demo.visualvault.com/api/v1/demo/default/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/forms/8884bd14-e06d-e511-80d0-0050568d3d8b"
  },
  "data": {
    "href": "~/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96/forms/a6aae3c1-e16d-e511-80d0-0050568dfc50",
    "dataType": "FormInstance",
    "instanceName": "Purchase Requisition TEMPL-1",
    "revisionId": "a6aae3c1-e16d-e511-80d0-0050568dfc50"
  }
}
Data Types: FormInstance
Creates a new revision of a form instance by Form Template Id and Form Template 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
id guid ID of the form template
password string Password from Visual Vault
revisionId guid Form Template Revision Id
userName string User Name from Visual Vault