Page tree
Skip to end of metadata
Go to start of metadata

SUCCESS

Response - no Data

When the response consists of only a success status code, this code is returned in the status code header and the body have a value of 'no content'.

Status code:

200 OK

Content-Type:

application/json

Body:

'no content'

Response - with Data

When the response returns data in addition to a status code, the body contains the data.

Status code:

200 OK

Content-Type:

application/json

Body:

Response in the format requested: JSON

Response Body Format

JSON:

 

{
    <data>
}

 

 

ERROR

Response

vividLMS uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, an enrollment failed, etc.), and codes in the 5xx range indicate an error with vividLMS's servers. Not all errors map cleanly onto HTTP response codes, however.

When the response returns an error, firstly you should look at http status code (we are attempting as much as possible to use appropriate HTTP codes) and then at <errorType>and <message> elements in response body.

Status code:

400 Bad Request, 401 Unauthorized, 404 Not Found, 409 Conflict

Content-Type:

application/x-www-form-urlencoded

Body:

Error response body in the format requested: JSON or XML

 

Errors:

400 Bad Request

Any case where either endpoint doesn't exist, resource path parameters are invalid, POST request parameters are invalid or no Authentication header provided. This doesn't include invalid specific resource ids

401 Unauthorized

The OAuth Authorization header provided and is invalid (consider looking in response body). Client or authorized user have no privilege to view requested data (for example, requested resource's owner has privacy permission "You" or "Friends" for requested resource)

403 Forbidden

You hit the rate limiting quota for the client or for the viewer.

404 Not Found

The resource with given id doesn't exist.

500 Internal Server Error

Something is terribly wrong on our side (and we are working on it). Try your request later.

 

Also, in most cases additional details are provided in the response body via errorType element:

validation

Either resource path parameters or POST parameters are invalid (fieldName should help identify the problem)

request

Client or authorized user have no privilege to view requested data. This is also the errorType for rate limiting

not_found

The resource with given id doesn't exist

system

Something is terribly wrong on our side (and we are working on it). Try your request later

Response Body Format

JSON: 

 

{
    "errors":[
        {
            "errorType":<value>,
            "fieldName":<value>,
            "message":<value>
        }
    ]