Entity JSON

/config operations use JSON data to represent V‑Spark entities that resemble these examples.

/config

The sample JSON in this section shows sample output for a single company from the /config API.

"DocTestCo": {
    "allowedmodels": [
        "eng1:callcenter",
        "spa1:spa1_callcenter"
    ],
    "apptemplate": [
        "Agent Scorecard",
        "Call Categorization",
        "Call Drivers",
        "Customer Experience"
    ],
    "cloudtoken": "",
    "cloudmodels": [],
    "created": "2017-05-18",
    "limithours": -1,
    "name": "Doc Test Co",
    "retention": -1,
    "status": "OK",
    "servers": [
        "asrsrvr1"
    ],
    "uuid": "077d93ffd9b902b2cb7c6a0c521fd42c"
},...
Note: Sample JSON files in this document use ellipses ( ... ) to indicate where more than one of a certain type of section can be present in a JSON file of that type.

This excerpt from the output of calling the /config API is very similar to the output that you would have received had you requested information about a single company by calling an API such as the /config/DocTestCo API on a V‑Spark installation where the "Doc Test Co" company (with the company short name, "DocTestCo") had been defined. The latter call would have returned the following, which differs only in that it does not need to identify the short name of the company that it refers to because it was specified in the URL.

{
    "uuid": "077d93ffd9b902b2cb7c6a0c521fd42c",
    "name": "Doc Test Co",
    "created": "2018-06-07",
    "limithours": -1,
    "cloudtoken": "",
    "cloudmodels": [],
    "allowedmodels": [
        "eng1:callcenter",
        "spa1:callcenter"
    ],
    "servers": [
        "asr-wvh.office.company.com",
        "asrsrvr1",
        "asrsrvr8",
        "http://asrsrvr8:17171"
    ],
    "retention": -1,
    "apptemplate": [
        "Agent Scorecard",
        "Call Categorization",
        "Call Drivers",
        "Customer Experience"
    ],
    "status": "OK"
}
Table 1. /config/CO_SHORT Fields

Name

Type

Values

Description

uuid

Read-Only String

33 character token

The authorization token for this company. Use the uuid to retrieve or modify data about any organization, folder, apps, or user that have been defined under this company. This field is added by V‑Spark when the company is created.

"uuid": "077d93ffd9b902b2cb7c6a0c521fd42c"

name

REQUIRED string when creating a new company

The full display name of the company.

"name": "Doc Test Co"

created

Read-Only String

Date, in YYYY-MM-DD format

The year, month, and day that the company was created in V‑Spark. This field is added by V‑Spark when the company is created.

"created": "2018-06-07"

limithours

REQUIRED Integer when creating a new company

" -1 " = no limit

The maximum number of audio hours this company can process through V‑Spark. Once that limit has been reached, the company can no longer process new audio, but users can still use V‑Spark to examine existing calls.

"limithours": -1

servers

REQUIRED list of strings if cloudtoken is not set

Hostnames or URLs

Networked computers this company uses as hosts for ASR. This field should only be set if cloudtoken is not set.

"servers": [
    "asr-wvh.office.company.com",
    "asrsrvr1",
    "asrsrvr8",
    "http://asrsrvr8:17171"
]

allowedmodels

List of strings

Limited to installed models

Transcription models that are available to this company when processing audio on servers .

This field should only be set if servers is set.

"allowedmodels": [
    "eng1:callcenter",
    "spa1:callcenter"
]

cloudtoken

REQUIRED string if servers is not set

33 character token

The authorization token this company uses when connecting to V‑Cloud servers. If this company is using servers no cloud token will be listed.

If you are creating the company, and the company will be processing audio on V‑Cloud this field must be defined.

This field should only be set if servers is not set.

"cloudtoken": ""

cloudmodels

List of strings

Limited to installed models

Transcription models this company can use when processing audio on V‑Cloud servers.

This field should only be set if cloudtoken is set and custom models will be used.

"cloudmodels": []

retention

Integer REQUIRED when creating a new company

" -1 " = no limit

The maximum number of days transcription data can be retained by V‑Spark for organizations within this company before the data is deleted.

A value of -1 indicates that this company has no limit, and that data is retained indefinitely.

"retention": -1

apptemplate

List of strings

Limited to names of installed templates

This optional list defines the application templates that are available for this company.

"apptemplate": [
    "Agent Scorecard",
    "Call Categorization",
    "Call Drivers",
    "Customer Experience"
]

status

Read-Only string

OK , deleting , deleting ( PERCENTAGE )

DELETE status information about the company, useful for long-running operations such as a DELETE. A status of "OK" indicates that any operations on the company have completed their work.

"status": "OK"

/config/users

This excerpt is sample JSON output for a single user from /config/users.

"Testing": {
    "joe.user": {
        "auth": {
            "disabled": false,
            "verified": true,
            "method": "standard"
        },
        "company": "Testing",
        "email": "joeuser@example.com",
        "name": "Joe User",
        "permissions": {
            "DocTestCo": {
                "all": [
                    "read",
                    "write"
                ]
            },
            "Testing": {
                "all": [
                    "read"
                ],
                "orgs": {
                    "Testing-CallbackTest": [
                        "write"
                    ],
                    "Testing-ApplicationTesting": [
                        "write"
                    ]
                }
            }
        }
    }
}...

The identifier for each user account object is the username that identifies this account. When creating new user accounts, keep in mind that the username for each user in V‑Spark must be unique to the V‑Spark installation.

Table 2. /config/users Fields

Name

Type

Values

Description

auth

NA

The authorization status of this account and authentication method used to verify the identity of the user when they log in.

"auth": {
    "disabled": false,
    "verified": true,
    "method": "standard",
    "password": "4s+7yaRf"
},

disabled

Boolean

true, false

Either "false," denoting an active account, or "true," denoting an account that has been disabled or has not yet been enabled after creation.

verified

Boolean

true, false

Either "false," denoting a requested account that has not yet been approved, or "true," denoting an account that has been verified and approved by a System or Company admin.

method

standard, oidc

How the user's identity will be authenticated when they log in. A value of "standard" indicates that internal V‑Spark authentication is used. Any other value indicates the integrated authentication method that should be used.

password

String

Only be provided when creating a new account with standard authentication. This value will serve as the account's initial password.

company

String

REQUIRED when creating a new account. The short name of the company within which this account exists.

"company": "Testing",

email

String

REQUIRED when creating a new account. The fully qualified email address associated with this account.

The email address for each user in V‑Spark must be unique to the V‑Spark installation.

"email": "joeuser@example.com",

name

String

REQUIRED when creating a new account. The name of the person who uses this account.

"name": "Joe User",

permissions

Permissions that this user account has for the companies and organizations in the V‑Spark installation.

In the following example, the user account has read and write permissions to all organizations within the "DocTestCo" company, read permissions to all organizations within the "Testing" company, and additional write permissions to the "CallbackTest" and "ApplicationTesting" organizations that are within the "Testing" company.

"permissions": {
    "DocTestCo": {
        "all": [
            "read",
            "write"
        ]
    },
    "Testing": {
        "all": [
            "read"
        ],
        "orgs": {
            "Testing-CallbackTest": [
                "write"
            ],
            "Testing-ApplicationTesting": [
                "write"
            ]
        }
    }
}

The output shown in the previous excerpt is very similar to the first part of the output that you would have received had you called the /config/TestCompany/users API on a V‑Spark installation where the "Test Company, Inc." company (with the company short name, "Testcompany") had been defined. The call would have returned JSON, which only differs from the previous excerpt in that it does not need to identify the short name of the company that it refers to, since you have specified that value in the URL.

The identifier for each user account object is the username that identifies this account. When creating new user accounts, keep in mind that the username for each user in V‑Spark must be unique to the V‑Spark installation.

This next excerpt shows sample JSON output for a single user from /config/{$CO-SHORT}/users.

{
    "joe.user": {
        "company": "Testing",
        "email": "joe.user@company.com",
        "name": "Joe User",
        "auth": {
            "disabled": false,
            "verified": true,
            "method": "standard"
        },
        "permissions": {
            "DocTestCo": {
                "all": [
                   "read",
                   "write"
                ]
            },
        },...
    }
}

Example /config/users/ JSON

 {
   "test.user.07": {
       "auth": {
          "disabled": false,
          "verified": true,
          "method": "standard"
       },
       "company": "DocTestCo",
       "email": "test.user.07@example.com",
       "name": "Another Automated Test User",
       "permissions": {
           "DocTestCo": {
               "all": [
                   "read",
                   "write"
               ]
           }
       }
   }...
 }

/config/system/readonly

Important: Because only the /readonly API exists under /config/system , there is no more general /config/system API. Attempting to GET, POST, or DELETE to the /config/system API directly will return HTTP error code 400.

Readonly mode enables administrators to perform maintenance or diagnose performance problems while a V‑Spark installation is still running. While a V‑Spark system is in readonly mode, no new data can be processed and no changes can be made to the V‑Spark installation. V‑Spark can still be used to examine existing data that has already been processed.

The /config/system/readonly API reports on the readonly status of the system, and displays the system-wide message that will be shown in V‑Spark to notify users that the system has been put into readonly mode.

{
   "message": "Sample message about readonly mode",
   "status": false
}
Table 3. /config/system/readonly Fields

Name

Type

Values

Description

message

String

When any user logs into this V‑Spark installation while the system is in readonly mode, this message will be displayed.

"message": "Sample message about readonly mode",

status

If set to "true," the system is in read-only mode. Putting a V‑Spark installation into read-only mode only affects the V‑Spark installation. The rest of the processes on the host where V‑Spark is installed continue to operate normally.

If set to "false," the system is not in read-only mode.

"status": false

/config/orgs

The first JSON excerpt in this section shows sample output for a single organization from the /config/orgs API.

"DocTestCo": {
    "DocTestCo-DocTesting": {
        "company": "DocTestCo",
        "created": "2017-05-18",
        "name": "Doc Testing",
        "retention": -1,
        "status": "OK",
        "timezone": "US/Eastern"
    },...
},...

When creating a new organization using the /config/orgs API, all fields that are not read-only are required.

Table 4. /config/orgs Fields

Name

Type

Values

Description

company

Required String when creating

The "short name" of the company to which the organization belongs.

"company": "DocTestCo",

created

Read-Only String

The date, in YYYY-MM-DD format, that the organization was created.

This field is added by V‑Spark when the organization is created.

"created": "2017-05-18",

name

String

The full display name of the organization.

"name": "Doc Testing",

retention

The maximum number of days transcription data is retained by V‑Spark for this organization before the data is deleted. The retention period specified for the organization must be less than or equal to the retention period of the organization's owning company. A value of -1 indicates that this organization has no limit, and that data is retained indefinitely.

"retention": -1,

status

High-level status information about the organization, useful for long-running operations such as a DELETE. A status of "OK" indicates that any operations on the organization have completed their work.

"status": "OK",

timezone

The time zone in which this organization should be considered to exist. This is usually the time zone of the main office of the organization. This does not just affect the time and date as displayed in V‑Spark, but also affects the time at which certain actions (such as report generation) occur. This value must be a valid "TZ database name" for a time zone. Refer to the List of tz database time zones for more information.

"timezone": "US/Eastern"

The excerpt from the output of calling the /config/orgs API shown previously is very similar to the output that you would have received had you requested information about a single organization by calling an API URL such as the /config/DocTestCo/DocTestCo-DocTesting API on a V‑Spark installation where the "Doc Test Co" company and "Doc Testing" organization (with the company short name, "DocTestCo" and the Organization short name of "DocTestCo-DocTesting") had been defined.

The latter call would have returned JSON like the sample below, which differs only from the output shown previously in that it does not need to identify the short name of the company and organization that it refers to because it was specified in the URL.

{
          "company": "DocTestCo",
          "created": "2017-05-18",
          "name": "Doc Testing",
          "retention": -1,
          "timezone": "US/Eastern"
          }

/config/folders

The following JSON shows sample output for a single folder from the information retrieved via the /config/folders API.

"DocTestCo": {
    "DocTestCo-DocTesting": {
        "Test01": {
            "apps": [],
            "asroptions": {
                "billing": "customerX"
            },
            "audiotype": "Mono",
            "callback": {
                "aws_id": "123456789012345678901",
                "aws_secret": "123456789012345678901/12345678901234567890",
                "posturl": "S3:///joeuser/test",
                "sendaudio": "no",
                "sendtext": "no"
            },
            "created": "2017-05-18",
            "custom_meta": [],
            "mode": "active",
            "modelchan0": "eng1:callcenter",
            "nspeakers": 1,
            "purifyaudio": true,
            "purifytext": true,
            "status": "OK",
            "servers": [
                "asrsrvr1"
            ]
        },...
    },...
},...

When creating a new folder using the /config/folders API, all fields that are not read-only are required.

Table 5. /config/folders Fields

Name

Type

Values

Description

apps

Applications that are linked to this folder that will analyze this folder's content.

"apps": [],

asroptions

ASR stream tags that have been added to this folder. Tags are parameters that affect transcription requests.

"asroptions": {
    "billing": "customerX"
},

audiotype

REQUIRED when creating a new folder

Whether the audio is two-channel ("Stereo") or single-channel ("Mono") audio.

"audiotype": "Mono",

callback

Callback options for transcript delivery.

"callback": {
    "aws_id": "123456789012345678901",
    "aws_secret": "123456789012345678901/12345678901234567890",
    "posturl": "S3:///joeuser/test",
    "sendaudio": "no",
    "sendtext": "no"
},

posturl

The path that V‑Spark will use to deliver transcripts and other information. This URL must start with a valid protocol, (such as "http://", "https://", "file://", "sftp://", or "s3://") and include any needed hostname, port number, and file system path.

aws_id

REQUIRED if posturl is set to an "s3://" URL.

Your AWS access key id.

aws_secret

REQUIRED if posturl is set to an "s3://" URL.

Your AWS secret access key.

username

REQUIRED if posturl is set to an "sftp://" URL and sshprivatekey is not set.

The username on the remote system that V‑Spark should use to log in.

password

REQUIRED if posturl is set to an "sftp://" URL, and sshprivatekey is not set.

The login password of the username account on the remote system,

sshprivatekey

REQUIRED

The ssh private key of the username account on the remote system This setting is REQUIRED if posturl is set to an "sftp://" URL, and username & password are not set.

sendaudio

REQUIRED if posturl is set.

yes, no

If set to "yes," V‑Spark will send an MP3 version of the transcribed audio file to the callback server.

sendtext

REQUIRED if posturl is set.

yes, no

If set to "yes," V‑Spark will send a plain text version of the transcribed audio file to the callback server.

created

READ-ONLY Date, in YYYY-MM-DD format

The date that the folder was created. This field is added by V‑Spark when the folder is created, and is read-only.

"created": "2017-05-18",

custom_meta

Custom metadata fields that are associated with this folder.

"custom_meta": [
    "client name",
    "phone number"
],

mode

active (default), paused

The mode field in the JSON output for a Folder indicates whether processing of that folder is "active" or "paused." Use the /config/folders API to pause and resume processing of the folder. Pause the processing of a Folder by POSTing a JSON configuration file for the Folder that has the mode property of the Folder set to the value paused . Resume processing by POSTing JSON for the Folder that has the mode property set to active . You will not be able to set Folder processing to active if the Folder has been paused due to company-level policies such as the processing hours limit being met.

"mode": "active",

modelchan0

Acceptable values are limited to the names of the language models you are licensed to use. All language models work with all supported audio formats.

The language model to use when processing audio on Channel 0, which is the left channel if you are processing stereo audio.

"modelchan0": "eng1:callcenter",

modelchan1

Acceptable values are limited to the names of the language models you are licensed to use. All language models work with all supported audio formats.

The language model to use when processing audio on Channel 1, which is the right channel if you are processing stereo audio. If this folder is not configured to process stereo audio, you will not have a modelchan1 .

"modelchan1": "spa1:callcenter",

agentchan

If this folder is configured to process stereo audio, the value of this field must be either "0" or "1," indicating the audio channel that contains agent speech.

"agentchan": "0",

nspeakers

REQUIRED when creating a new folder.

The number of speakers in the audio files that are going to be placed into the folder.

This option cannot be modified after the folder is created.

"nspeakers": 1,

purifyaudio

Boolean

true, false

If set to "true," processing cleans the generated audio MP3 of any locations where numbers exist for Payment Card Information (PCI) or other sensitive numbers that are in the audio source so that these numbers cannot be heard. If set to "false," audio is not scrubbed.

This option cannot be modified after the folder is created.

"purifyaudio": true,

purifytext

Boolean

true, false

If set to "true," processing cleans the text transcript of any numbers for Payment Card Information (PCI) or other sensitive numbers that are in the audio source. If set to "false," text is not scrubbed.

This option cannot be modified after the folder is created.

"purifytext": true,

status

High-level status information about the folder, useful for long-running operations such as a DELETE.

A status of "OK" indicates that any operations on the folder have completed their work.

"status": "OK",

servers

The name(s) of the V‑Spark servers that will be used for ASR.

You must specify at least one server or vcloud: cloudtoken statement.

"servers": [
                  "asrsrvr1"

The excerpt from the output of calling the /config/folders API shown previously is very similar to the output that you would have received had you requested information about a single folder by calling an API URL such as the /config/DocTestCo/DocTestCo-DocTesting/Test01 API on a V‑Spark installation where the "Doc Test Co" company, the "Doc Testing" organization, and the folder "Test01" (with the company short name, "DocTestCo," the Organization short name of "DocTestCo-DocTesting," and the folder name of "Test01") had been defined.

The latter call would have returned JSON like the sample below, which differs only from the output shown previously in that it does not need to identify the short name of the company, the short name of the organization, or the name of the folder that it refers to because they are specified in the URL.

{
    "apps": [],
    "asroptions": {
        "billing": "DocTestCo-DocTesting-Test01"
    },
    "audiotype": "Mono",
    "callback": {
        "aws_id": "0SAMPLEVALUED0N0TUSE",
        "aws_secret": "ThisIsAlsoASample000/NotARealAWSSecret00",
        "posturl": "S3:///wvh/test",
        "sendaudio": "no",
        "sendtext": "no"
    },
    "created": "2017-05-18",
    "custom_meta": [],
    "mode": "active",
    "modelchan0": "eng1:callcenter",
    "nspeakers": 1,
    "purifyaudio": true,
    "purifytext": true,
    "servers": [
        "asrsrvr1"
    ]
}

/config/apps

The following sample JSON output is for a single application from the /config/apps API for the applications that have been defined for a single organization.

"DocTestCo": {
    "DocTestCo-DocTesting": {
        "Admin App": {
            "created": "2017-06-23",
            "defaultscoretype": "Hit/Miss",
            "enabled": "on",
            "folders": [
                "Test01"
            ],
            "template": "custom"
        },...
    },...
},...
Table 6. /config/apps Fields

Name

Type

Values

Description

created

READ-ONLY date, in YYYY-MM-DD format

The date that the application was created. This field is added by V‑Spark when the application is created.

"created": "2017-06-23",

defaultscoretype

The default type of score to use for categories that are created within this application. Values for this field are "Coverage" or "Hit/Miss."

For more information on the meanings of these score types, refer to the V‑Spark Application Development Guide.

"defaultscoretype": "Hit/Miss",

enabled

Whether or not this application is actively scoring new file uploads to the folders it scores. Values are "on" and "off." Disabled ("off") applications can still be edited and their existing results viewed, but no new results will be created until the application is re-enabled.

"enabled": "on",

folders

The name(s) of the folder(s) this application will score.

"folders": [
"Test01"
],

template

REQUIRED when creating a new application.

The name of the application template on which this application is based, or "custom" indicating that this application is not based on a pre-defined template.

The template option to Copy from existing organization is not supported in the API.

"template": "custom"

The excerpt from the output of calling the /config/apps API shown previously is very similar to the output that you would have received had you made a request about the applications that are associated with an organization by calling an API URL such as /config/DocTestCo/DocTestCo-DocTesting/apps/Admin%20App API, as shown in the next sample JSON.

This sample output is from a V‑Spark installation where the "Doc Test Co" company and the "Doc Testing" organization (with the company short name, "DocTestCo" and the Organization short name of "DocTestCo-DocTesting"), and the Application "Admin App" were previously defined. This output differs only in that it does not need to identify the short name of the company, organization, and application that it refers to, since test values were specified in the URL.

{
    "created": "2017-06-23",
    "defaultscoretype": "Hit/Miss",
    "enabled": "on",
    "folders": [
        "Test01"
    ],
    "template": "custom"
}
Note: Application names can contain spaces, which must be URL-encoded by replacing them with %20 when specifying the name of an application as part of a URL.