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"
            }
        ]
    }
}

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"
    }
}