General - Get schema

API Url

Use it to return schema

GET
http://localhost:16010/ProMarkRESTweb/General/schema

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Query parameters

FieldTypeDescription
collectionTypeoptionalString

Collection type.

fieldsoptionalString

List of fields to return, if empty returns all fields.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    anyObject

Field name, depending on schema type (any = can be anything). It's the object containging settings for this field.

      titleString

Field title/header.

      typeString

The field variable type.

Allowed values:"string""number""date""boolean""time"
    fieldsObject

Object containing the field objects.

    idString

The field name to use as internal id (value field).

    objectNameString

The json object name containing the data.

    textString

The description to show (used for drop-down, combo-box etc.).

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"objectName": "employees",
"id": "id",
"text": "firstName",
"fields": {
"empNo": {
"type": "string",
"title": "No."
},
"empId": {
"type": "string",
"title": "ID"
},
"firstName": {
"type": "string",
"title": "First name"
},
"surname": {
"type": "string",
"title": "Surname"
},
"initials": {
"type": "string",
"title": "Initials"
}
}
},
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.