Pixela API Document

API Document for Pixela ( https://pixe.la/ ) .

POST - /v1/users/<username>/graphs/<graphID>


It records the quantity of the specified date as a "Pixel".

HTTP Method , API endpoint

POST /v1/users/<username>/graphs/<graphID>

Request Header

Key Description
X-USER-TOKEN [required] It is the authentication token specified at the time of user registration.

Request Body

Key Type Description
date string [required] The date on which the quantity is to be recorded. It is specified in yyyyMMdd format.
quantity string [required] Specify the quantity to be registered on the specified date.
Validation rule: int ^\-?[0-9]+, float ^\-?[0-9]+\.[0-9]+
optionalData string [optional] Additional information other than quantity. It is specified as JSON string.
The amount of this data must be less than 10 KB.

Possible errors by HTTP response status code

  • 400 Bad Request
    • This is an error if there is some mistake in your request. Unless the mistake is corrected, the request will not succeed.
  • 404 Not Found
    • This error occurs when your request destination does not exist.
    • This error also occurs when authentication to the request destination is not successful.
  • 413 Payload Too Large
    • This is an error if your request is larger than the limit defined by the Pixela specification. Unless you correct it, the request will not be successful.
  • 500 Internal Server Error
    • Status in the event of an unexpected error. Retrying the request may be successfully processed.
  • 503 Service Unavailable
    • This error occurs when Pixela is temporarily unavailable. Please take a moment and retry your request.
    • If the response body contains "isRejected":true, it indicates that the request was rejected 25% of the time. In this case, the request can be retried until it succeeds.


$ curl -X POST https://pixe.la/v1/users/a-know/graphs/test-graph -H 'X-USER-TOKEN:thisissecret' -d '{"date":"20180915","quantity":"5","optionalData":"{\"key\":\"value\"}"}'