Skip to content

Get a question

GET/v5/questions/{question_id}

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.

Path ParametersExpand Collapse
question_id: string
ReturnsExpand Collapse
Question = CategoricalQuestion { id, configuration, created_at, 7 more } or RatingQuestion { id, configuration, created_at, 7 more } or NumberQuestion { id, created_at, created_by, 7 more } or 3 more
One of the following:
CategoricalQuestion object { id, configuration, created_at, 7 more }
id: string

Unique identifier of the entity

configuration: CategoricalQuestionConfiguration { choices, dropdown, multi }
choices: array of string

Categorical answer choices (must contain at least one entry)

multi: optional boolean

Whether the question allows multiple answers.

created_at: string

ISO-timestamp when the entity was created

formatdate-time
created_by: Identity { id, type, object }

The identity that created the entity.

id: string
type: "user" or "service_account"
One of the following:
"user"
"service_account"
object: optional "identity"
name: string
prompt: string

user-facing question prompt

archived_at: optional string

ISO-timestamp when the entity was archived

formatdate-time
conditions: optional array of map[unknown]

Conditions for the question to be shown

object: optional "question"
question_type: optional "categorical"
RatingQuestion object { id, configuration, created_at, 7 more }
id: string

Unique identifier of the entity

configuration: RatingQuestionConfiguration { max_label, min_label, steps }
max_label: string

Label shown for the maximum rating

min_label: string

Label shown for the minimum rating

steps: number

Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

minimum1
created_at: string

ISO-timestamp when the entity was created

formatdate-time
created_by: Identity { id, type, object }

The identity that created the entity.

id: string
type: "user" or "service_account"
One of the following:
"user"
"service_account"
object: optional "identity"
name: string
prompt: string

user-facing question prompt

archived_at: optional string

ISO-timestamp when the entity was archived

formatdate-time
conditions: optional array of map[unknown]

Conditions for the question to be shown

object: optional "question"
question_type: optional "rating"
NumberQuestion object { id, created_at, created_by, 7 more }
id: string

Unique identifier of the entity

created_at: string

ISO-timestamp when the entity was created

formatdate-time
created_by: Identity { id, type, object }

The identity that created the entity.

id: string
type: "user" or "service_account"
One of the following:
"user"
"service_account"
object: optional "identity"
name: string
prompt: string

user-facing question prompt

archived_at: optional string

ISO-timestamp when the entity was archived

formatdate-time
conditions: optional array of map[unknown]

Conditions for the question to be shown

configuration: optional NumberQuestionConfiguration { max, min }
max: optional number

Maximum value for the number

min: optional number

Minimum value for the number

object: optional "question"
question_type: optional "number"
FreeTextQuestion object { id, created_at, created_by, 7 more }
id: string

Unique identifier of the entity

created_at: string

ISO-timestamp when the entity was created

formatdate-time
created_by: Identity { id, type, object }

The identity that created the entity.

id: string
type: "user" or "service_account"
One of the following:
"user"
"service_account"
object: optional "identity"
name: string
prompt: string

user-facing question prompt

archived_at: optional string

ISO-timestamp when the entity was archived

formatdate-time
conditions: optional array of map[unknown]

Conditions for the question to be shown

configuration: optional FreeTextQuestionConfiguration { max_length, min_length }
max_length: optional number

Maximum characters allowed

minimum1
min_length: optional number

Minimum characters required

minimum0
object: optional "question"
question_type: optional "free_text"
FormQuestion object { id, configuration, created_at, 7 more }
id: string

Unique identifier of the entity

configuration: FormQuestionConfiguration { form_schema }
form_schema: map[unknown]

The JSON schema of the desired form object

created_at: string

ISO-timestamp when the entity was created

formatdate-time
created_by: Identity { id, type, object }

The identity that created the entity.

id: string
type: "user" or "service_account"
One of the following:
"user"
"service_account"
object: optional "identity"
name: string
prompt: string

user-facing question prompt

archived_at: optional string

ISO-timestamp when the entity was archived

formatdate-time
conditions: optional array of map[unknown]

Conditions for the question to be shown

object: optional "question"
question_type: optional "form"
TimestampQuestion object { id, created_at, created_by, 7 more }
id: string

Unique identifier of the entity

created_at: string

ISO-timestamp when the entity was created

formatdate-time
created_by: Identity { id, type, object }

The identity that created the entity.

id: string
type: "user" or "service_account"
One of the following:
"user"
"service_account"
object: optional "identity"
name: string
prompt: string

user-facing question prompt

archived_at: optional string

ISO-timestamp when the entity was archived

formatdate-time
conditions: optional array of map[unknown]

Conditions for the question to be shown

configuration: optional TimestampQuestionConfiguration { multi }
multi: optional boolean

Whether to allow multiple timestamps

object: optional "question"
question_type: optional "timestamp"

Get a question

curl https://api.egp.scale.com/v5/questions/$QUESTION_ID \
    -H "x-api-key: $SGP_API_KEY"
{
  "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"
}