List All Collections
Endpointβ
GET https://api.verifik.co/v2/face-recognition/collections
Fetch all collections generated by a specific client. The only parameter required is to send the access token. With this, Verifik will identify the collections generated by this user.
Headersβ
Content-Typeβ
Type: String
Required: Yes
application/json
Authorizationβ
Type: String
Required: Yes
Bearer <token>
Requestβ
- Node.js
- Python
- PHP
- Go
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/face-recognition/collections',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
import http.client
conn = http.client.HTTPSConnection("api.verifik.co")
payload = ''
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
}
conn.request("GET", "/v2/face-recognition/collections", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.verifik.co/v2/face-recognition/collections');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Content-Type' => 'application/json',
'Authorization' => 'Bearer <your_token>'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
?>
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.verifik.co/v2/face-recognition/collections"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer <your_token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Responseβ
- 200
- 400
{
"data": [
{
"_id": "65b9592267cc4f096dbe743d",
"deleted": false,
"name": "Ejemplo Ene 30",
"project": "65b955fe0577440932c77481",
"description": "default collection for project 65b955fe0577440932c77481",
"client": "6158e492dd0767a2b8b3f829",
"code": "d96db430-27d2-4f43-bcff-c4b239ac6d2e",
"updatedAt": "2024-01-30T20:16:34.841Z",
"createdAt": "2024-01-30T20:16:34.841Z",
"__v": 0
},
{
"_id": "65c2a9364d8e8d3917eaf383",
"deleted": false,
"name": "Ejemplo Feb 6",
"project": "65c2a9271ff6bd3955eececd",
"description": "default collection for project 65c2a9271ff6bd3955eececd",
"client": "6158e492dd0767a2b8b3f829",
"code": "548574d7-748c-4a75-8838-aa9aa59b00d5",
"updatedAt": "2024-02-06T21:48:39.240Z",
"createdAt": "2024-02-06T21:48:39.240Z",
"__v": 0
}
]
}
{
"error": "Invalid request"
}