## 3.4 Response

### 3.4.1 adminDirective

Admin Directives, empowers endpoint providers to “inform” or “direct” endpoint consumers what needs to happen. This opens the possibility to prompt the resending of data, expose what objects have been updated, initiate functional services etc. Some common use-cases and details on Admin Directive functionality can be found on the respective Admin Directives section.

SIF_Events are reported for this object.

Figure 3.4.1-1: adminDirective

| Element/@Attribute | Char | Privacy Rating | Description | Type
--- | --- | --- | --- | --- | ---
| adminDirective |  |  | Admin Directives, empowers endpoint providers to “inform” or “direct” endpoint consumers what needs to happen. This opens the possibility to prompt the resending of data, expose what objects have been updated, initiate functional services etc. Some common use-cases and details on Admin Directive functionality can be found on the respective Admin Directives section. |
@ | id | O |  |  | xs:token
| timestamp | M |  | Timestamp when request was issued. | xs:dateTime
| timeout | M |  | When should the request expire if not fulfilled. | xs:duration
| serviceName | M |  | The name of the Service. For utilities, this is fixed to one of the defined set of Utility Service Names. For objects and functions, it is defined by the Data Model. | xs:token
| method | M |  | Unique ID/Name or requested method. | xs:token
| methodParameters | Onillable="false" |  |  | methodParametersType

Table 3.4.1-1: adminDirective
JSON
[ { "adminDirective": { "id": "a8c3c3e3-4b35-9d75-101d-00aa001a1652", "timestamp": "2021-06-18T01:04:42.283Z", "timeout": "P2D", "serviceName": "StudentPersonals", "method": "Update", "methodParameters": { "methodParameter": [ { "paramName": "RefId", "paramValue": "5b72f2d4-7a83-4297-a71f-8b5fb26cbf14" }, { "paramName": "RefId", "paramValue": "41d38fa-3b57-488b-ac8b-5fd957e592f8" }, { "paramName": "RefId", "paramValue": "f4039cfb-6343-40df-837a-b993b7db6632" } ] } } } ]
XML
<adminDirective id="a8c3c3e3-4b35-9d75-101d-00aa001a1652"> <timestamp>2021-06-18T01:04:42.283Z</timestamp> <timeout>P2D</timeout> <serviceName>StudentPersonals</serviceName> <method>Update</method> <methodParameters> <methodParameter> <paramName>RefId</paramName> <paramValue>5b72f2d4-7a83-4297-a71f-8b5fb26cbf14</paramValue> </methodParameter> <methodParameter> <paramName>RefId</paramName> <paramValue>41d38fa-3b57-488b-ac8b-5fd957e592f8</paramValue> </methodParameter> <methodParameter> <paramName>RefId</paramName> <paramValue>f4039cfb-6343-40df-837a-b993b7db6632</paramValue> </methodParameter> </methodParameters> </adminDirective>
Example 3.4.1-1: adminDirective
JSON
[ { "adminDirective": { "id": "a8c3c3e3-4b35-9d75-101d-00aa001a1652", "timestamp": "2021-06-18T01:04:42.283Z", "timeout": "P2D", "serviceName": "StudentPersonals", "method": "Refresh", "methodParameters": { "methodParameter": [ { "paramName": "RefId", "paramValue": "5b72f2d4-7a83-4297-a71f-8b5fb26cbf14", "comparisonType": "EQUAL" }, { "paramName": "DOB:Year", "paramValue": "2010", "comparisonType": "GREATER" }, { "paramName": "RequireIsolation", "paramValue": "TRUE" } ] } } } ]
XML
<adminDirective id="a8c3c3e3-4b35-9d75-101d-00aa001a1652"> <timestamp>2021-06-18T01:04:42.283Z</timestamp> <!-- Mandatory: timestamp when request was issued. ISO 8601--> <timeout>P2D</timeout> <!-- Mandatory: When should the request expire if not fulfilled. e.g 2 days --> <serviceName>StudentPersonals</serviceName> <method>Refresh</method> <!-- Mandatory: Unique ID/Name or requested method --> <methodParameters> <!-- Optional: parameters applicable for the specific admin request. --> <methodParameter> <paramName>RefId</paramName> <paramValue>5b72f2d4-7a83-4297-a71f-8b5fb26cbf14</paramValue> <comparisonType>EQUAL</comparisonType> <!-- optional: If not provided EQUAL is assumed --> </methodParameter> <methodParameter> <paramName>DOB:Year</paramName> <paramValue>2010</paramValue> <comparisonType>GREATER</comparisonType> </methodParameter> <methodParameter> <paramName>RequireIsolation</paramName> <paramValue>TRUE</paramValue> </methodParameter> </methodParameters> </adminDirective>
Example 3.4.1-2: adminDirective2

### 3.4.2 createResponse

An HTTP Response with a status of 200 and a payload consisting of a single "createResponse" element. This includes, for each requested object successfully created, an internal status of 201 and the service-assigned refId. Any requested object that failed to be created is indicated by an error statusCode and a corresponding error payload.

SIF_Events are not reported for this object.

Figure 3.4.2-1: createResponse

| Element/@Attribute | Char | Privacy Rating | Description | Type
--- | --- | --- | --- | --- | ---
| createResponse |  |  | An HTTP Response with a status of 200 and a payload consisting of a single "createResponse" element. This includes, for each requested object successfully created, an internal status of 201 and the service-assigned refId. Any requested object that failed to be created is indicated by an error statusCode and a corresponding error payload. |
| creates | M |  |  | createsType

Table 3.4.2-1: createResponse
JSON
[ { "createResponse": { "creates": { "create": [ { "id": "df789e1c-dfe7-4c18-8ef0-d907b81ea61e", "advisoryId": "3", "statusCode": "201", "value": "" }, { "advisoryId": "1", "statusCode": "409", "error": { "id": "6f789e1c-dfe7-4c18-8ef0-d907b81ea61e", "code": 409, "scope": "StateConflict", "message": "Student already exists!" } }, { "id": "ff789e1c-dfe7-4c18-8ef0-d907b81ea61e", "advisoryId": "2", "statusCode": "201", "value": "" } ] } } } ]
XML
<createResponse> <creates> <create id="df789e1c-dfe7-4c18-8ef0-d907b81ea61e" advisoryId="3" statusCode="201" /> <create advisoryId="1" statusCode="409"> <error id="6f789e1c-dfe7-4c18-8ef0-d907b81ea61e"> <code>409</code> <scope>StateConflict</scope> <message>Student already exists!</message> </error> </create> <create id="ff789e1c-dfe7-4c18-8ef0-d907b81ea61e" advisoryId="2" statusCode="201" /> </creates> </createResponse>
Example 3.4.2-1: createResponse
JSON
[ { "createResponse": { "creates": { "create": [ { "id": "164da5d9bcbf4cf8a058ba0b0efde9ba", "advisoryId": "164da5d9bcbf4cf8a058ba0b0efde9ba", "statusCode": "404", "error": { "id": "ebd279f5-fd40-4f1a-80c1-894b922df670", "code": 400, "scope": "create student", "message": "Data not good." } }, { "id": "24ed508e1ed04bba82198233efa55859", "advisoryId": "24ed508e1ed04bba82198233efa55859", "statusCode": "201", "value": "" }, { "id": "2ae2d4a3a3c04d77ad843b73adac7747", "advisoryId": "2ae2d4a3a3c04d77ad843b73adac7747", "statusCode": "201", "value": "" }, { "id": "2bc9ff83dbbe44e596da64b7271ec25e", "advisoryId": "2bc9ff83dbbe44e596da64b7271ec25e", "statusCode": "404", "error": { "id": "db54c074-7b63-4898-9311-8b14113d1536", "code": 400, "scope": "create student", "message": "Data not good." } }, { "id": "399f1200f6034d8fbeda72a81b634639", "advisoryId": "399f1200f6034d8fbeda72a81b634639", "statusCode": "201", "value": "" } ] } } } ]
XML
<createResponse> <creates> <create id="164da5d9bcbf4cf8a058ba0b0efde9ba" advisoryId="164da5d9bcbf4cf8a058ba0b0efde9ba" statusCode="404"> <error id="ebd279f5-fd40-4f1a-80c1-894b922df670"> <code>400</code> <scope>create student</scope> <message>Data not good.</message> </error> </create> <create id="24ed508e1ed04bba82198233efa55859" advisoryId="24ed508e1ed04bba82198233efa55859" statusCode="201" /> <create id="2ae2d4a3a3c04d77ad843b73adac7747" advisoryId="2ae2d4a3a3c04d77ad843b73adac7747" statusCode="201" /> <create id="2bc9ff83dbbe44e596da64b7271ec25e" advisoryId="2bc9ff83dbbe44e596da64b7271ec25e" statusCode="404"> <error id="db54c074-7b63-4898-9311-8b14113d1536"> <code>400</code> <scope>create student</scope> <message>Data not good.</message> </error> </create> <create id="399f1200f6034d8fbeda72a81b634639" advisoryId="399f1200f6034d8fbeda72a81b634639" statusCode="201" /> </creates> </createResponse>
Example 3.4.2-2: createResponse2

### 3.4.3 deleteResponse

An HTTP Response with a status of 200 (success). It contains a payload consisting of a single "deleteResponse" element.

SIF_Events are not reported for this object.

Figure 3.4.3-1: deleteResponse

| Element/@Attribute | Char | Privacy Rating | Description | Type
--- | --- | --- | --- | --- | ---
| deleteResponse |  |  | An HTTP Response with a status of 200 (success). It contains a payload consisting of a single "deleteResponse" element. |
| deletes | M |  |  | deleteStatusCollectionType

Table 3.4.3-1: deleteResponse
JSON
[ { "deleteResponse": { "deletes": { "delete": [ { "id": "df789e1c-dfe7-4c18-8ef0-d907b81ea61e", "statusCode": "200", "value": "" }, { "id": "abc89e1c-34e7-4cde-908a-d9abc81ea09a", "statusCode": "404", "error": { "id": "6f789e1c-dfe7-4c18-8ef0-d907b81ea61e", "code": 404, "scope": "Not Found", "message": "Student does not exist!" } }, { "id": "ff789e1c-dfe7-4c18-8ef0-d907b81ea61e", "statusCode": "200", "value": "" } ] } } } ]
XML
<deleteResponse> <deletes> <delete id="df789e1c-dfe7-4c18-8ef0-d907b81ea61e" statusCode="200" /> <delete id="abc89e1c-34e7-4cde-908a-d9abc81ea09a" statusCode="404"> <error id="6f789e1c-dfe7-4c18-8ef0-d907b81ea61e"> <code>404</code> <scope>Not Found</scope> <message>Student does not exist!</message> </error> </delete> <delete id="ff789e1c-dfe7-4c18-8ef0-d907b81ea61e" statusCode="200" /> </deletes> </deleteResponse>
Example 3.4.3-1: deleteResponse

### 3.4.4 error

SIF_Events are reported for this object.

Figure 3.4.4-1: error

| Element/@Attribute | Char | Privacy Rating | Description | Type
--- | --- | --- | --- | --- | ---
| error |  |  |  |
@ | id | O |  |  | xs:token
| code | M |  | Corresponds to the value contained in the HTTPS Header Status-Code" field in which the Error Object is the payload. | xs:unsignedInt
| scope | M |  | Attempted operation. Ex: "Modify Student" | xs:string
| message | M |  | A simple, easy to understand, compact description of the error. The primary consumer of this message is the application user. Example: "Unable to open database." | xs:string
| description | Onillable="false" |  | An optional error description that is more complete and technical in nature. It is to be used as a diagnostic message in trouble-shooting procedures. Example: "The 'Students' table is opened in exclusive mode by user 'ADM1' (dbm.cpp, line 300)." | xs:string

Table 3.4.4-1: error
JSON
[ { "error": { "id": "E6011A0E-FBFD-4DD4-B361-6235E0B250FC", "code": 503, "scope": "Modify Student", "message": "Unable to open database.", "description": "The 'Students' table is opened in exclusive mode by user 'ADM1' (dbm.cpp, line 300)." } } ]
XML
<error id="E6011A0E-FBFD-4DD4-B361-6235E0B250FC"> <code>503</code> <scope>Modify Student</scope> <message>Unable to open database.</message> <description>The 'Students' table is opened in exclusive mode by user 'ADM1' (dbm.cpp, line 300).</description> </error>
Example 3.4.4-1: error

### 3.4.5 updateResponse

An HTTP Response with a status of 200 (success) and a location corresponding to the URL of the first successfully modified object. It contains a payload consisting of a single "updateResponse" element.

SIF_Events are not reported for this object.

Figure 3.4.5-1: updateResponse

| Element/@Attribute | Char | Privacy Rating | Description | Type
--- | --- | --- | --- | --- | ---
| updateResponse |  |  | An HTTP Response with a status of 200 (success) and a location corresponding to the URL of the first successfully modified object. It contains a payload consisting of a single "updateResponse" element. |
| updates | M |  |  | updatesType

Table 3.4.5-1: updateResponse
JSON
[ { "updateResponse": { "updates": { "update": [ { "id": "df789e1c-dfe7-4c18-8ef0-d907b81ea61e", "statusCode": "200", "value": "" }, { "id": "41953aaa-2811-11e6-b67b-9e71128cae77", "statusCode": "404", "error": { "id": "6f789e1c-dfe7-4c18-8ef0-d907b81ea61e", "code": 404, "scope": "Not Found", "message": "Student does not exist!" } }, { "id": "ff789e1c-dfe7-4c18-8ef0-d907b81ea61e", "statusCode": "200", "value": "" } ] } } } ]
XML
<updateResponse> <updates> <update id="df789e1c-dfe7-4c18-8ef0-d907b81ea61e" statusCode="200" /> <update id="41953aaa-2811-11e6-b67b-9e71128cae77" statusCode="404"> <error id="6f789e1c-dfe7-4c18-8ef0-d907b81ea61e"> <code>404</code> <scope>Not Found</scope> <message>Student does not exist!</message> </error> </update> <update id="ff789e1c-dfe7-4c18-8ef0-d907b81ea61e" statusCode="200" /> </updates> </updateResponse>
Example 3.4.5-1: updateResponse
JSON
[ { "updateResponse": { "updates": { "update": [ { "id": "164da5d9bcbf4cf8a058ba0b0efde9ba", "statusCode": "404", "error": { "id": "7ab3ce5f-23ba-44d4-8668-3b220603b954", "code": 404, "scope": "Student Not Found", "message": "Student with GUID = 164da5d9bcbf4cf8a058ba0b0efde9ba does not exist." } }, { "id": "24ed508e1ed04bba82198233efa55859", "statusCode": "200", "value": "" }, { "id": "2ae2d4a3a3c04d77ad843b73adac7747", "statusCode": "200", "value": "" }, { "id": "2bc9ff83dbbe44e596da64b7271ec25e", "statusCode": "404", "error": { "id": "1e982133-7a67-4955-bb57-4d3b0853d64b", "code": 404, "scope": "Student Not Found", "message": "Student with GUID = 2bc9ff83dbbe44e596da64b7271ec25e does not exist." } }, { "id": "399f1200f6034d8fbeda72a81b634639", "statusCode": "200", "value": "" } ] } } } ]
XML
<updateResponse> <updates> <update id="164da5d9bcbf4cf8a058ba0b0efde9ba" statusCode="404"> <error id="7ab3ce5f-23ba-44d4-8668-3b220603b954"> <code>404</code> <scope>Student Not Found</scope> <message>Student with GUID = 164da5d9bcbf4cf8a058ba0b0efde9ba does not exist.</message> </error> </update> <update id="24ed508e1ed04bba82198233efa55859" statusCode="200" /> <update id="2ae2d4a3a3c04d77ad843b73adac7747" statusCode="200" /> <update id="2bc9ff83dbbe44e596da64b7271ec25e" statusCode="404"> <error id="1e982133-7a67-4955-bb57-4d3b0853d64b"> <code>404</code> <scope>Student Not Found</scope> <message>Student with GUID = 2bc9ff83dbbe44e596da64b7271ec25e does not exist.</message> </error> </update> <update id="399f1200f6034d8fbeda72a81b634639" statusCode="200" /> </updates> </updateResponse>
Example 3.4.5-2: updateResponse2