Questionnaire Types
Types for questionnaires, attachments, and evidence.
QuestionEvidenceCreate
Schema for creating question evidence.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
question_id | str | ✓ | - |
questionnaire_id | str | ✓ | - |
section_id | str | ✓ | - |
value | Any | ✓ | - |
Example
from credoai import QuestionEvidenceCreate
obj = QuestionEvidenceCreate(
question_id="example",
questionnaire_id="example",
section_id="example",
value=None,
)
QuestionEvidenceUpdate
Schema for updating question evidence.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
questionnaire_id | str | ✓ | - |
section_id | str | ✓ | - |
question_id | str | ✓ | - |
value | Any | ✓ | - |
Example
from credoai import QuestionEvidenceUpdate
obj = QuestionEvidenceUpdate(
questionnaire_id="example",
section_id="example",
question_id="example",
value=None,
)
QuestionnaireAttachment
Schema for attaching a questionnaire to an entity.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | str | ✓ | - |
version | int | ✓ | - |
Example
from credoai import QuestionnaireAttachment
obj = QuestionnaireAttachment(
key="example",
version=123,
)
QuestionnaireAttachmentResponse
Schema for a questionnaire attachment response.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | str | ✓ | - |
use_case_id | Any | - | |
vendor_id | Any | - | |
model_id | Any | - | |
entity_id | Any | - | |
key | str | ✓ | - |
version | int | ✓ | - |
due_date | Any | - | |
timezone | Any | - | |
inserted_at | Any | - | |
updated_at | Any | - |
Example
from credoai import QuestionnaireAttachmentResponse
obj = QuestionnaireAttachmentResponse(
id="example",
key="example",
version=123,
)
QuestionnaireAttachmentUpdate
Schema for updating a questionnaire attachment.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
version | Any | - | |
due_date | Any | - | |
timezone | Any | - |
Example
from credoai import QuestionnaireAttachmentUpdate
obj = QuestionnaireAttachmentUpdate(
)
QuestionnaireBaseResponse
Schema for a questionnaire base response (without version content).
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | str | ✓ | - |
key | Any | - | |
name | str | ✓ | - |
target | Any | - | |
archived | Any | - | |
show_on_create | bool | - | |
inserted_at | Any | - | |
updated_at | Any | - |
Example
from credoai import QuestionnaireBaseResponse
obj = QuestionnaireBaseResponse(
id="example",
name="example",
)
QuestionnaireCreate
Schema for creating a questionnaire base.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | str | ✓ | - |
name | str | ✓ | - |
target | str | ✓ | - |
info | Any | - |
Example
from credoai import QuestionnaireCreate
obj = QuestionnaireCreate(
key="example",
name="example",
target="example",
)
QuestionnaireDuplicate
Schema for duplicating a questionnaire.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | str | ✓ | - |
name | str | ✓ | - |
Example
from credoai import QuestionnaireDuplicate
obj = QuestionnaireDuplicate(
key="example",
name="example",
)
QuestionnaireInfo
Nested info object for questionnaire metadata.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
description | Any | - | |
introduction | Any | - | |
logo_url | Any | - | |
show_on_create | Any | - |
Example
from credoai import QuestionnaireInfo
obj = QuestionnaireInfo(
)
QuestionnaireResponse
Schema for a questionnaire response.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | str | ✓ | - |
key | str | ✓ | - |
name | str | ✓ | - |
description | Any | - | |
version | int | ✓ | - |
target | Any | - | |
is_published | bool | - | |
sections | List[Dict[str, Any]] | - | |
inserted_at | Any | - | |
updated_at | Any | - |
Example
from credoai import QuestionnaireResponse
obj = QuestionnaireResponse(
id="example",
key="example",
name="example",
version=123,
)
QuestionnaireUpdate
Schema for updating a questionnaire base.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | Any | - | |
archived | Any | - | |
info | Any | - | |
show_on_create | Any | - |
Example
from credoai import QuestionnaireUpdate
obj = QuestionnaireUpdate(
)
QuestionEvidenceCreateRequest
Request wrapper for QuestionEvidenceCreate with validation and JSON:API support. Combines the QuestionEvidenceCreate data model with client request functionality, providing automatic validation and JSON:API format conversion for API requests.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
question_id | str | ✓ | - |
questionnaire_id | str | ✓ | - |
section_id | str | ✓ | - |
value | ForwardRef('Any') | ✓ | - |
Example
from credoai import QuestionEvidenceCreateRequest
obj = QuestionEvidenceCreateRequest(
question_id="example",
questionnaire_id="example",
section_id="example",
value=None,
)
QuestionnaireAttachmentResponseWrapper
Response wrapper for QuestionnaireAttachmentResponse with metadata and validation. Extends ClientResponse to provide type-safe access to QuestionnaireAttachmentResponse data along with HTTP response metadata.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
status_code | int | ✓ | HTTP response status code |
headers | ForwardRef('Dict[str, str]') | HTTP response headers | |
request_id | ForwardRef('Optional[str]') | Unique request identifier for tracing | |
data | ForwardRef('QuestionnaireAttachmentResponse') | ✓ | Validated response data |
Example
from credoai import QuestionnaireAttachmentResponseWrapper
obj = QuestionnaireAttachmentResponseWrapper(
status_code=123,
data=None,
)
QuestionnaireBaseResponseWrapper
Response wrapper for QuestionnaireBaseResponse with metadata and validation. Extends ClientResponse to provide type-safe access to QuestionnaireBaseResponse data along with HTTP response metadata.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
status_code | int | ✓ | HTTP response status code |
headers | ForwardRef('Dict[str, str]') | HTTP response headers | |
request_id | ForwardRef('Optional[str]') | Unique request identifier for tracing | |
data | ForwardRef('QuestionnaireBaseResponse') | ✓ | Validated response data |
Example
from credoai import QuestionnaireBaseResponseWrapper
obj = QuestionnaireBaseResponseWrapper(
status_code=123,
data=None,
)
QuestionnaireCreateRequest
Request wrapper for QuestionnaireCreate with validation and JSON:API support. Combines the QuestionnaireCreate data model with client request functionality, providing automatic validation and JSON:API format conversion for API requests.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | str | ✓ | - |
name | str | ✓ | - |
target | str | ✓ | - |
info | ForwardRef('Optional[Any]') | - |
Example
from credoai import QuestionnaireCreateRequest
obj = QuestionnaireCreateRequest(
key="example",
name="example",
target="example",
)
QuestionnaireResponseWrapper
Response wrapper for QuestionnaireResponse with metadata and validation. Extends ClientResponse to provide type-safe access to QuestionnaireResponse data along with HTTP response metadata.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
status_code | int | ✓ | HTTP response status code |
headers | ForwardRef('Dict[str, str]') | HTTP response headers | |
request_id | ForwardRef('Optional[str]') | Unique request identifier for tracing | |
data | ForwardRef('QuestionnaireResponse') | ✓ | Validated response data |
Example
from credoai import QuestionnaireResponseWrapper
obj = QuestionnaireResponseWrapper(
status_code=123,
data=None,
)