Skip to main content
Skip table of contents

Input API function

Before using the functions on this page, you may find it useful to review the following information:

The list of all functions is here.

Description of this function

  • Push a new or existing base case

  • Get a base case

OnLoadSampleCase() - Load a case function

Before pushing a case, it should be loaded in JSON format. A sample case data has been provided in the sample case to test.

function OnLoadSampleCase() {
    $("#resultjson").show().html(JSON.stringify(sampleCase, null, 2));
    $("#apiresult").html("Sample case loaded.");

OnPushCase() function - Push a new or existing case

Getting a case returns the JSON in the same format as is used when pushing a case, hence this can be useful for testing. If you want to round trip, you would first push the case then get the case and compare the JSON returned with what was submitted. To push a new case, caseId value is null.

function OnPushCase() {// Test 7
    var caseId = $('#newcaseid').val();
    var url = '/service/pushcase';
    if (caseId)
        url += '?caseId=' + caseId;
    var data = JSON.parse($("#resultjson").html());
    OnGetJson(url, data);

OnGetExistingCase() function - Get a case

This retrieves the current case as set by SetCase. It returns JSON in the new API format.

function OnGetExistingCase() {// Test 8

Get YAML specification

This retrieves the current case as set by SetCase in YAML format.

function OnGetYaml() {// Test 8
    window.location = _baseUrl + "/service/getyaml?id=" + _uuid;
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.