> For the complete documentation index, see [llms.txt](https://docs.griaule.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.griaule.com/apis/gbds-5/apis.md).

# Apis

## listAPIs

> This method is used to list all the APIs configured in the cluster.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"5.1.16"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/apis":{"get":{"description":"This method is used to list all the APIs configured in the cluster.","tags":["apis"],"operationId":"listAPIs","summary":"listAPIs","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAPIsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}},"parameters":[]}}},"components":{"schemas":{"ListAPIsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/API"}}}},"API":{"type":"object","properties":{"apiId":{"type":"string","description":"Unique ID of the API instance."},"hostname":{"type":"string","description":"Hostname or IP Address of the node that is hosting the API instance."},"port":{"type":"integer","format":"int32","description":"Port mapped to the API instance."},"type":{"type":"string","enum":["LEADER","RUNNER"]}}},"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"}}},"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"}}}}}}
```

## createAPI

> This method is used to create or update an API instance within the cluster. If the API type is LEADER, but another LEADER is already set, the older one becomes a RUNNER type.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"5.1.16"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/apis":{"post":{"description":"This method is used to create or update an API instance within the cluster. If the API type is LEADER, but another LEADER is already set, the older one becomes a RUNNER type.","tags":["apis"],"operationId":"createAPI","summary":"createAPI","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIResponse"}}}},"202":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}},"parameters":[]}}},"components":{"schemas":{"CreateAPIRequest":{"type":"object","properties":{"data":{"type":"object","$ref":"#/components/schemas/API"}}},"API":{"type":"object","properties":{"apiId":{"type":"string","description":"Unique ID of the API instance."},"hostname":{"type":"string","description":"Hostname or IP Address of the node that is hosting the API instance."},"port":{"type":"integer","format":"int32","description":"Port mapped to the API instance."},"type":{"type":"string","enum":["LEADER","RUNNER"]}}},"CreateAPIResponse":{"type":"object","properties":{"status":{"type":"string","enum":["CREATED","UPDATED"]},"data":{"type":"object","$ref":"#/components/schemas/API"}}},"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"}}},"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"}}}}}}
```

## deleteAPI

> This method is used to remove an API instance from the cluster.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"5.1.16"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/apis/{apiId}":{"delete":{"description":"This method is used to remove an API instance from the cluster.","tags":["apis"],"operationId":"deleteAPI","summary":"deleteAPI","parameters":[{"name":"apiId","description":"Unique ID of the desired API.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"API ID does not exist","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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/apis.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.
