Skip to content

Find an answer for a question

GET
/api/answers/match
curl --request GET \
--url 'http://127.0.0.1:8765/api/answers/match?question_id=example'

The answer closest to one question, when it is close enough to suggest. Model-free: word overlap between the question and each answer (ids and question words). match is null when nothing scores 0.5 or when this exact id is already answered (that is plain reuse). To use the suggestion, save it as the answer: POST /api/answers {question_id, answer, from_bank: match.bank_question_id}. Assess responses, GET /api/jobs and a run’s /results and /posting carry the same suggestions as bank_suggestions.

question_id
required
string

The new question’s id.

question
string

The new question’s words.

Success.

Media typeapplication/json
object
schema_version
required
Allowed value: scout-answers-response:1
key
additional properties
any
Example
{
"match": {
"answer": "Yes, 4 years, GKE + BigQuery",
"bank_question": "Do you have GCP experience?",
"bank_question_id": "cloud:gcp",
"question_id": "tooling:cloud_google_platform",
"score": 1
},
"question_id": "tooling:google_cloud_platform",
"schema_version": "scout-answers-response:1"
}

Forbidden / forbidden_origin: loopback peer and Host 127.0.0.1:<port> or localhost:<port> only (Origin too on writes).

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{
"error": {
"allowed_keys": [
"example"
],
"code": "example",
"message": "example"
}
}

Target_unavailable

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "target_unavailable",
"message": "..."
}
}

Unknown_key, invalid_value

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "unknown_key",
"message": "..."
}
}