V-Spark Online Help

Sample JSON Output from the /list API

The /list API returns a high-level JSON representation of the V‑Spark installation that is being queried. The following sections describe the JSON output from the /list API for each aspect of a V‑Spark installation:

Sample /list JSON Output for Companies

The following is an example of output produced by the /list API for the companies in a V‑Spark installation:

[
    "TestCompany",
    "Testing",
    "DocTestCo",
    "WebAPITest",
    "Limitedhours",
    "CNCO",
    "JWebAPITest"
]

The /list API enables code to quickly extract a high-level view of the companies in a V‑Spark installation, but does not itself provide enough information for you to drill down into that installation.

Sample /list/orgs JSON Output for a Company

The following is sample output for a single company from the /list/orgs API:

"DocTestCo": [
    "DocTestCo-DocTesting"
],...

In the same way that you can use the /config/CO_SHORT/orgs API to retrieve information about the organizations within a company in a V‑Spark installation, you can use the /list/CO_SHORT/orgs API to retrieve the names of the organizations within a company, as shown in the following example, which was produced by calling the /list/DocTestCo/orgs URL, and lists the organizations that have been defined within a sample company known as DocTestCo:

[
    "DocTestCo-DocTesting"
]

Tip

This example was produced by passing /list/DocTestCo as the API-TO-CALL parameter to the sample code shown in Using GET with Python and the /config API. Although that example was used to show calling the /config API, it can just as easily be used to call the /list API.

Important

The /list/CO_SHORT and /list/CO_SHORT/orgs API calls produce identical output. This is by design, because the only editable V‑Spark items that are directly located under a specific company are the organizations that have been defined within that company.

Sample /list/folders JSON Output for a Company

The following is sample output for a single folder in a sample V‑Spark installation, produced as part of a call to the /list/folders API:

"DocTestCo": {
    "DocTestCo-DocTesting": [
        "Test01"
    ]
},...

In the same way that you can use the /config/CO_SHORT/ORG_SHORT/folders API to retrieve detailed information about the folders that have been defined within an organization, you can use the /list/CO_SHORT/ORG_SHORT/folders API to retrieve the names of such folders, as shown in the following example, which was produced by calling the /list/DocTestCo/DocTestCo-DocTesting/folders URL, and lists the folders that have been defined for the DocTestCo-DocTesting organization within a sample company known as DocTestCo:

[
    "Test01"
]

Note

In this case, only one folder has been defined within the DocTestCo-DocTesting organization. If multiple folders had been defined within that organization, all of their names would be displayed by the output of this command.

Tip

This example was produced by passing /list/DocTestCo/DocTestCo-Doc-Testing as the API-TO-CALL parameter to the sample code shown in Using GET with Python and the /config API. Although that example was used to show calling portions of the /config API, it can just as easily be used to call portions of the /list API.

Sample /list/apps JSON Output

The following is sample output for the applications that are associated with companies from the output of the /list/apps API for a V‑Spark installation:

"DocTestCo": {
    "DocTestCo-DocTesting": [
        "Testing CallbackTest",
        "Manager App",
        "Admin App"
    ]
},...

In the same way that you can use the /config/CO_SHORT/apps API to retrieve information about the applications that have been defined within a company in a V‑Spark installation, you can use the /list/CO_SHORT/apps API to retrieve the names of the applications within a company, as shown in the following example, which was produced by calling the /list/DocTestCo/apps URL, and lists the applications that have been defined within a sample company known as DocTestCo:

[
    "Testing CallbackTest",
    "Manager App",
    "Admin App"
]
Sample /list/users JSON Output for an Installation

The following is sample output for the users in a V‑Spark installation from the /list/users API:

"DocTestCo": [
    "joe.user",
    "bill.generic"
],

To extract this same information in a company-specific way, you could call the /list/CO_SHORT/users API to extract information about the users that have been defined within the CO_SHORT company. For example, calling the /list/DocTestCo/users API directly in the same sample V‑Spark installation would produce the following output:

[
    "joe.user",
    "bill.generic"
]