ProJob - Get job questions
API Url
Use it to create questions for projob base registration elements
http://localhost:16010/ProMarkREST/web/ProJob/orders/{order_id}/operations/{operation_id}/types/{type}/registration-wizard
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| operation_id | String | Operation identifier |
| order_id | String | Order identifier |
| type | String | Job registration type |
Query parameters
| Field | Type | Description |
|---|---|---|
transSeqoptional | Number | Transaction sequence of transhdr |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| questions | Object[] | Collection with questions and answers used in the wizard. This is basically a carrier (in-out) collection between client-server. |
answeroptional | String | This is the answer to the question and needs to be filled by the client. For dates, it's the ISO-8601 string. For date intervals, it's ISO-8601 dates separated by '/'. |
callBackOnChangeoptional | Boolean | true = After value is changed, do a callback to the server with the entire collection. This is because subsequent values depend on the question answer. |
| dataType | Number | Data type of the question (0: Text, 1: Integer, 2: Decimal, 3: Boolean: 4: Date. 5: Time of day, 6: Date and time, 7: Time duration, 8: Time interval, 9: Date interval, 10: Date and time interval). 0-10 |
| inputType | Number | Suggestion with controll type to display on the client (0: Standard input, depends on 'dataType', 1: Fill-in, 2: Drop-down, 3: Combo-box, 4: Text area, 5: Radio-set, 6: Check-box, 7: Selection list, 8: Calendar, 9: Calendar drop-down, 10: External lookup URI, 11: Distribution). 0-11 |
isMandatoryoptional | Boolean | true = It is mandatory to enter an answer (select a value) on the question. |
| label | String | Label to display on the question. |
lookupURIoptional | String | If collection of 'values' is not sent with the request, then use this URI to bind to remote data. Tipically this is used for large amounts of data, where server paging and server filtering is enabled. Be aware, data schema might be different, depending on external lookup resource. |
| order | Number | Order of question. Sort by this value. |
| resultField | String | Field name that is corresponding to its related registration |
subQuestionsoptional | Object[] | Collection of sub questions if any typically for 'inputType' = 2, 3 and 7. |
answeroptional | String | This is the answer to the question and needs to be filled by the client. For dates, it's the ISO-8601 string. For date intervals, it's ISO-8601 dates separated by '/'. |
| dataType | Number | Data type of the question (0: Text, 1: Integer, 2: Decimal, 3: Boolean: 4: Date. 5: Time of day, 6: Date and time, 7: Time duration, 8: Time interval, 9: Date interval, 10: Date and time interval). 0-10 |
| inputType | Number | Suggestion with controll type to display on the client (0: Standard input, depends on 'dataType', 1: Fill-in, 2: Drop-down, 3: Combo-box, 4: Text area, 5: Radio-set, 6: Check-box, 7: Selection list, 8: Calendar, 9: Calendar drop-down, 10: External lookup URI, 11: Distribution). 0-11 |
isMandatoryoptional | Boolean | true = It is mandatory to enter an answer (select a value) on the question. |
| label | String | Label to display on the sub question. |
lookupURIoptional | String | If collection of 'values' is not sent with the request, then use this URI to bind to remote data. Tipically this is used for large amounts of data, where server paging and server filtering is enabled. Be aware, data schema might be different, depending on external lookup resource. |
| order | Number | Order of values to select from. |
| resultField | String | Field name that is corresponding to its related registration |
valuesoptional | Object[] | Collection of possible selectable values. It's used when user needs to select among a list of values, typically for 'inputType' = 2, 3 and 7. |
| description | String | The Description that should be displayed in the list for selection. |
| displayId | String | The text to be displayed for selected items. It might be different than 'internalId'. |
| sortNo | Number | Order of values to select from. |
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": {"questions": [{"order": 1,"type": 2,"label": "Select reason for change condition:","inputType": 10,"dataType": 0,"lookupURI": "/rest/General/lookup/JobReas?options=CTF","resultField": "jobCondition.changeFromReason"},{"order": 2,"type": 1,"label": "Select new condition:","inputType": 2,"dataType": 0,"callBackOnChange": true,"resultField": "jobCondition.newCondition","values": [{"sortNo": 1,"internalId": "","displayId": "S","description": "Setup"},{"sortNo": 2,"internalId": "","displayId": "R","description": "Run time"},{"sortNo": 3,"internalId": "","displayId": "RW","description": "Rework"},{"sortNo": 4,"internalId": "","displayId": "QA","description": "Quality assurance"},{"sortNo": 5,"internalId": "","displayId": ":FINISHED","description": "Finished"}]}]}}}