IndexFields Endpoint

GET /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"]') # run command to request index field definitions 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}/indexfields
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "GET",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/indexfields"
  },
  "data": [
    {
      "href": "~/indexfields/a2ab7930-2335-e411-b405-005056806ba3",
      "dataType": "IndexFieldDefinition",
      "pkey": 5,
      "id": "a2ab7930-2335-e411-b405-005056806ba3",
      "fieldType": 7,
      "label": "Assigned User",
      "description": "User Assigned to a task.",
      "required": true,
      "connectionId": "00000000-0000-0000-0000-000000000000",
      "queryId": "00000000-0000-0000-0000-000000000000",
      "queryDisplayField": "",
      "queryValueField": "",
      "dropDownListId": "00000000-0000-0000-0000-000000000000",
      "defaultValue": "",
      "createDate": "2014-09-05T17:36:39.137",
      "createById": "1b43c992-7318-e211-92ad-000c29753f96",
      "createBy": "{userName]",
      "modifyDate": "2014-09-23T19:37:16.203",
      "modifyById": "1b43c992-7318-e211-92ad-000c29753f96",
      "modifyBy": "{userName]"
    },
    {
      "href": "~/indexfields/ef84cc51-711e-e411-84d6-005056806ba3",
      "dataType": "IndexFieldDefinition",
      "pkey": 3,
      "id": "ef84cc51-711e-e411-84d6-005056806ba3",
      "fieldType": 1,
      "label": "Business Owner",
      "description": "Person in the business who owns the document",
      "required": false,
      "connectionId": "00000000-0000-0000-0000-000000000000",
      "queryId": "00000000-0000-0000-0000-000000000000",
      "queryDisplayField": "",
      "queryValueField": "",
      "dropDownListId": "00000000-0000-0000-0000-000000000000",
      "defaultValue": "",
      "createDate": "2014-08-07T20:27:59.03",
      "createById": "1b43c992-7318-e211-92ad-000c29753f96",
      "createBy": "{userName]",
      "modifyDate": "2014-09-05T17:35:43.633",
      "modifyById": "1b43c992-7318-e211-92ad-000c29753f96",
      "modifyBy": "{userName]"
    }
  ],
  "pagination": {
    "dataType": "PagedData",
    "href": "",
    "first": "",
    "last": "",
    "limit": 200,
    "next": "",
    "previous": "",
    "totalRecords": 11
  }
}
Data Types: IndexFieldDefinition
Requests index field definitions. 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

POST /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"]') # run command to create an index field definition using token as a variable named AccessToken # the following fields below in the content are required to perform this request. curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "label": "Departments List", "description": "list of departments", "fieldType": 2, "queryId": "00000000-0000-0000-0000-000000000000", "dropdownListId": "d19af16a-3678-e511-bf00-bfff3cb84a46", "queryValueField": "", "queryDisplayField": "", "required": true, "defaultValue": "Working" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/indexfields
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "POST",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/IndexFields/"
  },
  "data": {
    "href": "~/indexfields/0ca8c2ae-3778-e511-bf00-bfff3cb84a46",
    "dataType": "IndexFieldDefinition",
    "pkey": 2,
    "id": "0ca8c2ae-3778-e511-bf00-bfff3cb84a46",
    "fieldType": 2,
    "label": "Departments List",
    "description": "list of departments",
    "required": true,
    "connectionId": "00000000-0000-0000-0000-000000000000",
    "queryId": "00000000-0000-0000-0000-000000000000",
    "queryDisplayField": "",
    "queryValueField": "",
    "dropDownListId": "d19af16a-3678-e511-bf00-bfff3cb84a46",
    "defaultValue": "Working",
    "createDate": "2015-10-21T14:07:06.52",
    "createById": "5eefec33-ca71-e511-befe-98991b71acc0",
    "createBy": "{userName}",
    "modifyDate": "2015-10-21T14:07:06.52",
    "modifyById": "5eefec33-ca71-e511-befe-98991b71acc0",
    "modifyBy": "{userName}"
  }
}
Data Types: IndexFieldDefinition
Creates an index field definition. All fields in the request are mandatory fields for request. Though only queryId or dropdownlistId (but not both) must be not null to define an index field definition.
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 /indexfields/{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 update an index field definition by Index Field Definition Id curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ "label": "Changed Departments List", "description": "list of departments", "queryId": "d19af16a-3678-e511-bf00-bfff3cb84a46", "dropdownListId": "d19af16a-3678-e511-bf00-bfff3cb84a46", "queryValueField": "", "queryDisplayField": "", "required": true, "defaultValue": "Changed Default Value" }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/indexfields/{id}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "PUT",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/IndexFields/0ca8c2ae-3778-e511-bf00-bfff3cb84a46"
  },
  "data": {
    "href": "~/indexfields/0ca8c2ae-3778-e511-bf00-bfff3cb84a46",
    "dataType": "IndexFieldDefinition",
    "pkey": 2,
    "id": "0ca8c2ae-3778-e511-bf00-bfff3cb84a46",
    "fieldType": 2,
    "label": "Changed Departments List",
    "description": "list of departments",
    "required": true,
    "connectionId": "00000000-0000-0000-0000-000000000000",
    "queryId": "d19af16a-3678-e511-bf00-bfff3cb84a46",
    "queryDisplayField": "",
    "queryValueField": "",
    "dropDownListId": "d19af16a-3678-e511-bf00-bfff3cb84a46",
    "defaultValue": "fun in the sun",
    "createDate": "2015-10-21T14:07:06.52",
    "createById": "5eefec33-ca71-e511-befe-98991b71acc0",
    "createBy": "{userName}",
    "modifyDate": "2015-10-22T15:32:56.207",
    "modifyById": "5eefec33-ca71-e511-befe-98991b71acc0",
    "modifyBy": "{userName}"
  }
}
Data Types: IndexFieldDefinition
Updates an index field definition by Index Field Definition Id. All fields in the body of the request are mandatory fields.
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 Index Field Defintion Id
password string Password from Visual Vault
userName string User Name from Visual Vault

PUT /indexfields/{id}/folders/{folderId}

#!/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"]') # relates an index field definition to a folder curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ -d '{ }' \ https://demo.visualvault.com/api/v1/{customeralias}/{databasealias}/indexfields/{id}/folders/{folderId}
{
  "meta": {
    "status": 200,
    "statusMsg": "OK",
    "method": "PUT",
    "href": "https://demo.visualvault.com/api/v1/{customerAlias}/default/IndexFields/0ca8c2ae-3778-e511-bf00-bfff3cb84a46/folders/114c71af-4778-e511-bf00-bfff3cb84a46"
  },
  "data": {
    "href": "~/folders/114c71af-4778-e511-bf00-bfff3cb84a46/indexfield/0ca8c2ae-3778-e511-bf00-bfff3cb84a46",
    "dataType": "FolderIndexField",
    "id": "0ca8c2ae-3778-e511-bf00-bfff3cb84a46",
    "definitionPkey": 2,
    "folderId": "114c71af-4778-e511-bf00-bfff3cb84a46",
    "fieldType": 2,
    "label": "Departments List",
    "description": "list of departments",
    "ordinalPosition": 2,
    "folderOrdinalPosition": 0,
    "required": true,
    "connectionId": "00000000-0000-0000-0000-000000000000",
    "queryId": "00000000-0000-0000-0000-000000000000",
    "queryDisplayField": "",
    "queryValueField": "",
    "dropDownListId": "d19af16a-3678-e511-bf00-bfff3cb84a46",
    "defaultValue": "fun in the sun",
    "globalRequired": true,
    "globalConnectionId": "00000000-0000-0000-0000-000000000000",
    "globalQueryID": "00000000-0000-0000-0000-000000000000",
    "globalQueryValueField": "",
    "globalQueryDisplayField": "",
    "globalDropDownListId": "d19af16a-3678-e511-bf00-bfff3cb84a46",
    "globalDefaultValue": "fun in the sun",
    "createDate": "2015-10-21T21:07:06.52",
    "createById": "5eefec33-ca71-e511-befe-98991b71acc0",
    "createBy": "{userName}",
    "modifyDate": "2015-10-21T21:07:06.52",
    "modifyById": "5eefec33-ca71-e511-befe-98991b71acc0",
    "modifyBy": "{userName}"
  }
}
Data Types: FolderIndexField
Relates an index field definition to a folder by Index Field Definition Id and Folder 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
folderId guid Folder Id
id guid Index Field Defintion Id
password string Password from Visual Vault
userName string User Name from Visual Vault