{"openapi":"3.1.0","info":{"title":"HN Publisher API","version":"1.0.0","description":"Schedule and manage personal Hacker News URL submissions."},"servers":[{"url":"https://hn.gokoding.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"JobInput":{"type":"object","required":["url","title","scheduledAt"],"properties":{"url":{"type":"string","format":"uri"},"title":{"type":"string","minLength":4,"maxLength":80},"scheduledAt":{"type":"string","format":"date-time"},"notes":{"type":"string","maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128}}}}},"paths":{"/api/v1/jobs":{"get":{"summary":"List jobs","parameters":[{"name":"status","in":"query"},{"name":"limit","in":"query"}]},"post":{"summary":"Schedule one URL","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobInput"}}}}}},"/api/v1/jobs/batch":{"post":{"summary":"Schedule up to 50 URLs","requestBody":{"required":true}}},"/api/v1/jobs/{id}":{"get":{"summary":"Get one job"},"patch":{"summary":"Reschedule, pause, resume, or cancel a job"},"delete":{"summary":"Delete a job that is not publishing"}},"/api/v1/jobs/{id}/run":{"post":{"summary":"Publish one job immediately"}},"/api/v1/jobs/{id}/events":{"get":{"summary":"List the job audit trail"}},"/api/v1/stats":{"get":{"summary":"Get queue counts by status"}},"/api/v1/settings/hn":{"get":{"summary":"Check whether HN credentials are configured"}}}}