BREAGEN Logo
Question Management

Question Management

Get All Endpoint GET /v1/question/all/

Resource URL/v1/question/all/
Response FormatJSON
Requires AuthenticationYes
Rate LimitedNo
HTTPSYes

Description

Retrieve all questions without pagination.

Example Request

curl -X 'GET' \
'https://braegen.ai/v1/question/all/' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>'

Example Response

{
    "description": "Successful Response"
}

HTTP Responses

HTTP CodeMessage
200Successful Response

Get Questions Endpoint GET /v1/question/all_filtered/

Resource URL/v1/question/all_filtered/
Response FormatJSON
Requires AuthenticationYes
Rate LimitedNo
HTTPSYes

Description

Retrieve questions with optional filters.

Parameters

ParameterDescriptionRequiredTypeDefault Value
pagePage numberNoInteger1
page_sizeNumber of items per pageNoInteger10
list_idList ID to filter questionsNoIntegerN/A
group_idsComma-separated group IDsNoStringN/A
userUser identifierNoStringN/A
statusQuestion status(active/inactive)NoStringN/A
answer_formatAnswer formatNoStringN/A
mandatoryMandatory flagNoBooleanN/A
weightQuestion weightNoIntegerN/A
search_queryText to search in questionNoStringN/A

Example Request

curl -X 'GET' \
'https://braegen.ai/v1/question/all_filtered/?page=1&page_size=10&list_id=1&group_ids=1,2' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>'

Example Response

{
    "description": "Successful Response"
}

HTTP Responses

HTTP CodeMessage
200Successful Response
422Validation Error

Get By Id Endpoint GET /v1/question/{question_id}

Resource URL/v1/question/{question_id}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedNo
HTTPSYes

Description

Retrieve a question by its ID.

Parameters

ParameterDescriptionRequiredTypeDefault Value
question_idQuestion IDYesIntegerN/A

Example Request

curl -X 'GET' \
'https://braegen.ai/v1/question/1' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>'

Example Response

{
    "description": "Successful Response"
}

HTTP Responses

HTTP CodeMessage
200Successful Response
422Validation Error

Update Endpoint PUT /v1/question/{question_id}

Resource URL/v1/question/{question_id}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedNo
HTTPSYes

Description

Update an existing question by its ID. Status is an enum with values: active and inactive.

Parameters

ParameterDescriptionRequiredTypeDefault Value
question_idQuestion IDYesIntegerN/A

Request Body

ParameterDescriptionRequiredTypeDefault Value
userUser identifierNoStringnull
questionQuestion textNoStringnull
question_list_idQuestion list IDNoIntegernull
answer_formatAnswer formatNoStringnull
aliaseAlias for the questionNoStringnull
statusStatus (active/inactive)NoStringactive
mandatoryMandatory flagNoBooleanfalse
question_promptQuestion promptNoStringnull
weightQuestion weightNoIntegernull
groupsList of group IDsNoArraynull
schema_idSchema IDNoIntegernull
dependent_question_idDependent question IDNoIntegernull
dependent_answerDependent answerNoStringnull

Example Request

curl -X 'PUT' \
'https://braegen.ai/v1/question/1' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
    "question": "Updated question",
    "status": "active",
    "mandatory": true
}'

Example Response

{
    "description": "Successful Response"
}
HTTP CodeMessage
200Successful Response
422Validation Error

Get By Group Name Endpoint GET /v1/question/questions/group_name/{group_name}

Resource URL/v1/question/questions/group_name/{group_name}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedNo
HTTPSYes

Description

Retrieve questions by group name.

Parameters

ParameterDescriptionRequiredTypeDefault Value
group_nameGroup nameYesStringN/A

Example Request

curl -X 'GET' \
'https://braegen.ai/v1/question/questions/group_name/sample_group' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>'

Example Response

{
    "description": "Successful Response"
}
HTTP CodeMessage
200Successful Response
422Validation Error

Create Endpoint POST /v1/question/

Resource URL/v1/question/
Response FormatJSON
Requires AuthenticationYes
Rate LimitedNo
HTTPSYes

Description

Create a new question. Status is an enum with values: active and inactive.

ParameterDescriptionRequiredTypeDefault Value
userUser identifierNoStringnull
questionQuestion textNoStringnull
question_list_idQuestion list IDNoIntegernull
answer_formatAnswer formatNoStringnull
aliaseAlias for the questionNoStringnull
statusStatus (active/inactive)NoStringactive
mandatoryMandatory flagNoBooleanfalse
question_promptQuestion promptNoStringnull
weightQuestion weightNoIntegernull
groupsList of group IDsNoArraynull
schema_idSchema IDNoIntegernull
dependent_question_idDependent question IDNoIntegernull
dependent_answerDependent answerNoStringnull

Example Request

curl -X 'POST' \
'https://braegen.ai/v1/question/' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
    "question": "Sample question",
    "status": "active",
    "mandatory": true
}'

Example Response

{
    "description": "Successful Response"
}
HTTP CodeMessage
200Successful Response
422Validation Error

Delete Endpoint DELETE /v1/question/multiple/

Resource URL/v1/question/multiple/
Response FormatJSON
Requires AuthenticationYes
Rate LimitedNo
HTTPSYes

Description

Delete multiple questions by their IDs.

Parameters

ParameterDescriptionRequiredTypeDefault Value
user_idUser IDNoStringN/A

Request Body

ParameterDescriptionRequiredTypeDefault Value
idsList of question IDsYesArrayN/A

Example Request

curl -X 'DELETE' \
'https://braegen.ai/v1/question/multiple/?user_id=user_123' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '[1, 2, 3]'

Example Response

{
    "description": "Successful Response"
}
HTTP CodeMessage
200Successful Response
422Validation Error