Coruson API

<back to all web services

GetFormFields

Coruson Forms

Requires Authentication
The following routes are available for this service:
GET/api/forms/fieldsGet Form Fields
GetFormFields Parameters:
NameParameterData TypeRequiredDescription
FieldIdqueryGuidNoGet by Field Id
FormRevisionIdqueryGuidNoGet by Form Revision Id
FormNamequeryStringNoGet by Form name
LabelqueryStringNoGet by Field Label
FieldTypequeryFieldTypeYesGet by Field Type

Allowable Values

  • All
  • TextBox
  • TextArea
  • Numerical
  • DateTime
  • CheckList
  • SelectList
  • RadioGroup
  • Date
  • Location
  • SectionRepeater
FieldBankFieldIdqueryGuidNoFilter by the FieldBank Field Id.
CollectionTypequeryFieldCollectionTypeYesGet by Field Collection Type

Allowable Values

  • All
  • None
  • Lists
  • Organisation
  • Standard
  • UserGroup
  • Asset
  • Customer
  • Supplier
  • Document
  • MasterHazard
  • Process
  • RiskEvent
  • Control
CollectionIdqueryGuidNoGet fields by field collection id
CollectionNamequerystringNoGet form fields by field collection name.
SectionIdqueryGuidNoFilter by the section Id.
SectionNamequerystringNoFilter by the name of the section.
OrderByqueryFormOrderYesProperty to order by in Ascending order. Default is 'Name'.

Allowable Values

  • Default
  • Name
  • Owner
  • Revision
OrderByDescqueryFormOrderYesProperty to order by in Descending order.

Allowable Values

  • Default
  • Name
  • Owner
  • Revision
ThenByqueryFormOrderYesSecond Property to order by in Ascending order. NOTE: If this value is the same as either the OrderBy or OrderByDesc values, then it will be ignored.

Allowable Values

  • Default
  • Name
  • Owner
  • Revision
ThenByDescqueryFormOrderYesSecond Property to order by in Descending order. NOTE: If this value is the same as either the OrderBy or OrderByDesc values, then it will be ignored.

Allowable Values

  • Default
  • Name
  • Owner
  • Revision
PagingRequestBase<T> Parameters:
NameParameterData TypeRequiredDescription
SkipformIntegerNoNumber of items to skip before returning results. Minimum suitable value is 0 and is also the default value.
TakeformIntegerNoNumber of items to return per page. Must be a number in the range 1-100. Default value is 100.
OrderByformEnumNoOrder By
OrderByDescformEnumNoOrder By Descending
ThenByformEnumNoThen By
ThenByDescformEnumNoThen By Descending
RequestBase Parameters:
NameParameterData TypeRequiredDescription
VersionformintNo
GetFormFieldsResponse Parameters:
NameParameterData TypeRequiredDescription
FormFieldsformList<FormField>No
GetResponseBase Parameters:
NameParameterData TypeRequiredDescription
TotalResultsformintNo
SkipformintNo
TakeformintNo
LinksformList<Link>No
ResponseBase Parameters:
NameParameterData TypeRequiredDescription
StatusDescriptionformstringNo
ResponseStatusformResponseStatusNo
Link Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
RequestUrlformstringNo
MethodformstringNo
FormField Parameters:
NameParameterData TypeRequiredDescription
FieldIdformGuidNo
FormRevisionIdformGuidNo
FormNameformstringNo
LabelformstringNo
FieldTypeformFieldTypeNo
FieldBankFieldIdformGuidNo
CollectionTypeformFieldCollectionTypeNo
CollectionIdformGuid?No
CollectionNameformstringNo
SectionIdformGuidNo
PersistentSectionIdformGuid?No
SectionNameformstringNo
RepeaterSectionsformList<RepeaterSection>No
RepeaterSection Parameters:
NameParameterData TypeRequiredDescription
SectionTemplateIdformGuidNo
SectionTemplateNameformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

                    POST /jsv/reply/GetFormFields HTTP/1.1 
Host: platform.gaelenlighten.com 
Content-Type: text/jsv
Content-Length: length

{
	FieldId: 00000000-0000-0000-0000-000000000000,
	Skip: 0,
	Version: 0,
	FormRevisionId: 00000000-0000-0000-0000-000000000000,
	Take: 0,
	FormName: String,
	Label: String,
	FieldType: All,
	FieldBankFieldId: 00000000-0000-0000-0000-000000000000,
	CollectionType: All,
	CollectionId: 00000000-0000-0000-0000-000000000000,
	CollectionName: String,
	SectionId: 00000000-0000-0000-0000-000000000000,
	SectionName: String,
	OrderBy: Default,
	OrderByDesc: Default,
	ThenBy: Default,
	ThenByDesc: Default
}
                    
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	TotalResults: 0,
	StatusDescription: String,
	Skip: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Take: 0,
	Links: 
	[
		{
			Name: String,
			RequestUrl: String,
			Method: String
		}
	],
	FormFields: 
	[
		{
			FormName: String,
			Label: String,
			FieldType: All,
			CollectionType: All,
			CollectionId: 00000000-0000-0000-0000-000000000000,
			CollectionName: String,
			PersistentSectionId: 00000000-0000-0000-0000-000000000000,
			SectionName: String,
			RepeaterSections: 
			[
				{
					SectionTemplateName: String
				}
			]
		}
	]
}