20.2.1Resources Summary
Graphical diagram in which we can see the different URIs exposed in the API.
20.2.2Representation Format
The DB Anonymizer API supports the transmission of binary files and strings via HTML FORM ("multipart/form-data" or "application/x-www-form-urlencoded") . The request format is specified using the Content-Type header and is required for operations that have a request body. The response format is in plain text ("text/plain") or in XML ("text/xml"), for which XML Schema specifications are provided (see this link).
20.2.3Representation Transport
Resource representation is transmitted between client and server by using HTTP 1.1 protocol, as defined by IETF RFC-2616. Each time an HTTP request contains payload, a Content-Type header shall be used to specify the MIME type of wrapped representation. In addition, both client and server may use as many HTTP headers as they consider necessary.
API consumer must indicate the resource identifier while invoking a GET or POST or DELETE operation. DB Anonymizer API combines both identification and location by terms of URL, for methods for retrieving a computation result, but also allows the user to specify them by HTTP FORM. Each URL-enabled invocation provides the URL of the target resource along the verb and any required input data. That URL is used to identify unambiguously the resource. For HTTP transport, this is made using the mechanisms described by HTTP protocol specification as defined by IETF RFC-2616.
20.2.5Links and References
Reference to Open Specification, DB Anonymizer
20.2.6Versions
Only one version of the Open Specification is currently supported.
20.2.7Extensions
The DB Anonymizer GE supports implementation-specific extensions, through the methods specified in Common aspects in FI-WARE Open Restful API Specifications.
20.2.8Faults Synchronous Faults
Fault Element
|
Associated Error Codes
|
Expected in All Requests?
|
Return Message
|
GET /get* (all get methods)
|
HTTP 204
|
NO
|
Error in retrieving the requested result
|
GET /get * (all get methods)
|
HTTP 400
|
NO
|
Error in Request ID
|
GET /getPolicyResult
|
HTTP 400
|
NO
|
Error: The DB file is not in ZIP format
|
GET /get * (all get methods)
|
HTTP 400
|
NO
|
Error: Problem with input file
|
GET /getPolicyResult
|
HTTP 400
|
NO
|
Error: Problem with input DB dump
|
GET /getPolicyResult
|
HTTP 400
|
NO
|
Error: fault in policy parsing and/or setting
|
GET /get * (all get methods)
|
HTTP 500
|
NO
|
Error: DB communication problem
|
GET /get * (all get methods)
|
HTTP 500
|
NO
|
Error: fault in DB setup
|
Remark: HTTP Status 204 in response to /get * (all get methods) indicates that computation result is not yet available (coherently with the HTTP Status definition "No Content").
Asynchronous Faults
No Asynchronous Faults are used by DB Anonymizer
20.3.1Operations
A WADL specification for these methods can be found on the FI-WARE Catalogue.
Verb
|
URI
|
Description
|
POST
|
/evaluatePolicy
|
Starts the re-identification risk computation on the input: a MySQL DB table dump and a disclosure policy.
|
GET
|
/getPolicyResult/{RequestID}
|
Retrieves all available information about the context entity (flat, without attribute domains)
|
POST
|
/evaluateColumnRisk
|
Starts a per-column estimation of the impact on re-identification risk on the input: a MySQL DB table dump.
|
GET
|
/getColumnRisk/{RequestID}
|
Retrieves all available information about the context entity (flat, without attribute domains)
|
POST
|
/evaluateDeepSearch
|
Starts to compute all disclosure policies that matches a certain upper-bound value for re-identification risk on the input: a MySQL DB table dump, an initial disclosure policy and an upper-bound value for re-identification risk.
|
GET
|
/getDeepSearch/{RequestID}/{count}/{offset}
|
Retrieves all available information about the context entity (flat, without attribute domains)
|
POST
|
/anonymizeDataset
|
Anonymizes a dataset according to a disclosure policy, therefore it takes as input: a MySQL DB table dump, a disclosure policy.
|
GET
|
/getAnonymizeDataset/{RequestID}
|
Retrieves the anonymize
|
NOTE: The following resources must be provided in a HTML FORM ("multipart/form-data" or "application/x-www-form-urlencoded")
Description: evaluatePolicy
-
Correct Response: HTTP 200
-
Input:
-
a zipped MySQL table dump id: "dbDump", containing only a single table called "working_table", together with its elements. Allowed SQL commands: CREATE TABLE, INSERT
-
a disclosure policy file id: "policyFile", compliant with this XML Schema definition, for example:
Gender
identifier
false
Wine
sensitive
true
this policy foresees attribute suppression as data anonymization technique.
-
Return type: it returns a RequestID (string).
A sample of the required inputs is available on the FI-WARE Catalogue at this link.
Description: getPolicyResult
-
Correct Response: HTTP 200 .
-
Alternative: HTTP 204 (No Content), when computation result is not ready.
-
Input: a RequestID (string)
-
Return type: the likelihood (0->impossibility, 1->certainty) that an attacker can reconstruct exactly a table's content, that is anonymized using a certain obfuscation policy.
Description: evaluateColumnRisk
-
Correct Response: HTTP 200
-
Input:
-
a zipped MySQL table dump id: "dbDump", containing only a single table called "working_table", together with its elements. Allowed SQL commands: CREATE TABLE, INSERT
-
Return type: it returns a RequestID (string). If invoked with 800x600 Normal 0 21 false false false FR X-NONE X-NONE MicrosoftInternetExplorer4 "Content-type" HTTP header equals to "application/x-www-form-urlencoded", the result is encoded in an XML message using [ResultID] XML Schema.
Description: getColumnRisk
-
Correct Response: HTTP 200 .
-
Alternative: HTTP 204 (No Content), when computation result is not ready.
-
Input: a RequestID (string), as part of the URL (URL Param).
-
Return type: an indication of the impact on the re-identification risk, computed for each column of the dataset. The result is embedded into a RiskColumnResult XML document (described by [this] XML Schema).
Description: evaluateDeepSearch
-
Correct Response: HTTP 200
-
Input:
-
a zipped MySQL table dump id: "dbDump", containing only a single table called "working_table", together with its elements. Allowed SQL commands: CREATE TABLE, INSERT
-
a disclosure policy file id: "policyFile", compliant with this XML Schema definition
-
a string id: "maxRisk", containing a floating point number. It represents an upper bound for the re-identification risk of the alternative policies to be returned.
-
Return type: it returns a RequestID (string). If invoked with "Content-type" HTTP header equals to "application/x-www-form-urlencoded", the result is encoded in an XML message using ResultID XML Schema.
A sample of the required inputs is available on the FI-WARE Catalogue at this link.
Description: getDeepSearch
-
Correct Response: HTTP 200 .
-
Alternative: HTTP 204 (No Content), when computation result is not ready.
-
Input as part of the URL (URL Param):
-
a RequestID (string)
-
an integer "count", that represents the number of alternative policies to return
-
an integer "offset", that specifies how many policies to ignore for creating the return entity. E.g., /gid/10/20 would return 10 policies starting from alternative #20.
-
Return type: a set of anonymization policies, whose re-identification risk is below the specified maxRisk paramenter. The result is embedded into a PolicyProposalResult XML document (described by this XML Schema). Example:
0
0.25125
[...policy description, in the same format as the input policy...]
[...another policy proposal element...]
Description: anonymizeDataset
-
Correct Response: HTTP 200
-
Input:
-
a zipped MySQL table dump id: "dbDump", containing only a single table called "working_table", together with its elements. Allowed SQL commands: CREATE TABLE, INSERT
-
a disclosure policy file id: "policyFile", compliant with this XML Schema definition
-
Return type: it returns a RequestID (string). If invoked with "Content-type" HTTP header equals to "application/x-www-form-urlencoded", the result is encoded in an XML message using ResultID XML Schema.
A sample of the required inputs is available on the FI-WARE Catalogue at this link.
Description: getAnonymizeDataset
-
Correct Response: HTTP 200 .
-
Alternative: HTTP 204 (No Content), when computation result is not ready.
-
Input as part of the URL (URL Param):
-
Return type: a text file (in CSV format) containing the anonymized dataset.
Share with your friends: |