Get how the stored postings are being prepared
const url = 'http://127.0.0.1:8765/api/postings/status';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://127.0.0.1:8765/api/postings/statusHow the stored postings are being prepared in this server: ready, or a build and how far it is. Answered from memory, at once, whatever a build is doing. state: preparing (the first build runs, once after an upgrade or a new install: GET /api/postings and GET /api/new answer 202 until it is done), refreshing (a build runs and the stored rows are served meanwhile), ready, or unknown (nothing has asked for the postings since this server started). percent is the share of companies (boards_done of boards_total) the running build has matched; phase matching, facts or idle; builds how many builds this server has started and last_boards how many companies the last finished one matched. The postings are matched once for every request and kept in the project’s pipeline file, so a restart does not match them again; after an index update only the companies that changed are matched again.
Responses
Section titled “Responses”Success.
object
Example
{ "boards_done": 4347, "boards_total": 10350, "builds": 1, "last_boards": 0, "percent": 42, "phase": "matching", "schema_version": "scout-postings-status:1", "state": "preparing"}Forbidden / forbidden_origin: loopback peer and Host 127.0.0.1:<port> or localhost:<port> only (Origin too on writes).
object
object
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Target_unavailable
object
object
Example
{ "error": { "code": "target_unavailable", "message": "..." }}Unknown_key
object
object
Example
{ "error": { "code": "unknown_key", "message": "..." }}