# Api

## ping

> This method is used to check the API availability.

```json
{"openapi":"3.0.1","info":{"title":"PSBio API Documentation","version":"5.6.7"},"servers":[{"url":"http://<ip>:8084","description":"Generated server url"}],"paths":{"/gbs-psbio-server/service/ac-api/ping":{"get":{"description":"This method is used to check the API availability.","tags":["api"],"operationId":"ping","summary":"ping","responses":{"200":{"description":"default response","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## getTransactionResult

> This method returns the result of a transaction, given its TCN.

```json
{"openapi":"3.0.1","info":{"title":"PSBio API Documentation","version":"5.6.7"},"servers":[{"url":"http://<ip>:8084","description":"Generated server url"}],"paths":{"/gbs-psbio-server/service/ac-api/get-transaction-result/{tcn}":{"get":{"description":"This method returns the result of a transaction, given its TCN.","tags":["api"],"operationId":"getTransactionResult","summary":"getTransactionResult","parameters":[{"name":"tcn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpidTransactionResult"}}}}}}}},"components":{"schemas":{"SpidTransactionResult":{"type":"object","properties":{"status":{"type":"string","enum":["OK,","AUTHENTICATION_FAILED","DELETE_NOT_OK","DELETE_OK","DELETE_PENDING","ENROLL_OK","ENROLL_CONTIGENCY_OK","ENROLL_CACHE_OK","ENROLL_ANOMALY","ENROLL_ANOMALY_BLACKLIST","ENROLL_IN_PROGRESS","ENROLL_FAILED","UPDATE_OK","UPDATE_CONTIGENCY_OK","UPDATE_CACHE_OK","UPDATE_ANOMALY","UPDATE_ANOMALY_BLACKLIST","UPDATE_IN_PROGRESS","UPDATE_FAILED","UPDATE_REFUSED","SEARCH_MATCH","SEARCH_NOT_MATCH","SEARCH_IN_PROGRESS","SEARCH_FAILED","PERSON_FRAUD","RECOLLECT","INCORRECT_ENROLL","ERROR"]},"message":{"type":"string"},"tcn":{"type":"string"}}}}}}
```

## enroll

> This method submits an enrollment operation to the PSBio

```json
{"openapi":"3.0.1","info":{"title":"PSBio API Documentation","version":"5.6.7"},"servers":[{"url":"http://<ip>:8084","description":"Generated server url"}],"paths":{"/gbs-psbio-server/service/ac-api/enroll":{"post":{"description":"This method submits an enrollment operation to the PSBio","tags":["api"],"operationId":"enroll","summary":"enroll","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpidTransaction"}}}},"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpidTransactionResult"}}}}}}}},"components":{"schemas":{"SpidTransaction":{"type":"object","properties":{"idn":{"type":"string"},"biometrics":{"type":"array","items":{"$ref":"#/components/schemas/Biometrics"}},"protocol":{"type":"string"},"capture-date":{"type":"integer","format":"int64"},"capture-responsible":{"type":"string"},"amputated-indexes":{"type":"array","items":{"type":"integer","format":"int32"}},"bandaged-indexes":{"type":"array","items":{"type":"integer","format":"int32"}},"ignore-face-valuation":{"type":"boolean"}}},"Biometrics":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"content":{"type":"string"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"resolution":{"type":"integer","format":"int32"}}},"SpidTransactionResult":{"type":"object","properties":{"status":{"type":"string","enum":["OK,","AUTHENTICATION_FAILED","DELETE_NOT_OK","DELETE_OK","DELETE_PENDING","ENROLL_OK","ENROLL_CONTIGENCY_OK","ENROLL_CACHE_OK","ENROLL_ANOMALY","ENROLL_ANOMALY_BLACKLIST","ENROLL_IN_PROGRESS","ENROLL_FAILED","UPDATE_OK","UPDATE_CONTIGENCY_OK","UPDATE_CACHE_OK","UPDATE_ANOMALY","UPDATE_ANOMALY_BLACKLIST","UPDATE_IN_PROGRESS","UPDATE_FAILED","UPDATE_REFUSED","SEARCH_MATCH","SEARCH_NOT_MATCH","SEARCH_IN_PROGRESS","SEARCH_FAILED","PERSON_FRAUD","RECOLLECT","INCORRECT_ENROLL","ERROR"]},"message":{"type":"string"},"tcn":{"type":"string"}}}}}}
```

## update

> This method submits an update operation to the PSBio.

```json
{"openapi":"3.0.1","info":{"title":"PSBio API Documentation","version":"5.6.7"},"servers":[{"url":"http://<ip>:8084","description":"Generated server url"}],"paths":{"/gbs-psbio-server/service/ac-api/update":{"post":{"description":"This method submits an update operation to the PSBio.","tags":["api"],"operationId":"update","summary":"update","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpidTransaction"}}}},"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpidTransactionResult"}}}}}}}},"components":{"schemas":{"SpidTransaction":{"type":"object","properties":{"idn":{"type":"string"},"biometrics":{"type":"array","items":{"$ref":"#/components/schemas/Biometrics"}},"protocol":{"type":"string"},"capture-date":{"type":"integer","format":"int64"},"capture-responsible":{"type":"string"},"amputated-indexes":{"type":"array","items":{"type":"integer","format":"int32"}},"bandaged-indexes":{"type":"array","items":{"type":"integer","format":"int32"}},"ignore-face-valuation":{"type":"boolean"}}},"Biometrics":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"content":{"type":"string"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"resolution":{"type":"integer","format":"int32"}}},"SpidTransactionResult":{"type":"object","properties":{"status":{"type":"string","enum":["OK,","AUTHENTICATION_FAILED","DELETE_NOT_OK","DELETE_OK","DELETE_PENDING","ENROLL_OK","ENROLL_CONTIGENCY_OK","ENROLL_CACHE_OK","ENROLL_ANOMALY","ENROLL_ANOMALY_BLACKLIST","ENROLL_IN_PROGRESS","ENROLL_FAILED","UPDATE_OK","UPDATE_CONTIGENCY_OK","UPDATE_CACHE_OK","UPDATE_ANOMALY","UPDATE_ANOMALY_BLACKLIST","UPDATE_IN_PROGRESS","UPDATE_FAILED","UPDATE_REFUSED","SEARCH_MATCH","SEARCH_NOT_MATCH","SEARCH_IN_PROGRESS","SEARCH_FAILED","PERSON_FRAUD","RECOLLECT","INCORRECT_ENROLL","ERROR"]},"message":{"type":"string"},"tcn":{"type":"string"}}}}}}
```

## search

> This method submits a biometric search operation to the PSBio

```json
{"openapi":"3.0.1","info":{"title":"PSBio API Documentation","version":"5.6.7"},"servers":[{"url":"http://<ip>:8084","description":"Generated server url"}],"paths":{"/gbs-psbio-server/service/ac-api/search":{"post":{"description":"This method submits a biometric search operation to the PSBio","tags":["api"],"operationId":"search","summary":"search","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpidTransaction"}}}},"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpidTransactionResult"}}}}}}}},"components":{"schemas":{"SpidTransaction":{"type":"object","properties":{"idn":{"type":"string"},"biometrics":{"type":"array","items":{"$ref":"#/components/schemas/Biometrics"}},"protocol":{"type":"string"},"capture-date":{"type":"integer","format":"int64"},"capture-responsible":{"type":"string"},"amputated-indexes":{"type":"array","items":{"type":"integer","format":"int32"}},"bandaged-indexes":{"type":"array","items":{"type":"integer","format":"int32"}},"ignore-face-valuation":{"type":"boolean"}}},"Biometrics":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"content":{"type":"string"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"resolution":{"type":"integer","format":"int32"}}},"SpidTransactionResult":{"type":"object","properties":{"status":{"type":"string","enum":["OK,","AUTHENTICATION_FAILED","DELETE_NOT_OK","DELETE_OK","DELETE_PENDING","ENROLL_OK","ENROLL_CONTIGENCY_OK","ENROLL_CACHE_OK","ENROLL_ANOMALY","ENROLL_ANOMALY_BLACKLIST","ENROLL_IN_PROGRESS","ENROLL_FAILED","UPDATE_OK","UPDATE_CONTIGENCY_OK","UPDATE_CACHE_OK","UPDATE_ANOMALY","UPDATE_ANOMALY_BLACKLIST","UPDATE_IN_PROGRESS","UPDATE_FAILED","UPDATE_REFUSED","SEARCH_MATCH","SEARCH_NOT_MATCH","SEARCH_IN_PROGRESS","SEARCH_FAILED","PERSON_FRAUD","RECOLLECT","INCORRECT_ENROLL","ERROR"]},"message":{"type":"string"},"tcn":{"type":"string"}}}}}}
```

## consultaIdn

> This method checks if an IDN is enrolled in the PSBio network. If the IDN is enrolled, it returns the consulted IDN, the indexes of the biometrics associated with the IDN and the name of the PSBIO that owns it. If the IDN is not enrolled, it returns the consulted IDN and an empty list.

```json
{"openapi":"3.0.1","info":{"title":"PSBio API Documentation","version":"5.6.7"},"servers":[{"url":"http://<ip>:8084","description":"Generated server url"}],"paths":{"/gbs-psbio-server/service/ac-api/idn?idn={idn}":{"get":{"description":"This method checks if an IDN is enrolled in the PSBio network. If the IDN is enrolled, it returns the consulted IDN, the indexes of the biometrics associated with the IDN and the name of the PSBIO that owns it. If the IDN is not enrolled, it returns the consulted IDN and an empty list.","tags":["api"],"operationId":"consultaIdn","summary":"consultaIdn","parameters":[{"name":"idn","description":"Unique identifier of the biometric traits owner that will be consulted.","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultaIdnResponse"}}}}}}}},"components":{"schemas":{"ConsultaIdnResponse":{"type":"object","properties":{"idn":{"type":"string","description":"Unique identifier of the biometric traits owner that was consulted."},"psbioOwner":{"type":"string","description":"Name of the PSBio that owns the consulted IDN."},"indexes":{"type":"array","description":"List of biometric indexes associated with the consulted IDN.","items":{"type":"integer"}}}}}}}
```


---

# 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/psbio/api.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.
