...
Gliffy | ||||||
---|---|---|---|---|---|---|
|
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 | 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 |
---|
...
theme | Midnight |
---|---|
collapse | true |
...
POST /commonModelElements/{commonModelElementId}/getEnumValues
Operation: getEnumValues
returns the enum values of a commonModelElement attribute
Inputs commonModelElementId: identifies the attribute as 'attribute~attribName~version'
Outputs:
on success: status code 200 with [ enumValues ]
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:
POST /commonModelElements/attribute~nfRole~1.0/getEnumValues
Sample Success Response:
HTTP/1.1 200 OK
content-type: application/json
content-length: 12345
[
vFW,
vFW-A,
vFW-B,
]
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
...