Public API

This documentation will help you to integrate with PushResume API

Routes

Resource Operation Description
auth POST /auth/(provider_name) Retrieve JWT token to access protected routes
  GET /auth/(provider_name) Retrieve redirect URL to provider’s auth page
  GET /auth/providers Retrieve providers list
  GET /auth/refresh Refresh exists JWT token (reset TTL)
protected GET /resume Retrieve user’s resume list directly from provider
  POST /resume Toggle automatically publish user’s resume
stats GET /stats Application’s usage statistic

Methods

POST /auth/(provider_name)

Log-in user, returns JWT token for signing future requests to protected routes.

Request:

POST /auth/<provider_name> HTTP/1.1
Content-Type: application/json

{
    "code": "qwerty"
}

Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "token": "q1w2.e3r4.t5y"
}
Request JSON Object:
 
  • code (string) – authorization code from callback
Status Codes:
GET /auth/(provider_name)

Returns URL for redirect user to provider’s auth page

Request:

GET /auth/<provider_name> HTTP/1.1

Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "redirect": "http://<provider's_auth_page>"
}
Status Codes:
GET /auth/providers

Providers list

Request:

GET /auth/providers HTTP/1.1

Response:

HTTP/1.1 200 OK
Content-Type: application/json

[
    "provider_one",
    "provider_two"
]
Status Codes:
GET /auth/refresh

Returns new JWT token with fresh expiration date

Request:

GET /auth/refresh HTTP/1.1
Authorization: JWT q1w2.e3r4.t5y

Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "token": "q1w2.e3r4.t5y"
}
Request Headers:
 
Status Codes:
GET /resume

User’s resume list

Request:

GET /refresh HTTP/1.1
Authorization: JWT q1w2.e3r4.t5y

Response:

HTTP/1.1 200 OK
Content-Type: application/json

[
    {
        "enabled": true,
        "link": "https://<provider's resume page>",
        "name": "John Doe",
        "published": "2018-08-19T17:41:52+0300",
        "title": "Proctologist-jeweler",
        "uniq": "erwhy2333r23rd2r32er23"
    }
]
Request Headers:
 
Status Codes:
POST /resume

Enable/disable automatically publish user’s resume

Request:

POST /resume HTTP/1.1
Content-Type: application/json

{
    "uniq": "q1w2e3r4t5y6"
}

Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "enabled": true
}
Request JSON Object:
 
  • uniq (string) – provider’s resume id
Status Codes:
GET /stats

Application’s usage statistic, update every 5 minutes