API Responses & Errors

The OneAll API attempts to return appropriate HTTP status codes for every request.

HTTP Status Code Description
200 OK Success!
207 Multi-Status The request was partially successful/erroneous
304 Not Modified There was no new data to return.
400 Bad Request The request was invalid. An accompanying error message will explain why.
401 Unauthorized Authentication credentials were missing or incorrect.
403 Forbidden The request is understood, but it has been refused. An accompanying error message will explain why.
404 Not Found The URI requested is invalid or the resource requested, such as a user, does not exists.
409 Conflict The request is correct, but cannot be executed. An accompanying error message will explain why.
500 Internal Server Error The server encountered an unrecoverable error.
502 Bad Gateway The API is having technical problems or in maintenance
503 Service Unavailable The API is overloaded with requests

Response Messages

When the API gives you a result, it does so in your requested format. This might either be JSON or XML.

Error Messages

I you try for example to access the API without using Basic Authentication, the HTTP Status Code will be 401 Unauthorized and the error will look like this:

{
	"response": {
		"request": {
			"date": "Thu, 25 Aug 2011 17:04:03  0200",
			"resource": "/connections.json",
			"status": {
				"flag": "error",
				"code": 401,
				"info": "Authentication credentials are missing or incorrect: http://docs.oneall.com/api/basic/authentication/"
			}
		}
	}
}

Success Messages

Here an example for a successfull request to the resource /connections.json. The HTTP Status Code is 200 OK and the result looks like this:

{
	"response": {
		"request": {
			"date": "Thu, 25 Aug 2011 16:31:16  0200",
			"resource": "/connections.json",
			"status": {
				"flag": "success",
				"code": 200
			}
		},
		"result": {
			"status": {
				"flag": "success",
				"count": 2
			},
			"data": {
				"connections": [
					{
						"connection": {
							"date": "Tue, 23 Aug 2011 14:12:01  0200",
							"plugin": "social_login",
							"token": "7a559a39-51a5-4f21-92aa-cc880da2233f"
	      		}
	      	},
	      	{
	      		"connection": {
							"date": "Tue, 23 Aug 2011 14:15:01  0200",
							"plugin": "social_login",
							"token": "6430aaf1-e8fd-41d9-b3e1-abae114f68b2"
	      		}
	      	}
				]
			}
		}
	}
}