Skip to main content

Retrieve a Questionnaire

Jetmir Abdija avatar
Written by Jetmir Abdija
Updated over a month ago

This article describes how to retrieve the questionnaire from your repository.

HTTP responses

HTTP response status code

Interpretation

200 OK

Questionnaire retrieved successfully

400 Bad Request

The questionnaire could not be retrieved due to invalid tenant data passed

404 Not Found

Could not find Questionnaire with specified Id

Curl example:

curl --location 'https://publicapi.eu.bluedolphin.app/v1/questionnaires/{questionnaireId}' \
--header 'x-api-key: {apiKey}' \
--header 'tenant: {tenant name}'

Response properties

Main

Parameter

Type

Description

id

string

ID of the questionnaire

libraryTemplateId

string

ID of the library item that this questionnaire was based on

builtIn

bool

Whether the questionnaire is built in

name

string

Name of the questionnaire

templateType

string

Always BOEM_Form

fields

array of fields

Fields

Parameter

Type

Description

id

string

ID of the field

name

string

Name of the field

built_in

bool

Whether the field is built in

position

integer

Position of the field in the questionnaire

field_type

string

Type of the field. Possible types:

  • text

  • dropdown

  • multi select

  • multiline

  • number

  • currency

  • date

  • checkbox

  • rich text

  • hyperlink

  • relation

default_value

string

Default value for the field, for all fields except the relation field

description

string

Description of the field

is_required

bool

When true, this field is mandatory.

share_with_library

bool

When true, the contents of this field may be shared with the library

show_in_official_views

bool

When true, this field may be shown in the BPMN Process Portal

completeness_item

bool

When true, this field is taken into account when calculating object completeness

contains_sensitive_information

bool

When true, this field’s content won't be shown to read-only users, neither will it appear in reporting data

read_only

bool

When true, this field’s contents can not be changed by a user

is_sensitive

bool

When true, this field’s content won't be shown to read-only users, neither will it appear in reporting data

conditional_color_true

string

Hex code for the color when the object is used in the conditional layout and the value is true (for checkbox fields)

conditional_color_false

string

Hex code for the color when the object is used in the conditional layout and the value is false (for checkbox fields)

conditional_color_not_set

bool

When true, no specific conditional color has been set

currency_symbol

string

Type of currency used: Euro or dollar

number_of_decimals

integer

Number of decimals for a currency or number field

open_in_new_window

bool

For a hyperlink field, if true, the link will open in a new window or tab

number_of_lines

integer

For multiline text fields, this will indicate how many lines are displayed in the BlueDolphin UI.

It does not relate to the maximum length of characters in the field

is_lookup

bool

For multi-dropdowns and normal dropdowns, if true, this will indicate that the values in the dropdown come from a source

lookup_collection

string

For multi-dropdowns and normal dropdowns, if the possible values come from a source, this indicates the name of the source collection

lookup_display_field

string

For multi-dropdowns and normal dropdowns, if the possible values come from a source, this indicates the field name from the source that is used to display the values. This is a data source expression.

specified_values

array

For multi-dropdowns and normal dropdowns, when the list of possible values is manual, this is the list of those values. It holds the following fields:

  • id - internal id of the value

  • value - the value

  • conditional color - the conditional color for the value

object_definition_name

string

On relationship type fields, this indicates the target Object Definition for the relations

selected_relationship

document

On relationship type fields, this indicates the type of relationship to create with this field. It holds the following values:

  • relationshipTemplateId - ID of the relationship template type

  • uniqueId - ID of the relationship type

  • type - the type of the relationship

  • weight - the weight of the relationship

  • name - name of the relationship

  • configurationName - left blank

  • configurationName_Internal - left blank

  • relationshipCombinationId - GUID with zeros

  • isRelationDirectAlternative - bool to

  • indicate the direction of the

  • relationship (if any)

  • status - status of the relationship. Only holds 0

relationship_remark

string

On relationship type fields, this indicates the label that the relationship type field should filter relations by. It is also used when creating new relations in this field.

max_length

integer

For text fields, indicate the maximum length of the contents.

multiple_values_allowed

bool

Not used

create_new_object_allowed

bool

Not used

object_definition_category_internal

string

Not used

selected_mode

string

Not used

selection_filter

string

Not used

A successful call returns a response with a 200 OK HTTP status code and the following body:

{
"id": "Unique identifier",
"library_template_id": "000000000000000000000000",
"builtin": false,
"version": 0,
"name": "Questionnaire name",
"template_type": "templateType",
"target": 0,
"fields": [
{
"id": "ce54f0eb-38eb-476e-9557-2e2062db515b",
"name": "Relationship field",
"built_in": false,
"position": 0,
"field_type": "relation",
"default_value": "",
"description": "Test 12345",
"is_required": false,
"share_with_library": false,
"show_in_official_views": false,
"completeness_item": false,
"contains_sensitive_information": false,
"read_only": false,
"is_sensitive": false,
"conditional_color_true": "",
"conditional_color_false": "",
"conditional_color_not_set": "",
"currency_symbol": "USD",
"number_of_decimals": 0,
"open_in_new_window": false,
"number_of_lines": 0,
"is_lookup": false,
"lookup_collection": "",
"lookup_display_field": "",
"specified_values": [],
"object_definition_name": "Business Actor",
"selected_relationship": "used by",
"relationship_remark": "This is a relationship",
"max_length": 0,
"multiple_values_allowed": false,
"create_new_object_allowed": false,
"object_definition_category_internal": "",
"selected_mode": "",
"selection_filter": ""
},
{
"id": "54689454-9afc-43d4-a71c-415fd633221c",
"name": "text field",
"built_in": false,
"position": 1,
"field_type": "text",
"default_value": "d",
"description": "This is a field",
"is_required": false,
"share_with_library": true,
"show_in_official_views": false,
"completeness_item": false,
"contains_sensitive_information": false,
"read_only": false,
"is_sensitive": false,
"conditional_color_true": "",
"conditional_color_false": "",
"conditional_color_not_set": "",
"currency_symbol": "USD",
"number_of_decimals": 0,
"open_in_new_window": false,
"number_of_lines": 0,
"is_lookup": false,
"lookup_collection": "",
"lookup_display_field": "",
"specified_values": [],
"object_definition_name": "",
"selected_relationship": "",
"relationship_remark": "",
"max_length": 100,
"multiple_values_allowed": false,
"create_new_object_allowed": false,
"object_definition_category_internal": "",
"selected_mode": "",
"selection_filter": ""
}
]
}
Did this answer your question?