# Extraction Microservice

## changeExtractorStatus

> This method is used to change the status of an extraction microservice.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/extraction-control/{id}/{enabled}":{"put":{"description":"This method is used to change the status of an extraction microservice.","tags":["extraction-microservice"],"operationId":"changeExtractorStatus","summary":"changeExtractorStatus","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"enabled","in":"path","required":true,"schema":{"type":"string","enum":["ENABLE","DISABLE","RESTART"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListExtractionServicesResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"ListExtractionServicesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionServiceBean"}}}},"ExtractionServiceBean":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"url":{"type":"string"},"enabled":{"type":"boolean"},"library":{"type":"string","enum":["GINGER","FACE","GIRL"]},"message":{"type":"string"}}},"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"}}}}}}
```

## removeExtractor

> This method is used to remove an extraction microservice.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/extraction-control/remove":{"delete":{"description":"This method is used to remove an extraction microservice.","tags":["extraction-microservice"],"operationId":"removeExtractor","summary":"removeExtractor","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionServiceRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListExtractionServicesResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"ExtractionServiceRequest":{"type":"object","properties":{"library":{"type":"string","enum":["GINGER","FACE","GIRL"]},"count":{"type":"integer","format":"int32"}}},"ListExtractionServicesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionServiceBean"}}}},"ExtractionServiceBean":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"url":{"type":"string"},"enabled":{"type":"boolean"},"library":{"type":"string","enum":["GINGER","FACE","GIRL"]},"message":{"type":"string"}}},"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"}}}}}}
```

## listExtractors

> This method is used to list all extraction microservice.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/extraction-control/list":{"get":{"description":"This method is used to list all extraction microservice.","tags":["extraction-microservice"],"operationId":"listExtractors","summary":"listExtractors","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListExtractionServicesResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"ListExtractionServicesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionServiceBean"}}}},"ExtractionServiceBean":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"url":{"type":"string"},"enabled":{"type":"boolean"},"library":{"type":"string","enum":["GINGER","FACE","GIRL"]},"message":{"type":"string"}}},"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"}}}}}}
```

## addExtractors

> This method is used to add a new extraction microservice.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/extraction-control/add":{"post":{"description":"This method is used to add a new extraction microservice.","tags":["extraction-microservice"],"operationId":"addExtractors","summary":"addExtractors","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionServiceRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListExtractionServicesResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"ExtractionServiceRequest":{"type":"object","properties":{"library":{"type":"string","enum":["GINGER","FACE","GIRL"]},"count":{"type":"integer","format":"int32"}}},"ListExtractionServicesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionServiceBean"}}}},"ExtractionServiceBean":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"url":{"type":"string"},"enabled":{"type":"boolean"},"library":{"type":"string","enum":["GINGER","FACE","GIRL"]},"message":{"type":"string"}}},"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"}}}}}}
```
