Retrieves a specific version of a Form's schema using the schema version number.
Request
GET https://www.activityinfo.org/resources/form/{formId}/schema/versions/{version}
Successful response
application/json
object | |||
id | string | The immutable CUID for this form. Must be globally unique within an ActivityInfo server | required |
label | string | A human-readable label for this form | required |
schemaVersion | string | A monotonically increasing version number of this schema assigned by the server upon updates | required |
databaseId | string | The id of the database to which this form belongs | required |
parentFormId | string | The id of this form's parent, if this form is a subform. Note that subforms can only be created by adding a subform field to the parent form. | optional |
elements | array[object] | This form's fields, section headers, and other elements. | required |
id | string | An immutable CUID for this field that is unique within the form | required |
code | string | A developer-friendly code for this field that can be used in formulas and in the API. Must match the pattern ^[A-Za-z][A-Za-z0-9_]* | optional |
label | string | A short human-friendly label for this field | required |
relevanceCondition | string | A boolean-valued ActivityInfo formula that determines when this field is 'relevant'. Fields that are not relevant are not displayed during data entry and must be blank. | optional |
validationCondition | string | A boolean-valued ActivityInfo formula that determines when this field's value is valid. | optional |
dataEntryVisible | boolean | If false, this field is not shown in data entry | optional |
tableVisible | boolean | If false, this field is not shown by default in the table view | optional |
required | boolean | If true, a value for this field must be provided | required |
key | boolean | If true, this field is part of the form's natural key fields whose combination must be unique within the form | required |
type | string | The field type Values:
|
required |
securityCategoryId | string | optional | |
typeParameters | object | Additional type-specific properties of this field. | optional |
units | string | For fields of type 'quantity', describes the units of the quantity | optional |
inputMask | string | For text fields, provides a pattern-based input mask | optional |
cardinality | string | For fields of type 'enumerated', indicates whether single or multiple select. Values:
|
optional |
range | object | For fields of type 'reference', provides the id of the form that this field references | optional |
formId | string | For fields of type 'subform', provides the id of the sub form that this field references | optional |
items | array[object] | For fields of type 'enumerated', provided the list of valid choices | optional |
id | string | The immutable CUID of this selection item. Must match the format [a-z][a-z0-9]{0,25} and be unique within this field. | required |
label | string | Human-readable label for this selection item. | required |
formula | string | For fields of type 'calculated', provides the formula for the field's value | optional |
prefixFormula | string | For fields of type 'serial', provides a formula that will be used to compute the prefix of the generated serial number. | optional |
Error responses
Status Code | Error Code | Description |
---|---|---|
401 | AUTHENTICATION_ |
The request must be authenticated |
403 | FORBIDDEN | Permission denied |
404 | NOT_ |
The resource could not be found |
410 | DELETED | The resource has been deleted |
Example
curl -u anything:YOUR_API_TOKEN \
https://www.activityinfo.org/resources/form/ck8pu9ha07/schema/versions/1126