Retrieve a single question in the caller’s account by its ID.
Both active and archived questions are returned; the archived state is
conveyed by the archived_at field on the response. The lookup is scoped to
the caller’s account, and a question that does not exist within that account
results in a not-found error.
Get a question
import os
from scale_gp_beta import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
question = client.questions.retrieve(
"question_id",
)
print(question){
"id": "id",
"configuration": {
"choices": [
"string"
],
"dropdown": true,
"multi": true
},
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"name": "name",
"prompt": "prompt",
"archived_at": "2019-12-27T18:11:19.117Z",
"conditions": [
{
"foo": "bar"
}
],
"object": "question",
"question_type": "categorical"
}Returns Examples
{
"id": "id",
"configuration": {
"choices": [
"string"
],
"dropdown": true,
"multi": true
},
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"name": "name",
"prompt": "prompt",
"archived_at": "2019-12-27T18:11:19.117Z",
"conditions": [
{
"foo": "bar"
}
],
"object": "question",
"question_type": "categorical"
}