Skip to content
Maksim Liauchuk edited this page Oct 19, 2013 · 8 revisions

Description

Represents Gravifon application response information.

Attributes

Name Request Response Type Restrictions Description
ok N/A Required boolean - Response status: true means request successfully processed, false indicates that an issue took place (error_code and error_description attributes are populated in this case).
error_code N/A Optional number - Code of particular request processing error.
error_description N/A Optional string - Human readable error description.
id N/A Optional string - Entity identifier. Filled if Create method was successfully processed.
entity N/A Optional <Entity> - An entity instance. Usually filled if Retrieve method was successfully processed.

Full list of error codes could be found at Error Codes page.

Examples

User successfully created
{
    "ok": true,
    "id": "9deecef3-9b24-48ae-b13e-ba0f062e7438"
}
User successfully retrieved
{
    "ok": true,
    "entity": {
        "id": "9deecef3-9b24-48ae-b13e-ba0f062e7438",
        "username": "test",
        "fullname": null,
        "email": "[email protected]",
        "registration_datetime": "2013-10-16T20:40:50.121Z"
    }
}
Scrobble submission request rejected due to validation error
{
    "ok": false,
    "error_code": 10001,
    "error_description": "Invalid 'amount' property value. It must be a positive number."
}
Clone this wiki locally