Skip to content

Commit 81dbf3e

Browse files
EFRS-1333: Changed REST API docs due to change requests
1 parent f10db06 commit 81dbf3e

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

docs/Rest-API-description.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -886,22 +886,22 @@ Response body on success:
886886
| subject | string | a subject in which the similar embedding was found |
887887
| similarity | float | a similarity between the embedding and the input embedding |
888888

889-
### Face Verification Service, Embedding
890-
The service is used to determine similarities between an input source embedding and input target embeddings. An example:
889+
### Verify Faces from a Given Image, Embedding
890+
The endpoint is used to compare input embeddings to the embedding stored in Face Collection. An example:
891891

892892
```shell
893-
curl -X POST "http://localhost:8000/api/v1/verification/embeddings/verify" \
893+
curl -X POST "http://localhost:8000/api/v1/recognition/embeddings/faces/{image_id}/verify" \
894894
-H "Content-Type: application/json" \
895895
-H "x-api-key: <service_api_key>" \
896-
-d {"source": [<source_embedding>], "targets": [["target_embedding"], ...]}
896+
-d {"embeddings": [[<array_of_embeddings>], ...]}
897897
```
898898

899-
| Element | Description | Type | Required | Notes |
900-
|------------------|-------------|---------|----------|--------------------------------------------------------------------------------------|
901-
| Content-Type | header | string | required | application/json |
902-
| x-api-key | header | string | required | api key of the Face verification service, created by the user |
903-
| source | body | array | required | an input embeddings. The length depends on the model (e.g. 512 or 128) |
904-
| targets | body | array | required | an array of the target embeddings. The length depends on the model (e.g. 512 or 128) |
899+
| Element | Description | Type | Required | Notes |
900+
|--------------|-------------|--------|----------|------------------------------------------------------------------------|
901+
| Content-Type | header | string | required | application/json |
902+
| x-api-key | header | string | required | api key of the Face recognition service, created by the user |
903+
| embeddings | body | array | required | an input embeddings. The length depends on the model (e.g. 512 or 128) |
904+
| image_id | variable | UUID | required | an id of the source embedding within the Face Collection |
905905

906906
Response body on success:
907907
```json
@@ -916,28 +916,28 @@ Response body on success:
916916
}
917917
```
918918

919-
| Element | Type | Description |
920-
|-------------|--------|--------------------------------------------------------------------|
921-
| result | array | an array that contains all the results |
922-
| embedding | array | a target embedding which we are comparing to source embedding |
923-
| similarity | float | a similarity between the source embedding and the target embedding |
919+
| Element | Type | Description |
920+
|-------------|--------|------------------------------------------------------------------------------|
921+
| result | array | an array that contains all the results |
922+
| embedding | array | a source embedding which we are comparing to embedding from Face Collection |
923+
| similarity | float | a similarity between the source embedding and embedding from Face Collection |
924924

925-
### Verify Faces from a Given Image, Embedding
926-
The endpoint is used to compare input embeddings to the embedding stored in Face Collection. An example:
925+
### Face Verification Service, Embedding
926+
The service is used to determine similarities between an input source embedding and input target embeddings. An example:
927927

928928
```shell
929-
curl -X POST "http://localhost:8000/api/v1/recognition/embeddings/faces/{image_id}/verify" \
929+
curl -X POST "http://localhost:8000/api/v1/verification/embeddings/verify" \
930930
-H "Content-Type: application/json" \
931931
-H "x-api-key: <service_api_key>" \
932-
-d {"embeddings": [[<array_of_embeddings>], ...]}
932+
-d {"source": [<source_embedding>], "targets": [[<target_embedding>], ...]}
933933
```
934934

935-
| Element | Description | Type | Required | Notes |
936-
|--------------|-------------|--------|----------|------------------------------------------------------------------------|
937-
| Content-Type | header | string | required | application/json |
938-
| x-api-key | header | string | required | api key of the Face recognition service, created by the user |
939-
| embeddings | body | array | required | an input embeddings. The length depends on the model (e.g. 512 or 128) |
940-
| image_id | variable | UUID | required | an id of the source embedding within the Face Collection |
935+
| Element | Description | Type | Required | Notes |
936+
|------------------|-------------|---------|----------|--------------------------------------------------------------------------------------|
937+
| Content-Type | header | string | required | application/json |
938+
| x-api-key | header | string | required | api key of the Face verification service, created by the user |
939+
| source | body | array | required | an input embeddings. The length depends on the model (e.g. 512 or 128) |
940+
| targets | body | array | required | an array of the target embeddings. The length depends on the model (e.g. 512 or 128) |
941941

942942
Response body on success:
943943
```json
@@ -952,8 +952,8 @@ Response body on success:
952952
}
953953
```
954954

955-
| Element | Type | Description |
956-
|-------------|--------|------------------------------------------------------------------------------|
957-
| result | array | an array that contains all the results |
958-
| embedding | array | a source embedding which we are comparing to embedding from Face Collection |
959-
| similarity | float | a similarity between the source embedding and embedding from Face Collection |
955+
| Element | Type | Description |
956+
|-------------|--------|--------------------------------------------------------------------|
957+
| result | array | an array that contains all the results |
958+
| embedding | array | a target embedding which we are comparing to source embedding |
959+
| similarity | float | a similarity between the source embedding and the target embedding |

0 commit comments

Comments
 (0)