Integrate your website with MyPClist using our API
Schema described below is used to create all the requests in the API. Every request should be sent as a POST to http://mypclist.net/api
Method name | Response type | Requires identity | Required permissions |
---|---|---|---|
Request | array | No | None |
Field name | Type | Default | Required | Description |
---|---|---|---|---|
action |
string | Yes | Name of API method to perform. This field is not case-sensitive. | |
api_key |
string | Yes | Public key identifier used to determine current user and permissions set. | |
api_token |
string | Yes | Token used to authorize current key. | |
params |
object | {} | Yes | Object with key-value pairs of parameters passed to the current method. |
Field name | Type | Required | Description |
---|---|---|---|
status |
string | Yes | Status of performed action. The only values responded there are: 'success' and 'error'. |
time |
timestamp | Yes | Server timestamp that can be used for synchronization. |
response |
mixed | No | Response got from executed API method. Received on method success. |
message |
string | No | Error message. Received on method failure. |
error_id |
int | No | Unique error ID. When its value is -1, error message has no unique ID. Received on method failure. |
{ "action": "Ping", "api_key": 492, "api_token": "42525bb6d3b0dc06bb78ae548733e8fbb55446b3", "params": [] }
{ "status": "success", "time": 1470568188, "response": "pong" }
{ "action": "Ping", "api_key": 492, "api_token": "Some invalid API key", "params": [] }
{ "status": "error", "time": 1470568188, "message": "API key not authorized", "error_id": 1 }