Standard Response Format

Whenever a service needs to simply return a success or an error without conveying any additional information, it will use one of the formats below.

Success without resource creation

The HTTP response status code is in the range of 200-299.
{
    "D": {
        "Success": true
    }
}

Success with resource creation

The HTTP response status code is in the range of 200-299. ResourceUri indicates the path to the newly-created resource.
{
    "D": {
        "Success": true,
        "Results": [
            {
                "ResourceUri": "/servicename/XXXXX"
            }
        ]
    }
}

Accepted for future processing

The HTTP response status code is always 202 (Accepted). When API resources reply with a 202: Accepted, the requested data creation or update is scheduled for future processing.
{
    "D": {
        "Success": true
    }
}

Success with data version

The HTTP response status code is in the range of 200-299. For resources that support it, the Version attribute can used in the versions subresource to return the data to a previous state state. Note that many resources have an expiration after which the version cannot be restored. When deleting data, the version returned points to the data at a state just before deletion, and can be used to restore the data from deletion.
{
    "D": {
        "Success": true,
        "Version": 1
    }
}

Failure

The HTTP response status code is not in the range of 200-299. Available Code and Message values are documented on the Spark API error code page. Codes are provided so API clients may handle errors more easily than by parsing a message.
{
    "D": {
        "Success": false,
        "Code": 1234,
        "Message": "Spark API message describing the problem"
    }
}