1.22.13
https://api.parsable.net/api/MODULE
See "API Address" in each module's documentation for correct URL.
Example: https://api.parsable.net/api/jobs
Authorization: Token <token> - See API Authentication below.
Accept: application/json
Wi-Thrift-Version: X.Y.Z
- where X.Y.Z is the major.minor.patch version of the Parsable API you are targeting.
{
"method": "METHOD_NAME",
"arguments": { ... }
}
Example:
{
"method": "login",
"arguments": {
"email": "user@domain.com",
"password": "abcd1234"
}
}
{
"method": "METHOD_NAME",
"result|exception": { ... }
}
Example:
{
"method": "login",
"result": {
"success": {
"authToken": "ABCD...7890",
"currentUser": {
"id": "123456778-1234-1234-1234-1234567890AB",
"email": "user@domain.com",
"name": "John Doe",
"validatedAt": 0
},
"teamIdToTeamRole": {
"123456778-1234-1234-1234-1234567890AC": [
4,
3,
2,
1
]
}
}
}
}
| Thrift Category | Thrift Type | JSON Example |
|---|---|---|
| Base Type | i32 | 1 |
| Base Type | i64 | 10000000000 |
| Base Type | bool | true |
| Base Type | double | 3.14 |
| Base Type | string | "Parsable" |
| Base Type (i32) | enum | For ADMIN = 1:1 OR "1" OR "ADMIN" Note: When enum types are used as the key in a map, only "1" and "ADMIN" are acceptable |
| Container | list<string> | ["a", "b", "c"] |
| Container | set<string> | ["a", "b", "c"] (must be unique) |
| Container | map<string, i32> | {"a": 1, "b": 2, "c": 3} |
| Struct | user.User | {"id": "123456778-1234-1234-1234-1234567890AB", "email": "user@domain.com", "name": "John Doe", "validatedAt": 0} |
| Union | user.UserKey | {"id": "123456778-1234-1234-1234-1234567890AB"} OR {"email": "user@domain.com} |
{
"method": "login",
"result": {
"err": {
"errorCode": 401,
"message": "Invalid email or password"
}
}
}
For all other errors:
{
"method": "loginUser",
"exception": {
"message": "Unknown function loginUser",
"type": 1
}
}
eyJhbG...eyJpY... (it will be around 250-300
characters long).
Authorization header in this format: Token eyJhbG...eyJpY...