# Quality

## getQualityControl

> This method returns the quality analysis result for a given transaction.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"5.1.16"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/people/transactions/qualityAnalysis/{tguid}":{"get":{"description":"This method returns the quality analysis result for a given transaction.","tags":["quality"],"operationId":"getQualityControl","summary":"getQualityControl","parameters":[{"name":"tguid","description":"Global unique ID of the transaction.","in":"path","required":true,"schema":{"type":"string"}},{"name":"biographicBase","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetQualityControlResponse"}}}}}}}},"components":{"schemas":{"GetQualityControlResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/QualityControl"}}},"QualityControl":{"type":"object","properties":{"tguid":{"description":"Transaction GUID.","type":"string","format":"uuid"},"pguid":{"description":"Person GUID.","type":"string","format":"uuid"},"created":{"description":"Creation timestamp (Unix, in milliseconds).","type":"integer","format":"int64"},"updated":{"description":"Update timestamp (Unix, in milliseconds).","type":"integer","format":"int64"},"qualityStatus":{"description":"Quality status.","type":"string","enum":["PENDING","APPROVED","REJECTED","OK","ERROR","PENDING_DUPLICITIES"]},"enrollStatus":{"description":"Enroll status.","type":"string","enum":["ENQUEUED","PROCESSING","ENROLLED","EXCEPTION","FAILED","REFUSED","PENDING","RESENT_ENROLL"]},"person":{"description":"A summary of the person (some fields may be omitted).","allOf":[{"$ref":"#/components/schemas/Person"}]},"transactionType":{"description":"Transaction type.","type":"string","enum":["ENROLL","UPDATE"]},"issues":{"type":"object","description":"Number of issues found per type.","properties":{"lowQuality":{"type":"integer","description":"Number of quality issues."},"duplication":{"type":"integer","description":"Number of duplication issues."},"sequenceControl":{"type":"integer","description":"Number of sequence control issues."}}},"apiID":{"description":"API ID","type":"string","format":"uuid"},"gbdsVersion":{"description":"GBDS Version","type":"string"}}},"Person":{"type":"object","properties":{"pguid":{"description":"Global unique ID of the Person. This attribute is assigned by the AFIS once the person is successfully enrolled","type":"string"},"lastEnrollTguid":{"description":"Global unique ID of the latest transaction on this Person.","type":"string"},"timestamp":{"description":"Timestamp of the latest transaction on this Person.","type":"integer","format":"int64"},"keys":{"type":"array","items":{"$ref":"#/components/schemas/Key"}},"biographics":{"type":"array","items":{"$ref":"#/components/schemas/Biographic"}},"biometric":{"type":"array","items":{"$ref":"#/components/schemas/Biometric"}},"auxiliaries":{"type":"array","items":{"$ref":"#/components/schemas/Biometric"}},"metadata":{"description":"Arbitrary data associated with the person.","type":"array","items":{"type":"string"}},"labels":{"description":"Arbitrary labels associated with a person, which can be used as filters for database queries.","uniqueItems":true,"type":"array","items":{"type":"string"}},"history":{"$ref":"#/components/schemas/History"},"biographicBaseStatus":{"$ref":"#/components/schemas/BiographicBaseStatus"}}},"Key":{"type":"object","properties":{"id":{"description":"Name of entity identifier.","type":"string"},"value":{"description":"Value of entity identifier.","type":"string"}}},"Biographic":{"type":"object","properties":{"id":{"description":"ID of the biographic data being stored.\n\nBiobase Server biographics have their IDs prepended with `bs-`. For example, `bs-name` and `bs-surname`.\n","type":"string"},"value":{"description":"Value of the biographic data.","type":"string"}}},"Biometric":{"type":"object","oneOf":[{"$ref":"#/components/schemas/CONSOLIDATED_TEMPLATE"},{"$ref":"#/components/schemas/TEMPLATE"},{"$ref":"#/components/schemas/ORIGINAL"}],"discriminator":{"propertyName":"source"}},"CONSOLIDATED_TEMPLATE":{"title":"CONSOLIDATED_TEMPLATE","type":"object","properties":{"source":{"description":"How the biometric data was obtained.","type":"string","enum":["CONSOLIDATED_TEMPLATE"]},"type":{"description":"Type of the biometric data.","type":"string","enum":["FINGERPRINT","PALMPRINT","FOOTPRINT","FACE","IRIS","SIGNATURE","SEQUENCE_CONTROL","NEWBORN_PALMPRINT","OTHER"]},"format":{"description":"Format of the biometric data.","type":"string","enum":["PRIVATE","ISO","ANSI","UNKNOWN","EBTS_TYPE9"]},"properties":{"$ref":"#/components/schemas/BiometricProperties"},"index":{"description":"Identifies which biometric, of the specified type, is being sent.","type":"integer","format":"int32"},"content":{"description":"Base64 encoded biometric data.","type":"string"},"quality":{"description":"Given the quality of the extracted biometric template. The quality is unbounded and starts at 0.","type":"integer","format":"int32"}}},"BiometricProperties":{"type":"object","properties":{"width":{"description":"Width, in pixels, of the image. If 0, GBDS will try to extract this information from the image header.","type":"integer","format":"int32"},"height":{"description":"Height, in pixels, of the image. If 0, GBDS will try to extract this information from the image header.","type":"integer","format":"int32"},"resolution":{"description":"Image or template resolution.","type":"integer","format":"int32"},"ratio":{"description":"Proportion of the image.","type":"number","format":"double"},"matcherId":{"description":"ID of the Biometric Matcher to be used in verification and identification operations.","type":"integer","format":"int32"},"extractorId":{"description":"ID of the extractor to be used on the image.","type":"integer","format":"int32"}}},"TEMPLATE":{"title":"TEMPLATE","type":"object","properties":{"source":{"description":"How the biometric data was obtained.","type":"string","enum":["TEMPLATE"]},"type":{"description":"Type of the biometric data.","type":"string","enum":["FINGERPRINT","PALMPRINT","FOOTPRINT","FACE","IRIS","SIGNATURE","SEQUENCE_CONTROL","NEWBORN_PALMPRINT","OTHER"]},"format":{"description":"Format of the biometric data.","type":"string","enum":["PRIVATE","ISO","ANSI","UNKNOWN","EBTS_TYPE9"]},"properties":{"$ref":"#/components/schemas/BiometricProperties"},"index":{"description":"Identifies which biometric, of the specified type, is being sent.","type":"integer","format":"int32"},"content":{"description":"Base64 encoded biometric data.","type":"string"},"quality":{"description":"Given the quality of the extracted biometric template. The quality is unbounded and starts at 0.","type":"integer","format":"int32"}}},"ORIGINAL":{"title":"ORIGINAL","type":"object","properties":{"source":{"description":"How the biometric data was obtained.","type":"string","enum":["ORIGINAL"]},"type":{"description":"Type of the biometric data.","type":"string","enum":["FINGERPRINT","PALMPRINT","FOOTPRINT","FACE","IRIS","VOICE","SIGNATURE","SEQUENCE_CONTROL","NEWBORN_PALMPRINT","OTHER"]},"format":{"description":"Format of the biometric data.","type":"string","enum":["RAW","WSQ","JPEG","JPEG2000","PNG","TIFF","GIF","BMP","PCM","WAV","PRIVATE","ISO","ANSI","UNKNOWN","EBTS_TYPE9"]},"properties":{"$ref":"#/components/schemas/BiometricProperties"},"index":{"description":"Identifies which biometric, of the specified type, is being sent.","type":"integer","format":"int32"},"content":{"description":"Base64 encoded biometric data.","type":"string"},"quality":{"description":"Given the quality of the extracted biometric template. The quality is unbounded and starts at 0.","type":"integer","format":"int32"}}},"History":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEvent"}}}},"HistoryEvent":{"required":["type"],"type":"object","properties":{"tguid":{"description":"Global unique ID of the transaction.","type":"string"},"timestamp":{"description":"Timestamp of event/transaction.","type":"integer","format":"int64"},"type":{"description":"Type of event/transaction.","type":"string"},"targetTguid":{"description":"Global unique ID of the transaction that was disabled.","type":"string"}},"discriminator":{"propertyName":"type"}},"BiographicBaseStatus":{"description":"Status of the biographic base.\n- `UNAVAILABLE`: When all Biobase Servers are off.\n- `TIMEOUT`: When at least one Biobase Server is ON but the call timed out.\n- `UNAUTHORIZED`:\n  - If the **lookAllServers** conf is **ON**, it indicates that all running servers returned that the API authentication is unauthorized.\n  - If the **lookAllServers** conf is **OFF**, it indicates that the server that received the biographic request returned that the API authentication is unauthorized.\n- `INVALID_DATA`: The Biobase Server returned that the data request from the API is invalid. It is not supposed to happen if Biobase Server is implemented according to the Biographic Base API.\n- `NOT_FOUND`:\n  - If the **lookAllServers** conf is **ON**, it indicates that the person keys were not found on all Biobase Servers configured.\n  - If the **lookAllServers** conf is **OFF**, it indicates that person keys were not found on the server that received the biographic request.\n- `OK`: The Biobase Server returned biographics/face for the given person keys.\n","type":"string","enum":["UNAVAILABLE","TIMEOUT","UNAUTHORIZED","INVALID_DATA","NOT_FOUND","OK"]}}}}
```

## listQualityControl

> This method returns a list of transactions with quality analysis.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"5.1.16"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/people/transactions/qualityAnalysis":{"get":{"description":"This method returns a list of transactions with quality analysis.","tags":["quality"],"operationId":"listQualityControl","summary":"listQualityControl","parameters":[{"name":"enrollStatus","description":"Select only enrolls with a specific status, e.g., ENROLLED.\n\nThis parameter can be a list. To do so, pass it multiple times with the desired values.\n\n**NOTE**: At least one of the parameters `enrollStatus` or `qualityStatus` is required.\n","in":"query","required":false,"schema":{"type":"string","enum":["ENQUEUED","PROCESSING","ENROLLED","EXCEPTION","FAILED","REFUSED","PENDING","RESENT_ENROLL"]}},{"name":"qualityStatus","description":"Filter with specific quality status.\n\nThis parameter can be a list. To do so, pass it multiple times with the desired values.\n\n**NOTE**: At least one of the parameters `enrollStatus` or `qualityStatus` is required.\n","in":"query","required":false,"schema":{"type":"string","enum":["PENDING","APPROVED","REJECTED","OK","ERROR","PENDING_DUPLICITIES"]}},{"name":"startDate","description":"Minimum timestamp, in milliseconds.","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"endDate","description":"Maximum timestamp, in milliseconds.","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"keys","description":"Array of keys that uniquely identify the person. This field can be an expression.\n\nThe following structure can be used for both `keys` and `biographics`:\n\n| Format         | Description                                                                                       |\n|----------------|---------------------------------------------------------------------------------------------------|\n| `<id>:<value>` | Searches for exceptions with incoming or reference keys/biographics with the passed id and value. |\n| `<id>:`        | Searches for exceptions with incoming or reference keys/biographics with the id and any value.    |\n| `:<value>`     | Searches for exceptions with incoming or reference keys/biographics with the value and any id.    |\n\nFrom the second keys/biographics item onwards, before each id or value, you can include an operator:\n- `[and]`: performs an AND operation with the previous item.\n- `[or]`: performs an OR operation with the previous item.\n\nThese operators may be applied to both keys and biographics.\n\nOn every operation on an id or value, the default behavior will be to test for exact matches.\nTo change this behavior, you can include a modifier at the end of the id or value:\n- `[exact]`: tests for exact matches. This is the default behavior, the same as not including any modifier.\n- `[atstart]`: searches for content that starts with the passed id/value.\n- `[atend]`: searches for content that ends with the passed id/value.\n- `[anywhere]`: searches for content that contains the passed id/value.\n\n**IMPORTANT**: Be careful when using modifiers other than `[exact]`. They can slow down the search.\n\nExamples:\n- `keys=cpf:001&biographics=name`\n- `keys=cpf:001&keys=[or]cpf:002`\n- `keys=cpf:00[atstart]`\n","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"biographics","description":"Biographic data of the person. This field can be an expression.\n\nFor expressions, use the same structure described in the `keys` parameter.\n","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"labels","description":"A list of labels that may be empty. This field can be an expression. For transactions with no labels, use \"labels=\".","in":"query","required":false,"schema":{"type":"string"}},{"name":"pageSize","description":"Defines the number of results per page.","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"pageIndex","description":"Defines which page will be returned.","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"orderBy","description":"Order the results by creation date or update date.","in":"query","required":false,"schema":{"type":"string","enum":["CREATED_ASC","CREATED_DESC","UPDATED_ASC","UPDATED_DESC"]}},{"name":"biographicBase","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListQualityControlResponse"}}}}}}}},"components":{"schemas":{"ListQualityControlResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/QualityControl"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"QualityControl":{"type":"object","properties":{"tguid":{"description":"Transaction GUID.","type":"string","format":"uuid"},"pguid":{"description":"Person GUID.","type":"string","format":"uuid"},"created":{"description":"Creation timestamp (Unix, in milliseconds).","type":"integer","format":"int64"},"updated":{"description":"Update timestamp (Unix, in milliseconds).","type":"integer","format":"int64"},"qualityStatus":{"description":"Quality status.","type":"string","enum":["PENDING","APPROVED","REJECTED","OK","ERROR","PENDING_DUPLICITIES"]},"enrollStatus":{"description":"Enroll status.","type":"string","enum":["ENQUEUED","PROCESSING","ENROLLED","EXCEPTION","FAILED","REFUSED","PENDING","RESENT_ENROLL"]},"person":{"description":"A summary of the person (some fields may be omitted).","allOf":[{"$ref":"#/components/schemas/Person"}]},"transactionType":{"description":"Transaction type.","type":"string","enum":["ENROLL","UPDATE"]},"issues":{"type":"object","description":"Number of issues found per type.","properties":{"lowQuality":{"type":"integer","description":"Number of quality issues."},"duplication":{"type":"integer","description":"Number of duplication issues."},"sequenceControl":{"type":"integer","description":"Number of sequence control issues."}}},"apiID":{"description":"API ID","type":"string","format":"uuid"},"gbdsVersion":{"description":"GBDS Version","type":"string"}}},"Person":{"type":"object","properties":{"pguid":{"description":"Global unique ID of the Person. This attribute is assigned by the AFIS once the person is successfully enrolled","type":"string"},"lastEnrollTguid":{"description":"Global unique ID of the latest transaction on this Person.","type":"string"},"timestamp":{"description":"Timestamp of the latest transaction on this Person.","type":"integer","format":"int64"},"keys":{"type":"array","items":{"$ref":"#/components/schemas/Key"}},"biographics":{"type":"array","items":{"$ref":"#/components/schemas/Biographic"}},"biometric":{"type":"array","items":{"$ref":"#/components/schemas/Biometric"}},"auxiliaries":{"type":"array","items":{"$ref":"#/components/schemas/Biometric"}},"metadata":{"description":"Arbitrary data associated with the person.","type":"array","items":{"type":"string"}},"labels":{"description":"Arbitrary labels associated with a person, which can be used as filters for database queries.","uniqueItems":true,"type":"array","items":{"type":"string"}},"history":{"$ref":"#/components/schemas/History"},"biographicBaseStatus":{"$ref":"#/components/schemas/BiographicBaseStatus"}}},"Key":{"type":"object","properties":{"id":{"description":"Name of entity identifier.","type":"string"},"value":{"description":"Value of entity identifier.","type":"string"}}},"Biographic":{"type":"object","properties":{"id":{"description":"ID of the biographic data being stored.\n\nBiobase Server biographics have their IDs prepended with `bs-`. For example, `bs-name` and `bs-surname`.\n","type":"string"},"value":{"description":"Value of the biographic data.","type":"string"}}},"Biometric":{"type":"object","oneOf":[{"$ref":"#/components/schemas/CONSOLIDATED_TEMPLATE"},{"$ref":"#/components/schemas/TEMPLATE"},{"$ref":"#/components/schemas/ORIGINAL"}],"discriminator":{"propertyName":"source"}},"CONSOLIDATED_TEMPLATE":{"title":"CONSOLIDATED_TEMPLATE","type":"object","properties":{"source":{"description":"How the biometric data was obtained.","type":"string","enum":["CONSOLIDATED_TEMPLATE"]},"type":{"description":"Type of the biometric data.","type":"string","enum":["FINGERPRINT","PALMPRINT","FOOTPRINT","FACE","IRIS","SIGNATURE","SEQUENCE_CONTROL","NEWBORN_PALMPRINT","OTHER"]},"format":{"description":"Format of the biometric data.","type":"string","enum":["PRIVATE","ISO","ANSI","UNKNOWN","EBTS_TYPE9"]},"properties":{"$ref":"#/components/schemas/BiometricProperties"},"index":{"description":"Identifies which biometric, of the specified type, is being sent.","type":"integer","format":"int32"},"content":{"description":"Base64 encoded biometric data.","type":"string"},"quality":{"description":"Given the quality of the extracted biometric template. The quality is unbounded and starts at 0.","type":"integer","format":"int32"}}},"BiometricProperties":{"type":"object","properties":{"width":{"description":"Width, in pixels, of the image. If 0, GBDS will try to extract this information from the image header.","type":"integer","format":"int32"},"height":{"description":"Height, in pixels, of the image. If 0, GBDS will try to extract this information from the image header.","type":"integer","format":"int32"},"resolution":{"description":"Image or template resolution.","type":"integer","format":"int32"},"ratio":{"description":"Proportion of the image.","type":"number","format":"double"},"matcherId":{"description":"ID of the Biometric Matcher to be used in verification and identification operations.","type":"integer","format":"int32"},"extractorId":{"description":"ID of the extractor to be used on the image.","type":"integer","format":"int32"}}},"TEMPLATE":{"title":"TEMPLATE","type":"object","properties":{"source":{"description":"How the biometric data was obtained.","type":"string","enum":["TEMPLATE"]},"type":{"description":"Type of the biometric data.","type":"string","enum":["FINGERPRINT","PALMPRINT","FOOTPRINT","FACE","IRIS","SIGNATURE","SEQUENCE_CONTROL","NEWBORN_PALMPRINT","OTHER"]},"format":{"description":"Format of the biometric data.","type":"string","enum":["PRIVATE","ISO","ANSI","UNKNOWN","EBTS_TYPE9"]},"properties":{"$ref":"#/components/schemas/BiometricProperties"},"index":{"description":"Identifies which biometric, of the specified type, is being sent.","type":"integer","format":"int32"},"content":{"description":"Base64 encoded biometric data.","type":"string"},"quality":{"description":"Given the quality of the extracted biometric template. The quality is unbounded and starts at 0.","type":"integer","format":"int32"}}},"ORIGINAL":{"title":"ORIGINAL","type":"object","properties":{"source":{"description":"How the biometric data was obtained.","type":"string","enum":["ORIGINAL"]},"type":{"description":"Type of the biometric data.","type":"string","enum":["FINGERPRINT","PALMPRINT","FOOTPRINT","FACE","IRIS","VOICE","SIGNATURE","SEQUENCE_CONTROL","NEWBORN_PALMPRINT","OTHER"]},"format":{"description":"Format of the biometric data.","type":"string","enum":["RAW","WSQ","JPEG","JPEG2000","PNG","TIFF","GIF","BMP","PCM","WAV","PRIVATE","ISO","ANSI","UNKNOWN","EBTS_TYPE9"]},"properties":{"$ref":"#/components/schemas/BiometricProperties"},"index":{"description":"Identifies which biometric, of the specified type, is being sent.","type":"integer","format":"int32"},"content":{"description":"Base64 encoded biometric data.","type":"string"},"quality":{"description":"Given the quality of the extracted biometric template. The quality is unbounded and starts at 0.","type":"integer","format":"int32"}}},"History":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEvent"}}}},"HistoryEvent":{"required":["type"],"type":"object","properties":{"tguid":{"description":"Global unique ID of the transaction.","type":"string"},"timestamp":{"description":"Timestamp of event/transaction.","type":"integer","format":"int64"},"type":{"description":"Type of event/transaction.","type":"string"},"targetTguid":{"description":"Global unique ID of the transaction that was disabled.","type":"string"}},"discriminator":{"propertyName":"type"}},"BiographicBaseStatus":{"description":"Status of the biographic base.\n- `UNAVAILABLE`: When all Biobase Servers are off.\n- `TIMEOUT`: When at least one Biobase Server is ON but the call timed out.\n- `UNAUTHORIZED`:\n  - If the **lookAllServers** conf is **ON**, it indicates that all running servers returned that the API authentication is unauthorized.\n  - If the **lookAllServers** conf is **OFF**, it indicates that the server that received the biographic request returned that the API authentication is unauthorized.\n- `INVALID_DATA`: The Biobase Server returned that the data request from the API is invalid. It is not supposed to happen if Biobase Server is implemented according to the Biographic Base API.\n- `NOT_FOUND`:\n  - If the **lookAllServers** conf is **ON**, it indicates that the person keys were not found on all Biobase Servers configured.\n  - If the **lookAllServers** conf is **OFF**, it indicates that person keys were not found on the server that received the biographic request.\n- `OK`: The Biobase Server returned biographics/face for the given person keys.\n","type":"string","enum":["UNAVAILABLE","TIMEOUT","UNAUTHORIZED","INVALID_DATA","NOT_FOUND","OK"]},"Pagination":{"type":"object","properties":{"total":{"description":"Total number of elements that matched the selection criteria.","type":"integer","format":"int64"},"count":{"description":"Number of elements in the response.","type":"integer","format":"int32"},"pageSize":{"description":"Size of the page.","type":"integer","format":"int32"},"currentPage":{"description":"Number of the current page.","type":"integer","format":"int64"},"totalPages":{"description":"Number of total pages.","type":"integer","format":"int64"}}}}}}
```

## qualityAnalysis

> This method provides the quality analysis result for a given transaction.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"5.1.16"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/people/transactions/{tguid}/qualityAnalysis":{"put":{"description":"This method provides the quality analysis result for a given transaction.","tags":["quality"],"operationId":"qualityAnalysis","summary":"qualityAnalysis","parameters":[{"name":"tguid","description":"Global unique ID of the transaction.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityAnalysisRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityAnalysisResponse"}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"403":{"description":"Enrollment is not assigned, enroll has a different assigned user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessingError"}}}},"404":{"description":"Enrollment transaction does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessingError"}}}},"422":{"description":"Invalid transaction state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessingError"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"UpdateQualityAnalysisRequest":{"type":"object","properties":{"data":{"type":"object","properties":{"qualityAnalysis":{"$ref":"#/components/schemas/QualityAnalysis"},"biometric":{"type":"array","items":{"$ref":"#/components/schemas/Biometric"}}}},"meta":{"$ref":"#/components/schemas/UpdateQualityAnalysisMeta"}}},"QualityAnalysis":{"type":"object","properties":{"status":{"description":"Status of the analysis.","type":"string","enum":["PENDING","APPROVED","REJECTED","OK","ERROR","PENDING_DUPLICITIES"]},"user":{"description":"Username of whom issued the approval.","type":"string"},"comments":{"description":"User comments on the approval.","type":"string"},"timestamp":{"description":"Creation time of the approval, be it manual or automatic. If the enroll did not have any anomalies, the approval was automatic, thus this field will be equal to the enroll time. Otherwise, this timestamp will be the time when the user either approved or rejected the enrollment.","type":"integer","format":"int64"},"duplicationIssues":{"type":"array","items":{"$ref":"#/components/schemas/DuplicationIssue"}},"qualityIssues":{"type":"array","items":{"$ref":"#/components/schemas/QualityIssue"}},"sequenceControlIssues":{"type":"array","items":{"$ref":"#/components/schemas/SequenceControlIssue"}}}},"DuplicationIssue":{"type":"object","properties":{"indexes":{"description":"List of pairs of duplicated indexes found.","type":"array","items":{"type":"integer","format":"int32"}}}},"QualityIssue":{"type":"object","properties":{"index":{"description":"Index of the referred finger.","type":"integer","format":"int32"},"quality":{"description":"Quality calculated for the template.","type":"integer","format":"int32"}}},"SequenceControlIssue":{"type":"object","properties":{"index":{"description":"Index of the problematic finger.","type":"integer","format":"int32"},"matches":{"description":"List of sequence control indexes that matched the given finger and its matching score.","type":"array","items":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"}}}}}},"Biometric":{"type":"object","oneOf":[{"$ref":"#/components/schemas/CONSOLIDATED_TEMPLATE"},{"$ref":"#/components/schemas/TEMPLATE"},{"$ref":"#/components/schemas/ORIGINAL"}],"discriminator":{"propertyName":"source"}},"CONSOLIDATED_TEMPLATE":{"title":"CONSOLIDATED_TEMPLATE","type":"object","properties":{"source":{"description":"How the biometric data was obtained.","type":"string","enum":["CONSOLIDATED_TEMPLATE"]},"type":{"description":"Type of the biometric data.","type":"string","enum":["FINGERPRINT","PALMPRINT","FOOTPRINT","FACE","IRIS","SIGNATURE","SEQUENCE_CONTROL","NEWBORN_PALMPRINT","OTHER"]},"format":{"description":"Format of the biometric data.","type":"string","enum":["PRIVATE","ISO","ANSI","UNKNOWN","EBTS_TYPE9"]},"properties":{"$ref":"#/components/schemas/BiometricProperties"},"index":{"description":"Identifies which biometric, of the specified type, is being sent.","type":"integer","format":"int32"},"content":{"description":"Base64 encoded biometric data.","type":"string"},"quality":{"description":"Given the quality of the extracted biometric template. The quality is unbounded and starts at 0.","type":"integer","format":"int32"}}},"BiometricProperties":{"type":"object","properties":{"width":{"description":"Width, in pixels, of the image. If 0, GBDS will try to extract this information from the image header.","type":"integer","format":"int32"},"height":{"description":"Height, in pixels, of the image. If 0, GBDS will try to extract this information from the image header.","type":"integer","format":"int32"},"resolution":{"description":"Image or template resolution.","type":"integer","format":"int32"},"ratio":{"description":"Proportion of the image.","type":"number","format":"double"},"matcherId":{"description":"ID of the Biometric Matcher to be used in verification and identification operations.","type":"integer","format":"int32"},"extractorId":{"description":"ID of the extractor to be used on the image.","type":"integer","format":"int32"}}},"TEMPLATE":{"title":"TEMPLATE","type":"object","properties":{"source":{"description":"How the biometric data was obtained.","type":"string","enum":["TEMPLATE"]},"type":{"description":"Type of the biometric data.","type":"string","enum":["FINGERPRINT","PALMPRINT","FOOTPRINT","FACE","IRIS","SIGNATURE","SEQUENCE_CONTROL","NEWBORN_PALMPRINT","OTHER"]},"format":{"description":"Format of the biometric data.","type":"string","enum":["PRIVATE","ISO","ANSI","UNKNOWN","EBTS_TYPE9"]},"properties":{"$ref":"#/components/schemas/BiometricProperties"},"index":{"description":"Identifies which biometric, of the specified type, is being sent.","type":"integer","format":"int32"},"content":{"description":"Base64 encoded biometric data.","type":"string"},"quality":{"description":"Given the quality of the extracted biometric template. The quality is unbounded and starts at 0.","type":"integer","format":"int32"}}},"ORIGINAL":{"title":"ORIGINAL","type":"object","properties":{"source":{"description":"How the biometric data was obtained.","type":"string","enum":["ORIGINAL"]},"type":{"description":"Type of the biometric data.","type":"string","enum":["FINGERPRINT","PALMPRINT","FOOTPRINT","FACE","IRIS","VOICE","SIGNATURE","SEQUENCE_CONTROL","NEWBORN_PALMPRINT","OTHER"]},"format":{"description":"Format of the biometric data.","type":"string","enum":["RAW","WSQ","JPEG","JPEG2000","PNG","TIFF","GIF","BMP","PCM","WAV","PRIVATE","ISO","ANSI","UNKNOWN","EBTS_TYPE9"]},"properties":{"$ref":"#/components/schemas/BiometricProperties"},"index":{"description":"Identifies which biometric, of the specified type, is being sent.","type":"integer","format":"int32"},"content":{"description":"Base64 encoded biometric data.","type":"string"},"quality":{"description":"Given the quality of the extracted biometric template. The quality is unbounded and starts at 0.","type":"integer","format":"int32"}}},"UpdateQualityAnalysisMeta":{"type":"object","properties":{"timeout":{"description":"Time, in milliseconds, waiting for the completion of the operation. If this value is -1, then the method is fully synchronous. If the timeout value is 0, then the method is fully asynchronous. If>0, the call expires after this time (in milliseconds).","type":"integer","format":"int32"}}},"UpdateQualityAnalysisResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"newTransactionGUID":{"description":"Transaction GUID for new enroll transaction generated.","type":"string"}}}}},"ValidationError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["VALIDATION_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["MISSING_PGUID","MISSING_PERSON","MISSING_BIOMETRIC","INVALID_PARAMETER_COMBINATION","MISSING_REQUIRED_QUERY_PARAMETER","MISSING_REQUIRED_ENTITY_ATTRIBUTE","UNKNOWN_ENTITY_ATTRIBUTE","QUERY_PARAMETER_OUT_OF_RANGE","PARAMETER_OUT_OF_RANGE","PGUID_IS_EMPTY","FORBIDDEN_ATTRIBUTE_SET","INVALID_TOKEN_GRANT_SPEC","INVALID_ENUM_VALUE","MALFORMED_JSON","INVALID_JSON_ATTRIBUTE_VALUE","INVALID_URL_ATTRIBUTE_VALUE","UNKNOWN_REQUEST_READ_ERROR","PAGE_NOT_FOUND","UNSUPPORTED_HTTP_METHOD"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}},"ProcessingError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["PROCESSING_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["ENTITY_DOES_NOT_EXIST","ENTITY_ALREADY_EXISTS","POOR_BIOMETRIC_QUALITY","DUPLICATED_BIOMETRIC","BIOMETRIC_OUT_OF_SEQUENCE","BIOMETRIC_ERROR","INSUFFICIENT_TEMPLATE_COUNT","UNEXTRACTABLE_BIOMETRIC","PERSON_DOES_NOT_EXIST","PERSON_NOT_ACTIVE","PERSON_DOES_NOT_HAVE_BIOMETRIC","PENDING_EXCEPTIONS","ENROLL_TRANSACTION_DOES_NOT_EXIST","ENROLL_PERSON_NOT_FOUND","INVALID_TRANSACTION_STATE","EXCEPTION_DOES_NOT_EXIST","TREAT_EXCEPTION_TRANSACTION_DOES_NOT_EXIST","USER_NOT_AUTHORIZED_TO_TREAT_EXCEPTION","UL_IS_ALREADY_SOLVED","INVALID_PARAMETER_COMBINATION","CAN_NOT_DISABLE_ONLY_ENROLL_TRANSACTION","PERSON_DOES_NOT_OWN_TRANSACTION","TRANSACTION_IS_ALREADY_DISABLED","CAN_NOT_DISABLE_TRANSACTION_OF_UNSUPPORTED_TYPE","INVALID_EBTS_TYPE9_CONTENT","EXTERNAL_ID_DOES_NOT_EXIST","EXCEPTION_IS_ALREADY_TREATED","INVALID_TREATMENT_FOR_EXCEPTION","ENROLL_IS_ALREADY_ASSIGNED","ENROLL_IS_ALREADY_UNASSIGNED","ENROLL_IS_NOT_PENDING","ENROLL_IS_NOT_ASSIGNED","ENROLL_HAS_DIFFERENT_ASSIGNED_USER","NO_PGUID_FOUND_FOR_KEY","NO_SEARCHABLE_BIOMETRIC"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}},"InternalError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["INTERNAL_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["DRIVER_OFFLINE","CREDENTIAL_SERVER_CONNECTION_ERROR","CLIENT_NOT_INITIALIZE","TRUSTED_ENROLL_WITH_PENDING_STATUS","SUBJECT_NOT_SET","UNKNOWN"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}}}}}
```

## unassignPendingEnroll

> This method removes the assignment of a user to quality analysis.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"5.1.16"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/people/transactions/{tguid}/qualityAnalysis/users":{"delete":{"description":"This method removes the assignment of a user to quality analysis.","tags":["quality"],"operationId":"unassignPendingEnroll","summary":"unassignPendingEnroll","parameters":[{"name":"tguid","description":"Global unique ID of the transaction.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Enrollment transaction does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessingError"}}}},"422":{"description":"Enrollment is not pending, enrollment is already unassigned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessingError"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"ProcessingError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["PROCESSING_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["ENTITY_DOES_NOT_EXIST","ENTITY_ALREADY_EXISTS","POOR_BIOMETRIC_QUALITY","DUPLICATED_BIOMETRIC","BIOMETRIC_OUT_OF_SEQUENCE","BIOMETRIC_ERROR","INSUFFICIENT_TEMPLATE_COUNT","UNEXTRACTABLE_BIOMETRIC","PERSON_DOES_NOT_EXIST","PERSON_NOT_ACTIVE","PERSON_DOES_NOT_HAVE_BIOMETRIC","PENDING_EXCEPTIONS","ENROLL_TRANSACTION_DOES_NOT_EXIST","ENROLL_PERSON_NOT_FOUND","INVALID_TRANSACTION_STATE","EXCEPTION_DOES_NOT_EXIST","TREAT_EXCEPTION_TRANSACTION_DOES_NOT_EXIST","USER_NOT_AUTHORIZED_TO_TREAT_EXCEPTION","UL_IS_ALREADY_SOLVED","INVALID_PARAMETER_COMBINATION","CAN_NOT_DISABLE_ONLY_ENROLL_TRANSACTION","PERSON_DOES_NOT_OWN_TRANSACTION","TRANSACTION_IS_ALREADY_DISABLED","CAN_NOT_DISABLE_TRANSACTION_OF_UNSUPPORTED_TYPE","INVALID_EBTS_TYPE9_CONTENT","EXTERNAL_ID_DOES_NOT_EXIST","EXCEPTION_IS_ALREADY_TREATED","INVALID_TREATMENT_FOR_EXCEPTION","ENROLL_IS_ALREADY_ASSIGNED","ENROLL_IS_ALREADY_UNASSIGNED","ENROLL_IS_NOT_PENDING","ENROLL_IS_NOT_ASSIGNED","ENROLL_HAS_DIFFERENT_ASSIGNED_USER","NO_PGUID_FOUND_FOR_KEY","NO_SEARCHABLE_BIOMETRIC"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}},"InternalError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["INTERNAL_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["DRIVER_OFFLINE","CREDENTIAL_SERVER_CONNECTION_ERROR","CLIENT_NOT_INITIALIZE","TRUSTED_ENROLL_WITH_PENDING_STATUS","SUBJECT_NOT_SET","UNKNOWN"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}}}}}
```

## assignPendingEnroll

> This method assigns a quality analysis operation to a given user.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"5.1.16"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/people/transactions/{tguid}/qualityAnalysis/users/{userName}":{"put":{"description":"This method assigns a quality analysis operation to a given user.","tags":["quality"],"operationId":"assignPendingEnroll","summary":"assignPendingEnroll","parameters":[{"name":"tguid","description":"Global unique ID of the transaction.","in":"path","required":true,"schema":{"type":"string"}},{"name":"userName","description":"ID of the user.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Enrollment transaction does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessingError"}}}},"422":{"description":"Enrollment is not pending, enrollment is already assigned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessingError"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"ProcessingError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["PROCESSING_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["ENTITY_DOES_NOT_EXIST","ENTITY_ALREADY_EXISTS","POOR_BIOMETRIC_QUALITY","DUPLICATED_BIOMETRIC","BIOMETRIC_OUT_OF_SEQUENCE","BIOMETRIC_ERROR","INSUFFICIENT_TEMPLATE_COUNT","UNEXTRACTABLE_BIOMETRIC","PERSON_DOES_NOT_EXIST","PERSON_NOT_ACTIVE","PERSON_DOES_NOT_HAVE_BIOMETRIC","PENDING_EXCEPTIONS","ENROLL_TRANSACTION_DOES_NOT_EXIST","ENROLL_PERSON_NOT_FOUND","INVALID_TRANSACTION_STATE","EXCEPTION_DOES_NOT_EXIST","TREAT_EXCEPTION_TRANSACTION_DOES_NOT_EXIST","USER_NOT_AUTHORIZED_TO_TREAT_EXCEPTION","UL_IS_ALREADY_SOLVED","INVALID_PARAMETER_COMBINATION","CAN_NOT_DISABLE_ONLY_ENROLL_TRANSACTION","PERSON_DOES_NOT_OWN_TRANSACTION","TRANSACTION_IS_ALREADY_DISABLED","CAN_NOT_DISABLE_TRANSACTION_OF_UNSUPPORTED_TYPE","INVALID_EBTS_TYPE9_CONTENT","EXTERNAL_ID_DOES_NOT_EXIST","EXCEPTION_IS_ALREADY_TREATED","INVALID_TREATMENT_FOR_EXCEPTION","ENROLL_IS_ALREADY_ASSIGNED","ENROLL_IS_ALREADY_UNASSIGNED","ENROLL_IS_NOT_PENDING","ENROLL_IS_NOT_ASSIGNED","ENROLL_HAS_DIFFERENT_ASSIGNED_USER","NO_PGUID_FOUND_FOR_KEY","NO_SEARCHABLE_BIOMETRIC"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}},"InternalError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["INTERNAL_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["DRIVER_OFFLINE","CREDENTIAL_SERVER_CONNECTION_ERROR","CLIENT_NOT_INITIALIZE","TRUSTED_ENROLL_WITH_PENDING_STATUS","SUBJECT_NOT_SET","UNKNOWN"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.griaule.com/apis/gbds-5/quality.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
