Skip to content

Instantly share code, notes, and snippets.

@karllhughes
Last active August 9, 2017 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karllhughes/b5f7b4c398156319a2bc02befee3f77d to your computer and use it in GitHub Desktop.
Save karllhughes/b5f7b4c398156319a2bc02befee3f77d to your computer and use it in GitHub Desktop.
Jobs Hub - 1.0.2 Swagger Documentation
---
swagger: "2.0"
info:
version: "2017-08-05T16:10:05Z"
title: "Jobs Hub"
host: "api.hub.jobapis.com"
basePath: "/v1"
schemes:
- "https"
paths:
/jobs:
get:
description: "Get jobs matching a search term and optional location."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "term"
in: "query"
description: "A job search term, eg: 'engineering'"
required: true
type: "string"
- name: "page"
in: "query"
description: "Page number (starting at 0)"
required: false
type: "string"
- name: "location"
in: "query"
description: "A location to search jobs for."
required: false
type: "string"
- name: "per_page"
in: "query"
description: "Number of results per page"
required: false
type: "string"
responses:
200:
description: "200 response"
schema:
$ref: "#/definitions/JobCollection"
headers:
Access-Control-Allow-Origin:
type: "string"
security:
- api_key: []
options:
consumes:
- "application/json"
produces:
- "application/json"
responses:
200:
description: "200 response"
schema:
$ref: "#/definitions/Empty"
headers:
Access-Control-Allow-Origin:
type: "string"
Access-Control-Allow-Methods:
type: "string"
Access-Control-Allow-Headers:
type: "string"
/jobs/{id}:
get:
description: "Gets a single job by ID"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Job objectID"
required: true
type: "string"
responses:
200:
description: "200 response"
schema:
$ref: "#/definitions/JobPosting"
headers:
Access-Control-Allow-Origin:
type: "string"
security:
- api_key: []
options:
consumes:
- "application/json"
produces:
- "application/json"
responses:
200:
description: "200 response"
schema:
$ref: "#/definitions/Empty"
headers:
Access-Control-Allow-Origin:
type: "string"
Access-Control-Allow-Methods:
type: "string"
Access-Control-Allow-Headers:
type: "string"
securityDefinitions:
api_key:
type: "apiKey"
name: "x-api-key"
in: "header"
definitions:
JobCollection:
type: "object"
properties:
results:
type: "array"
items:
$ref: "#/definitions/JobPosting"
resultsPerPage:
type: "integer"
totalPages:
type: "integer"
totalResults:
type: "integer"
page:
type: "integer"
params:
type: "string"
title: "JobCollection Schema"
Empty:
type: "object"
title: "Empty Schema"
JobPosting:
type: "object"
properties:
id:
type: "string"
company:
type: "string"
datePosted:
type: "string"
description:
type: "string"
educationRequirements:
type: "string"
employmentType:
type: "string"
experienceRequirements:
type: "string"
industry:
type: "string"
lastObservedAt:
type: "string"
location:
type: "string"
occupationalCategory:
type: "string"
source:
type: "string"
skills:
type: "string"
title:
type: "string"
url:
type: "string"
title: "JobPosting Schema"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment