Overview

integration

See also Data Dictionary API Swagger

POMBA will include the functionality of validating processed data against Data Dictionary tool.

POMBA will specify APIs which it will be able to consume to integrate with Data Dictionary.  Data Dictionary itself is not part of POMBA sub-components.

API should support the following use cases:

  1. Please get me the list of valid values for this attribute
  2. Here is a value, please tell me if it meets constraints of the attribute (length, type, regex, range, enum, etc.)
  3. Here is a subset of attributes in a larger reference table/object, please return full rows that match subset.  Note, subset could be one attribute.
  4. Here is a fully qualified row in a reference table/object, please tell me if it's valid

Data Dictionary APIs

Specific APIs

POMBA will include interface to consume the following APIs:

Operation Action

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

casereturn codereturn value
valid name; valid value200
valid name; invalid value400?????
invalid name400 or 404??????
other error, such as malformed url400?????


Can this currently differentiate between 1) supported, bad value and 2) unsupported field?

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"
]

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.

  • No labels