General - Get schema
API Url
Use it to return schema
http://localhost:16010/ProMarkRESTweb/General/schema
Permissions: user
Request headers
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Query parameters
| Field | Type | Description |
|---|---|---|
collectionTypeoptional | String | Collection type. |
fieldsoptional | String | List of fields to return, if empty returns all fields. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| any | Object | Field name, depending on schema type (any = can be anything). It's the object containging settings for this field. |
| title | String | Field title/header. |
| type | String | The field variable type. "string""number""date""boolean""time" |
| fields | Object | Object containing the field objects. |
| id | String | The field name to use as internal id (value field). |
| objectName | String | The json object name containing the data. |
| text | String | The description to show (used for drop-down, combo-box etc.). |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "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
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |