# Quality

## qualityAnalysis

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

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"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":{"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":{"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":{"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":"4.7.0"},"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":{"*/*":{"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":"4.7.0"},"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":{"*/*":{"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"}}}}}}
```
