|
2 | 2 | "openapi":"3.0.2", |
3 | 3 | "info":{ |
4 | 4 | "title":"EcoTaxa", |
5 | | - "version":"0.0.39" |
| 5 | + "version":"0.0.40" |
6 | 6 | }, |
7 | 7 | "servers":[ |
8 | 8 | { |
|
2525 | 2525 | ] |
2526 | 2526 | } |
2527 | 2527 | }, |
| 2528 | + "/object_set/{project_id}/similarity_search/{object_id}":{ |
| 2529 | + "post":{ |
| 2530 | + "tags":[ |
| 2531 | + "objects" |
| 2532 | + ], |
| 2533 | + "summary":"Object Similarity Search", |
| 2534 | + "description":"Returns, in given project, the objects matching the filter and similar to the queried one.", |
| 2535 | + "operationId":"get_object_set_similarity_search", |
| 2536 | + "parameters":[ |
| 2537 | + { |
| 2538 | + "description":"Internal, numeric id of the project to search in.", |
| 2539 | + "required":true, |
| 2540 | + "schema":{ |
| 2541 | + "title":"Project Id", |
| 2542 | + "type":"integer", |
| 2543 | + "description":"Internal, numeric id of the project to search in." |
| 2544 | + }, |
| 2545 | + "example":3426, |
| 2546 | + "name":"project_id", |
| 2547 | + "in":"path" |
| 2548 | + }, |
| 2549 | + { |
| 2550 | + "description":"Object ID to search similar for.", |
| 2551 | + "required":true, |
| 2552 | + "schema":{ |
| 2553 | + "title":"Object Id", |
| 2554 | + "type":"integer", |
| 2555 | + "description":"Object ID to search similar for." |
| 2556 | + }, |
| 2557 | + "example":1040, |
| 2558 | + "name":"object_id", |
| 2559 | + "in":"path" |
| 2560 | + }, |
| 2561 | + { |
| 2562 | + "description":"Return at maximum this number of object IDs, by default 100.", |
| 2563 | + "required":false, |
| 2564 | + "schema":{ |
| 2565 | + "title":"Size", |
| 2566 | + "type":"integer", |
| 2567 | + "description":"Return at maximum this number of object IDs, by default 100.", |
| 2568 | + "default":100 |
| 2569 | + }, |
| 2570 | + "example":"120", |
| 2571 | + "name":"size", |
| 2572 | + "in":"query" |
| 2573 | + } |
| 2574 | + ], |
| 2575 | + "requestBody":{ |
| 2576 | + "content":{ |
| 2577 | + "application/json":{ |
| 2578 | + "schema":{ |
| 2579 | + "$ref":"#/components/schemas/ProjectFilters" |
| 2580 | + } |
| 2581 | + } |
| 2582 | + }, |
| 2583 | + "required":true |
| 2584 | + }, |
| 2585 | + "responses":{ |
| 2586 | + "200":{ |
| 2587 | + "description":"Successful Response", |
| 2588 | + "content":{ |
| 2589 | + "application/json":{ |
| 2590 | + "schema":{ |
| 2591 | + "$ref":"#/components/schemas/SimilaritySearchRsp" |
| 2592 | + } |
| 2593 | + } |
| 2594 | + } |
| 2595 | + }, |
| 2596 | + "422":{ |
| 2597 | + "description":"Validation Error", |
| 2598 | + "content":{ |
| 2599 | + "application/json":{ |
| 2600 | + "schema":{ |
| 2601 | + "$ref":"#/components/schemas/HTTPValidationError" |
| 2602 | + } |
| 2603 | + } |
| 2604 | + } |
| 2605 | + } |
| 2606 | + }, |
| 2607 | + "security":[ |
| 2608 | + { |
| 2609 | + "BearerOrCookieAuth":[] |
| 2610 | + } |
| 2611 | + ] |
| 2612 | + } |
| 2613 | + }, |
2528 | 2614 | "/samples/search":{ |
2529 | 2615 | "get":{ |
2530 | 2616 | "tags":[ |
|
3107 | 3193 | "in":"query" |
3108 | 3194 | }, |
3109 | 3195 | { |
3110 | | - "description":"Order the result using given field. If prefixed with \"-\" then it will be reversed.", |
| 3196 | + "description":"Order the result using given field. If prefixed with \"-\" then it will be reversed. When using *special syntax ss-Innnn*, the order is similarity with given (by its ID) object.", |
3111 | 3197 | "required":false, |
3112 | 3198 | "schema":{ |
3113 | 3199 | "title":"Order field", |
3114 | 3200 | "type":"string", |
3115 | | - "description":"Order the result using given field. If prefixed with \"-\" then it will be reversed." |
| 3201 | + "description":"Order the result using given field. If prefixed with \"-\" then it will be reversed. When using *special syntax ss-Innnn*, the order is similarity with given (by its ID) object." |
3116 | 3202 | }, |
3117 | 3203 | "example":"obj.longitude", |
3118 | 3204 | "name":"order_field", |
|
3981 | 4067 | ], |
3982 | 4068 | "summary":"Query Object Set Predictions", |
3983 | 4069 | "description":"** Return last prediction information for a set of objects, by their IDs.", |
3984 | | - "operationId":"predict_object_set", |
| 4070 | + "operationId":"object_set_predictions", |
3985 | 4071 | "requestBody":{ |
3986 | 4072 | "content":{ |
3987 | 4073 | "application/json":{ |
|
8073 | 8159 | "maxItems":3, |
8074 | 8160 | "minItems":3, |
8075 | 8161 | "type":"array", |
8076 | | - "items":[ |
8077 | | - { |
8078 | | - "type":"integer" |
8079 | | - }, |
8080 | | - { |
8081 | | - "type":"integer" |
8082 | | - }, |
8083 | | - { |
8084 | | - "type":"number" |
8085 | | - } |
8086 | | - ] |
| 8162 | + "items":{ |
| 8163 | + "title":"type" |
| 8164 | + } |
8087 | 8165 | }, |
8088 | 8166 | "description":"List of lists [object ID, category ID, score for category].", |
8089 | 8167 | "default":[], |
|
8103 | 8181 | }, |
8104 | 8182 | "description":"Prediction information for a set of objects." |
8105 | 8183 | }, |
| 8184 | + "PredictionInfoT":{ |
| 8185 | + "title":"PredictionInfoT", |
| 8186 | + "required":[ |
| 8187 | + "object_id", |
| 8188 | + "classif_id", |
| 8189 | + "score" |
| 8190 | + ], |
| 8191 | + "type":"object", |
| 8192 | + "properties":{ |
| 8193 | + "object_id":{ |
| 8194 | + "title":"Object Id", |
| 8195 | + "type":"integer" |
| 8196 | + }, |
| 8197 | + "classif_id":{ |
| 8198 | + "title":"Classif Id", |
| 8199 | + "type":"integer" |
| 8200 | + }, |
| 8201 | + "score":{ |
| 8202 | + "title":"Score", |
| 8203 | + "type":"number" |
| 8204 | + } |
| 8205 | + } |
| 8206 | + }, |
8106 | 8207 | "PredictionReq":{ |
8107 | 8208 | "title":"Prediction Request", |
8108 | 8209 | "required":[ |
|
9044 | 9145 | "type":"string", |
9045 | 9146 | "description":"Computed export quantities" |
9046 | 9147 | }, |
| 9148 | + "SimilaritySearchRsp":{ |
| 9149 | + "title":"Similarity Search Response", |
| 9150 | + "required":[ |
| 9151 | + "neighbor_ids", |
| 9152 | + "sim_scores" |
| 9153 | + ], |
| 9154 | + "type":"object", |
| 9155 | + "properties":{ |
| 9156 | + "neighbor_ids":{ |
| 9157 | + "title":"Neighbor IDs", |
| 9158 | + "type":"array", |
| 9159 | + "items":{ |
| 9160 | + "type":"integer" |
| 9161 | + }, |
| 9162 | + "description":"The list of similar objects IDs." |
| 9163 | + }, |
| 9164 | + "sim_scores":{ |
| 9165 | + "title":"Similarity Scores", |
| 9166 | + "type":"array", |
| 9167 | + "items":{ |
| 9168 | + "type":"number" |
| 9169 | + }, |
| 9170 | + "description":"The list of similarity scores, between 0 and 1. The higher the closer, e.g. 1 for the target_id itself." |
| 9171 | + }, |
| 9172 | + "message":{ |
| 9173 | + "title":"Message", |
| 9174 | + "type":"string", |
| 9175 | + "description":"A message to the user. If not 'Success' then some condition prevented the computation." |
| 9176 | + } |
| 9177 | + }, |
| 9178 | + "description":"The list of similar objects.", |
| 9179 | + "example":{ |
| 9180 | + "neighbor_ids":[ |
| 9181 | + 1040, |
| 9182 | + 1041, |
| 9183 | + 1042, |
| 9184 | + 1043, |
| 9185 | + 1044, |
| 9186 | + 1045, |
| 9187 | + 1046, |
| 9188 | + 1047 |
| 9189 | + ], |
| 9190 | + "sim_scores":[ |
| 9191 | + 1.0, |
| 9192 | + 0.9, |
| 9193 | + 0.8, |
| 9194 | + 0.7, |
| 9195 | + 0.6, |
| 9196 | + 0.5, |
| 9197 | + 0.4, |
| 9198 | + 0.3 |
| 9199 | + ], |
| 9200 | + "message":"Success" |
| 9201 | + } |
| 9202 | + }, |
9047 | 9203 | "SimpleImportReq":{ |
9048 | 9204 | "title":"Simple import request Model", |
9049 | 9205 | "required":[ |
|
0 commit comments