...
Gliffy Diagram | ||||||
---|---|---|---|---|---|---|
|
See also Data Dictionary API Swagger
POMBA will include the functionality of validating processed data against Data Dictionary tool.
...
POMBA will include interface to consume the following APIs:
...
Operation Action |
...
theme | Midnight |
---|---|
collapse | true |
...
HTTP Method | Resource URL relative to {serverRoot} | |
Get common model element enum values | GET or POST | /commonModelElements/ {commonModelElementId}/getEnumValues |
...
Query instance table rows by column values | GET or POST | /commonModelElements/ {commonModelElementId}/ getInstanceTableRows |
Validate instance (either instance conforms to type, or rows conform to an instance table) | POST | /commonModelElements/ {commonModelElementId}/validateInstance |
The following may need updating based on latest version of the API
validateInstance
case | return code | return value |
---|---|---|
valid name; valid value | 200 | |
valid name; invalid value | 400 | ????? |
invalid name | 400 or 404?? | ???? |
other error, such as malformed url | 400? | ???? |
...
Can this currently differentiate between 1) supported, bad value and 2) unsupported field?
Code Block | ||||
---|---|---|---|---|
| ||||
POST /commonModelElements/{commonModelElementId}/validateInstance Operation: validateInstance validates whether an instance conforms to a type (for example: a value conforms to the constraints of an attribute type, or, one or more rows of values conforms to the constraints of an instance table) Inputs commonModelElementId: identifies the entity defining the constraints as 'entityType~entityName~entityVer' Inputs (JSON body variables): { "instance": instanceSchema } where instanceSchema is the instance to be validated Outputs: on success: status code 204 on failure: status code 400 with json array of error messages: [ errorMessage ] other failure status codes may be returned if for instance the proxy is down (503) Note: a pointer to a file containing the validation errors will be returned; if less than 1Meg of validation errors occur, they will also be returned in the error message array Headers: x-authorization: Basic XXXXXXXXXXXXXXXX Content-Type: application/json Sample Request: POST /commonModelElements/instance~nfValuesCatalog~1.0/validateInstance HTTP/1.1 { “instance”: [ { "LineofBusiness": "string", "NFFunction": "string", "NFNamingCode": "string", "NFRole": "string", "NFType": "string", "NFCFunction": "string", "NFCNamingCode": "string", "OwningEntity": "string" } ] } Sample Success Response: HTTP/1.1 204 No Content Sample Error Response: HTTP/1.1 400 content-type: application/json [ "error message 1" ] |
getInstanceTableRows
Code Block | ||||
---|---|---|---|---|
| ||||
POST /commonModelElements/{commonModelElementId}/getInstanceTableRowsWithMatchingColumns Operation: getInstanceTableRows returns an array of instance table rows containing the column values provided as input Inputs (pathstring variables): commonModelElementId: identifies the instance table as 'instance~instName~version' Inputs (JSON body variables): { "columnKey1": "columnValueToMatch1", "columnKey2": "columnValueToMatch2" } where as many column keys as necessary must be supplied and the match is done as an AND across all key values (i.e., all key values must match) Outputs: on success: status code 200 with [ instanceTableRows ] on failure: status code 400 with json array of error messages: [ errorMessage ] other failure status codes may be returned if for instance the proxy is down (503) Headers: x-authorization: Basic XXXXXXXXXXXXXXXX Content-Type: application/json Sample Request: POST /commonModelElements/instance~nfValuesCatalog~1.0/getInstanceTableRowsWithMatchingColumns { "NFRole": "NF-ROLE-A", "NFType": "NF-TYPE-A", } Sample Success Response: HTTP/1.1 200 OK content-type: application/json [ { "LineofBusiness": "string", "NFFunction": "string", "NFNamingCode": "string", "NFRole": "NF-ROLE-A", "NFType": "NF-TYPE-A", "NFCFunction": "string" }, { "LineofBusiness": "string", "NFFunction": "string", "NFNamingCode": "string", "NFRole": "NF-ROLE-A", "NFType": "NF-TYPE -A", "NFCFunction": "string" } ] Sample Error response: HTTP/1.1 400 content-type: application/json [ "error message 1", "error message 2" ] |
Validate Single Attribute
Code Block | ||||
---|---|---|---|---|
| ||||
POST /commonModelElements/{commonModelElementId}/validateInstance
Operation: validate attribute value
validates whether an instance conforms to a type for a single attribute
Inputs commonModelElementId: identifies the entity defining the constraints as
'attribute~attributeName~entityVer'
Inputs (JSON body variables):
{ "instance": instanceSchema }
where instanceSchema is the attribute value under a test
Outputs:
on success: status code 204
on failure: status code 400 with errorMessage
other failure status codes may be returned if for instance the proxy
is down (503)
Note: a pointer to a file containing the validation errors will be returned;
if less than 1Meg of validation errors occur, they will also be returned
in the error message array
Headers:
x-authorization: Basic XXXXXXXXXXXXXXXX
Content-Type: application/json
Sample Request:
POST /commonModelElements/attribute~nfRole~1.0/validateInstance HTTP/1.1
{
"instance": "someValue"
}
Sample Success Response:
HTTP/1.1 204 No Content
Sample Error Response:
HTTP/1.1 400
content-type: application/json
{
"error message 1"
}
|
Error Reporting
Confirm whether all of these are expected to be applicable to the data dictionary implementation
Code | Reason Phrase | Description |
200 | OK | The action has been performed successfully and the response includes the requested entity. Success response for GET requests |
201 | Created | The resource was successfully created |
202 | Accepted | The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. |
204 | No Content | The action has been performed successfully but the response does not contain an entity. |
304 | Not Modified | Returned by GET requests if the etag identified by the if-none-match request header matches the etag associated with the requested resource. |
400 | Bad Request | Many possible reasons not specified by the other codes (e.g., missing required parameters or incorrect format). |
401 | Unauthorized | Authentication failed or was not provided in the x-authorization header. |
403 | Forbidden | Authorization error: The client has insufficient permissions to access the resource |
404 | Not Found | The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. |
405 | Method Not Allowed | A request was made of a resource using a request method not supported by that resource (e.g., using PUT on a REST resource that only supports POST). |
500 | Internal Server Error | The server encountered an internal error or timed out; please retry (general catch-all server-side error).HTTP 500 errors may be mapped to SVC1000 (no server resources). |
502 | Bad Gateway | The proxy was not able to get a valid response from the application server. |
503 | Service Unavailable | The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. |
504 | Gateway Timeout | The server, while acting as a gateway or proxy, did not receive a timely response from the upstream process. |