### Start Docker Container
Source: https://developer.idanalyzer.com/docs/installation-guides-1
Starts a Docker container that has been previously created. You can refer to the container by its ID or its assigned name (e.g., 'idfort'). This command initiates the ID Fort service within the container.
```dockerfile
Or
$ docker start idfort
```
--------------------------------
### Setup and Use PHP IDAnalyzer SDK
Source: https://developer.idanalyzer.com/docs/quick-start
Instructions for setting up the IDAnalyzer PHP SDK using Composer. This includes installing the SDK, structuring project files, and updating API keys for image scanning.
```shell
composer init
// Press Enter until it's done.
composer install
composer require idanalyzer/id-analyzer-v2-php-sdk
```
```shell
php src/Scan/StdScan.php
```
--------------------------------
### Install and Use Python IDAnalyzer Library
Source: https://developer.idanalyzer.com/docs/quick-start
Install the IDAnalyzer Python library and necessary dependencies, then use it to scan images. Covers API key setup and error handling for scan operations.
```shell
pip install idanalyzer2
pip install validators
```
```python
from idanalyzer2 import *
import traceback
import json
try:
# create profile
profile = Profile(Profile.SECURITY_MEDIUM)
# create a Scanner (P.S. Get Api key from)
s = Scanner('Your API Key from portal2')
# throw exception
s.throwApiException(True)
# use quickScan to scan image (change 05.png to your image filenam
resp = s.quickScan('05.png', "", True)
# write out result
with open('quickScan.json', 'w') as f:
f.write(json.dumps(resp, indent=4))
# Set the profile into the Scanner
s.setProfile(profile)
# use standard Scan to scan image (change 05.png to your image filename)
resp = s.scan("05.png")
# write out result
with open('scan.json', 'w') as f:
f.write(json.dumps(resp, indent=4))
except APIError as e:
print(traceback.format_exc())
print(e.args[0])
except InvalidArgumentException as e:
print(traceback.format_exc())
print(e.args[0])
except Exception as e:
print(traceback.format_exc())
print(e.args[0])
```
```shell
python main.py
```
--------------------------------
### Install and Use Node.js IDAnalyzer Library
Source: https://developer.idanalyzer.com/docs/quick-start
Install the IDAnalyzer Node.js library, configure package.json, and use the library to scan images. Includes setup for API keys and handling scan results.
```shell
npm init
npm install idanalyzer2
```
```json
//package.json
{
"name": "js",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"type": "module",
"dependencies": {
"idanalyzer2": "^1.0.2"
}
}
```
```javascript
import IdAnalyzer from "idanalyzer2"
let {Profile, Scanner, SetEndpoint, APIError, InvalidArgumentException} = IdAnalyzer
import fs from "node:fs/promises"
let scanDemo = async () => {
try {
// create profile
let profile = new Profile(Profile.SECURITY_MEDIUM)
// create a Scanner (P.S. Get Api key from)
let s = new Scanner('Your API Key from portal2')
// throw exception
s.throwApiException(true)
// use quickScan to scan image (change 05.png to your image filenam
let quickResult = await s.quickScan("05.png", "", true)
// write out result
await fs.writeFile("./quickscan.json", JSON.stringify(quickResult))
// Set the profile into the Scanner
s.setProfile(profile)
// use standard Scan to scan image (change 05.png to your image filename)
let scanResult = await s.scan("05.png")
// write out result
await fs.writeFile("./scan.json", JSON.stringify(scanResult))
} catch (e) {
if(e instanceof InvalidArgumentException) {
console.log("InvalidArgumentException => ", e.message)
} else if(e instanceof APIError) {
console.log("APIError => ", e.code, e.msg)
} else {
console.log("unknown error => ", e.message)
}
}
}
scanDemo()
```
```shell
node index.js
```
--------------------------------
### List Docker Containers
Source: https://developer.idanalyzer.com/docs/installation-guides-1
Lists all Docker containers on the system, including those that have been created but not yet started. This command is used to check the status and details of the ID Fort container after it has been created.
```dockerfile
$ docker ps -a
```
--------------------------------
### API User Login: Python Request Example
Source: https://developer.idanalyzer.com/reference/api-user
This Python example demonstrates how to authenticate with the API using a POST request. It includes setting the appropriate headers and sending the username and password in the request body.
```python
import requests
import json
url = 'https://endpoint.example.com/login'
username = 'your_username'
password = 'your_password'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
payload = {
'username': username,
'password': password
}
try:
response = requests.post(url, headers=headers, data=json.dumps(payload))
response.raise_for_status() # Raise an exception for bad status codes
login_data = response.json()
print('Login successful:', login_data)
except requests.exceptions.RequestException as e:
print('Login failed:', e)
```
--------------------------------
### GET /admin/login
Source: https://developer.idanalyzer.com/reference/administrator
Checks if a root admin has been set upon initial instance installation. Returns a boolean indicating if login is possible.
```APIDOC
## GET /admin/login
### Description
Checks if a root admin has been set upon initial instance installation. This endpoint is used to determine if the instance is ready for login or requires initialization.
### Method
GET
### Endpoint
https://endpoint.example.com/admin/login
### Parameters
#### Query Parameters
None
#### Request Body
None
### Request Example
```json
{
"example": "curl --request GET \n --url https://endpoint.example.com/admin/login \n --header 'accept: application/json'"
}
```
### Response
#### Success Response (200)
- **canLogin** (boolean) - Indicates whether a root admin is already set and login is possible.
#### Error Response (406)
- **canLogin** (boolean) - Indicates whether a root admin is already set and login is possible. When this is false, it implies initialization is required.
#### Response Example
```json
{
"example": "{\n \"canLogin\": true \n}"
}
```
```
--------------------------------
### API User Login: Node.js Request Example
Source: https://developer.idanalyzer.com/reference/api-user
This example shows how to perform an API user login using Node.js. It outlines the request body, headers, and the expected URL for obtaining an access token.
```javascript
const url = 'https://endpoint.example.com/login';
const username = 'your_username';
const password = 'your_password';
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify({
username: username,
password: password
})
})
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok ' + response.statusText);
}
return response.json();
})
.then(data => {
console.log('Login successful:', data);
})
.catch(error => {
console.error('Login failed:', error);
});
```
--------------------------------
### List Docker Images
Source: https://developer.idanalyzer.com/docs/installation-guides-1
Displays all Docker images currently available on your system. This is used to verify that the ID Fort image has been loaded correctly and to retrieve its repository and tag for subsequent commands.
```dockerfile
$ docker images
```
--------------------------------
### List KYC Profile API Examples (Multiple Languages)
Source: https://developer.idanalyzer.com/reference/kyc-profile
Examples of how to list KYC profiles using the API endpoint in various programming languages. These snippets show how to construct the request and handle the response, typically involving making an HTTP GET request to the specified URL.
```shell
curl -X GET \
https://endpoint.example.com/profile \
-H 'accept: application/json'
```
```javascript
const axios = require('axios');
axios.get('https://endpoint.example.com/profile', {
headers: {
'accept': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error fetching KYC profiles:', error);
});
```
```ruby
require 'net/http'
require 'uri'
uri = URI.parse('https://endpoint.example.com/profile')
request = Net::HTTP::Get.new(uri)
request['accept'] = 'application/json'
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') do |http|
http.request(request)
end
puts response.body
```
```php
```
```python
import requests
url = "https://endpoint.example.com/profile"
headers = {
"accept": "application/json"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status() # Raise an exception for bad status codes
print(response.json())
except requests.exceptions.RequestException as e:
print(f"Error fetching KYC profiles: {e}")
```
--------------------------------
### Load ID Fort Docker Image
Source: https://developer.idanalyzer.com/docs/installation-guides-1
Loads a downloaded ID Fort Docker image from a .tar file into your Docker environment. Use the appropriate filename for the CPU or GPU image you have downloaded.
```dockerfile
For GPU:
$ docker load --input gpu-idfort-20240603.tar
For CPU:
$ docker load --input cpu-idfort-20240531.tar
```
--------------------------------
### Webcam Capture and Quickscan Initialization (JavaScript)
Source: https://developer.idanalyzer.com/docs/real-time-identity-card-recognition-using-webcam-1
This snippet sets up webcam access, captures a video frame, converts it to a data URL, and initiates a quick scan using the ID Analyzer API. It requires HTML elements for video, canvas, and a capture button. The `performQuickScan` function handles the API interaction, sending the image data for analysis.
```javascript
const video = document.getElementById("video");
const canvas = document.getElementById("canvas");
const captureButton = document.getElementById("capture-btn");
// Access the webcam and stream video
navigator.mediaDevices
.getUserMedia({ video: true })
.then((stream) => {
video.srcObject = stream;
})
.catch((error) => {
console.error("Error accessing the webcam: ", error);
});
// Function to perform quickscan using ID Analyzer Quickscan API
function performQuickScan(imageData) {
// Set up options for fetch request
// Call ID Analyzer Quickscan API
const quickScanUrl = "https://api2.idanalyzer.com/quickscan";
const quickScanApiKey = "your-api-key"; // Replace with your actual quickscan API key
// Construct the request body
const requestBody = {
saveFile: true,
document: "https://www.idanalyzer.com/assets/testsample_id.jpg",
};
// Make the fetch request
fetch(quickScanUrl, {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
"X-API-KEY": quickScanApiKey,
},
body: JSON.stringify(requestBody),
})
.then((response) => response.json())
.then((data) => {
console.log("Quickscan results: ", data); // Log the quickscan response data to the console
})
.catch((error) => {
console.error("Error performing quickscan: ", error);
});
}
// Capture image from the webcam and trigger quickscan
captureButton.addEventListener("click", () => {
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
const context = canvas.getContext("2d");
context.drawImage(video, 0, 0, canvas.width, canvas.height);
const imageData = canvas.toDataURL("image/png");
// Call function to perform quickscan using the captured image data
performQuickScan(imageData);
});
```
--------------------------------
### Example Configuration for IdAnalyzer
Source: https://developer.idanalyzer.com/reference/post-admin-config
An example of a complete configuration object for the IdAnalyzer, illustrating settings for logging, data retention, operation modes, engine enablers, OCR options, GPU usage, and credentials.
```json
{
"log_level": 1,
"data_retention": 1000,
"transaction_retention": 0,
"audit_log_retention": 0,
"server_log_retention": 0,
"session_timeout": 300,
"operation_mode": 1,
"house_keeping_interval": 60,
"max_concurrent_process": 0,
"max_queued_process": 0,
"engines": {
"orientation_correction": 1,
"address_verification": 0
},
"ocr": {
"builtin_ocr": false,
"builtin_ocr_version": 0,
"builtin_ocr_language": "en",
"builtin_ocr_url": "",
"azure_ocr": false,
"google_ocr": false,
"tencent_ocr": false,
"baidu_ocr": false,
"mrz_engine": true
},
"gpu": {
"enabled": false,
"cuda_version": ""
},
"credentials": {
"google_ocr": [
{
"key": ""
}
],
"google_maps": [
{
"key": ""
}
],
"azure_computer_vision": [
{
"endpoint": "",
"key": ""
}
],
"azure_face": [
{
"endpoint": "",
"key": ""
}
],
"baidu_ocr": [
{
"api_key": "",
"secret_key": ""
}
]
}
}
```
--------------------------------
### Get Account Information using Node.js
Source: https://developer.idanalyzer.com/reference/account-1
This Node.js code example shows how to fetch account information from the iDAnalyzer API. It uses the 'axios' library to make a GET request to the specified endpoint and handles the JSON response. Ensure 'axios' is installed.
```javascript
const axios = require('axios');
const getAccountInfo = async () => {
try {
const response = await axios.get('https://api2.idanalyzer.com/myaccount', {
headers: {
'accept': 'application/json'
}
});
console.log(response.data);
return response.data;
} catch (error) {
console.error('Error fetching account information:', error);
throw error;
}
};
getAccountInfo();
```
--------------------------------
### Example JSON Output: Date Calculations (Days From/To Expiry)
Source: https://developer.idanalyzer.com/reference/post-quickscan
This example displays the JSON output for date-related calculations, specifically 'daysFromIssue' and 'daysToExpiry'. It includes the calculated values, confidence levels, and bounding box data from the visual source.
```json
{
"daysFromIssue": [
{
"value": "1179",
"confidence": 0.989,
"source": "visual",
"index": 0,
"inputBox": [
[
616,
975
],
[
776,
977
],
[
775,
1003
],
[
615,
1000
]
],
"outputBox": [
[
495,
785
],
[
624,
786
],
[
623,
807
],
[
495,
805
]
]
}
],
"daysToExpiry": [
{
"value": "1752",
"confidence": 0.994,
"source": "visual",
"index": 0,
"inputBox": [
[
625,
871
],
[
784,
873
],
[
783,
901
],
[
625,
898
]
],
"outputBox": [
[
503,
701
],
[
631,
702
],
[
630,
725
],
[
503,
723
]
]
}
]
}
```
--------------------------------
### Flask Application Setup and Route Definition
Source: https://developer.idanalyzer.com/docs/building-an-aml-compliance-web-app
Basic Flask application initialization and the definition of a root route ('/') that handles both GET and POST requests. This sets up the entry point for the web application.
```python
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def form():
...
```
--------------------------------
### HTML Structure for Webcam Quickscan
Source: https://developer.idanalyzer.com/docs/real-time-identity-card-recognition-using-webcam-1
Sets up the basic HTML for the Webcam Quickscan page. It includes elements for displaying video, a canvas for image processing, a button to trigger capture, and basic styling.
```html
Webcam Quickscan
Webcam Quickscan
```
--------------------------------
### Get Account Information using Python
Source: https://developer.idanalyzer.com/reference/account-1
This Python code snippet shows how to get account information using the 'requests' library. It makes a GET request to the iDAnalyzer API endpoint and prints the JSON response. Ensure the 'requests' library is installed (`pip install requests`).
```python
import requests
url = "https://api2.idanalyzer.com/myaccount"
headers = {
'accept': 'application/json'
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status() # Raise an exception for bad status codes
print(response.json())
except requests.exceptions.RequestException as e:
print(f"Error fetching account information: {e}")
```
--------------------------------
### Get Account Information using Ruby
Source: https://developer.idanalyzer.com/reference/account-1
This Ruby code snippet illustrates how to retrieve account details using the 'httparty' gem. It sends a GET request to the iDAnalyzer API endpoint and expects a JSON response. Make sure to install 'httparty' (gem install httparty).
```ruby
require 'httparty'
url = 'https://api2.idanalyzer.com/myaccount'
response = HTTParty.get(url, headers: { 'accept' => 'application/json' })
if response.success?
puts response.parsed_response
else
puts "Error: #{response.code} - #{response.message}"
end
```
--------------------------------
### GET /websites/developer_idanalyzer
Source: https://developer.idanalyzer.com/reference/post-aml-v3
Retrieves information about a specific Idanalyzer project, including examples of data analysis results.
```APIDOC
## GET /websites/developer_idanalyzer
### Description
This endpoint retrieves detailed information about the developer Idanalyzer project. It includes examples of data analysis, such as the 'normal' case which provides structured data about an individual, and a 'no search any one' case indicating no results found.
### Method
GET
### Endpoint
/websites/developer_idanalyzer
### Parameters
#### Query Parameters
None
#### Request Body
None
### Request Example
```bash
curl -X GET \
https://api2.idanalyzer.com/websites/developer_idanalyzer \
-H 'X-API-KEY: YOUR_API_KEY'
```
### Response
#### Success Response (200)
- **content** (object) - Contains the project details and examples.
- **examples** (object) - Contains different scenarios of analysis examples.
- **normal** (object) - Example of a successful analysis.
- **value** (object) - The structured data from the analysis.
- **rows** (array) - Array of analysis results.
- **json** (string) - A JSON string representing the analysis data (e.g., person's details).
- **score** (number) - The score associated with the analysis result.
- **currentPage** (integer) - The current page number of the results.
- **limit** (integer) - The maximum number of results per page.
- **durationMs** (number) - The time taken for the request in milliseconds.
- **total** (integer) - The total number of results.
- **no search any one** (object) - Example for when no specific search criteria are met.
- **value** (object) - Response indicating no specific results.
- **currentPage** (integer) - The current page number.
- **limit** (integer) - The maximum number of results per page.
- **durationMs** (number) - The time taken for the request in milliseconds.
- **security** (array) - Information about security used for the API.
- **servers** (array) - Available server endpoints for the API.
- **url** (string) - The URL of the server.
- **description** (string) - Description of the server location.
- **tags** (array) - Tags associated with the API.
- **name** (string) - The name of the tag.
- **components** (object) - API components, including security schemes.
- **securitySchemes** (object) - Defines the security schemes.
- **apikey** (object) - API key authentication scheme.
- **type** (string) - Type of security scheme (apiKey).
- **name** (string) - Name of the API key header.
- **in** (string) - Location of the API key (header).
- **x-readme** (object) - Custom properties for Readme.io integration.
- **explorer-enabled** (boolean) - Whether the API explorer is enabled.
- **proxy-enabled** (boolean) - Whether proxy is enabled.
- **_id** (string) - Unique identifier for the project.
#### Response Example
```json
{
"content": {
"examples": {
"normal": {
"value": {
"rows": [
{
"json": "{\"classification\": [\"National government (current)\"], \"country\": [\"tw\"], \"sourceUrl\": [\"https://www.cia.gov/the-world-factbook/countries/taiwan\", \"https://www.cia.gov/resources/world-leaders/foreign-governments/taiwan\"], \"name\": [\"လိုင့်ချင်းဒေ\", \"Lai Ching‑te\", \"Laj Csing‑tö\", \"لاي تشينج تي\", \"לאי צ'ינגדה\", \"LAI Ching-te (a.k.a. William LAI)\", \"頼清徳\", \"ឡៃ ឈីងទឿ\", \"賴清德\", \"라이칭더\", \"Lay Ching‑de\", \"William Laj\", \"Laj Čching-te\", \"Lai Ching-te\", \"لاي تشينغ دي\", \"ლაι ცინგ დე\", \"Laj Čing Te\", \"لائی چینگ تی\", \"Лай Циндэ\", \"Լայ Ցինդե\", \"Лай Цінде\", \"لای چینг ته\", \"Lai Çinq-Te\"], \"topics\": [[\"role.pep\", \"Politician\"]], \"position\": [\"member of the National Assembly of the Republic of China (1996-1999)\", \"Mayor of Tainan (2010-2017)\", \"Member of the Legislative Yuan (1999-2002)\", \"Premier of the Republic of China (2017-2019)\", \"President\", \"Member of the Legislative Yuan (2002-2005)\", \"Member of the Legislative Yuan (2005-2008)\", \"President of the Republic of China (2024-)\", \"Chairperson of the Democratic Progressive Party (2023-)\", \"Vice President of the Republic of China (2020-2024)\", \"Member of the Legislative Yuan (2008-2010)\"], \"wikidataId\": [\"Q3847080\"], \"citizenship\": [\"tw\"], \"birthDate\": [\"1959-10-06\"], \"alias\": [\"Лай Циндэ́\", \"William Ching-te Lai\", \"Lai Çingde\", \"Lai Ching Tak\", \"William Lai\", \"Лай, Уильям\", \"William Lai Ching-te\", \"لاى تشينج تى\", \"Ching-te Lai\", \"לאי צ'ינג-טה\", \"Лай Чінте\", \"لاي تشينغ تي\", \"Qingde Lai\", \"윌리엄 라이\", \"Lai Qingde\"], \"weakAlias\": [\"ライ・チンテ\", \"뇌청덕\", \"ライ・チンダー\", \"ウィリアム・ライ\", \"赖清德\", \"ライ・チンダー\"], \"gender\": [\"male\"], \"notes\": [\"16th President of Republic of China(Taiwan) since 2024\"], \"lastName\": [\"Lai\"], \"firstName\": [\"William\"], \"education\": [\"National Cheng Kung University\", \"Harvard T.H. Chan School of Public Health\", \"Harvard University\", \"Taipei Municipal Chien Kuo High School (1976-1979)\", \"National Taiwan University (1979-1983)\"], \"birthPlace\": [\"Wanli District\"], \"id\": \"hfYOD5IHn34kbzQsX2Y1s8U2vSde4uVU5UgUS/aLHjY=\"",
"score": 2.065893
}
],
"currentPage": 1,
"limit": 50,
"durationMs": 0.618665,
"total": 1
}
},
"no search any one": {
"value": {
"currentPage": 1,
"limit": 50,
"durationMs": 0.497116
}
}
},
"security": [
{
"apikey": []
}
],
"servers": [
{
"url": "https://api2.idanalyzer.com",
"description": "US (Los Angeles)"
},
{
"url": "https://api2-eu.idanalyzer.com",
"description": "EU (Frankfurt)"
}
],
"tags": [
{
"name": "AML API"
}
],
"components": {
"securitySchemes": {
"apikey": {
"type": "apiKey",
"name": "X-API-KEY",
"in": "header"
}
}
},
"x-readme": {
"explorer-enabled": true,
"proxy-enabled": true
},
"_id": "6733229c21aaaa005e085ccd"
}
}
```
#### Error Response
(No specific error responses documented for this endpoint in the provided text.)
```
--------------------------------
### List Contract Templates - cURL Request Example
Source: https://developer.idanalyzer.com/reference/contract-template
Example of how to make a GET request to retrieve a list of contract templates using cURL. This demonstrates the necessary URL and headers for the request.
```shell
curl --request GET \
--url https://endpoint.example.com/contract \
--header 'accept: application/json' \
--header 'content-type: application/json'
```
--------------------------------
### List Transactions GET Request (cURL)
Source: https://developer.idanalyzer.com/reference/transaction-vault-api-1
Demonstrates how to make a GET request to the List Transactions API endpoint using cURL. This is a basic example showing the URL and required headers.
```shell
curl --request GET \
--url https://api2.idanalyzer.com/transaction \
--header 'accept: application/json'
```
--------------------------------
### Install Flask Web Framework
Source: https://developer.idanalyzer.com/docs/building-an-aml-compliance-web-app
This command installs the Flask micro web framework using pip, the Python package installer. Flask is used to build the web application backend.
```shell
pip install flask
```
--------------------------------
### Get Account Information using PHP
Source: https://developer.idanalyzer.com/reference/account-1
This PHP example demonstrates fetching account information via a GET request to the iDAnalyzer API. It utilizes cURL to perform the HTTP request and process the JSON response. Error handling for the request is included.
```php
```
--------------------------------
### List Transactions GET Request (Ruby)
Source: https://developer.idanalyzer.com/reference/transaction-vault-api-1
A Ruby example for calling the List Transactions API. It uses the 'net/http' library to perform a GET request and specify the 'accept' header for receiving JSON data.
```ruby
require 'uri'
require 'net/http'
require 'json'
uri = URI.parse('https://api2.idanalyzer.com/transaction')
request = Net::HTTP::Get.new(uri)
request['accept'] = 'application/json'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts JSON.parse(response.body)
```
--------------------------------
### Quick ID Scan Request Example (JSON)
Source: https://developer.idanalyzer.com/reference/post-quickscan-2
This example demonstrates the JSON payload for the Quick ID Scan endpoint. It includes the base64-encoded document image and an optional back image, along with a flag to save the file for caching. The 'profile' parameter is required for identifying the scan configuration.
```json
{
"document": "Base64 encoded image",
"documentBack": "Base64 encoded image",
"saveFile": true
}
```
--------------------------------
### API Example Data Structure
Source: https://developer.idanalyzer.com/reference/get-myaccount-2
Provides an example structure for API usage data, including display name, username, hits, quota, and host restrictions. This is a subset of the full user profile.
```json
{
"id": 1,
"displayName": "Test",
"userName": "test",
"hits": 112,
"quota": 0,
"hostList": "",
"privateKey": "CW3xvtTjMUEwe6PWtAvYNM6Sa6OKfHfgBwfTv1NKGKs=",
"restrictedKey": ""
}
```
--------------------------------
### List Webhook History Request Examples (Multiple Languages)
Source: https://developer.idanalyzer.com/reference/webhook
Examples of how to request webhook history using different programming languages. These snippets demonstrate making a GET request to the webhook endpoint with appropriate headers.
```shell
curl --request GET \
--url https://endpoint.example.com/webhook \
--header 'accept: application/json' \
--header 'content-type: application/json'
```
```javascript
const fetch = require('node-fetch');
const options = {
method: 'GET',
headers: {
'accept': 'application/json',
'content-type': 'application/json'
}
};
fetch('https://endpoint.example.com/webhook', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
```
```ruby
require 'uri'
require 'net/http'
uri = URI.parse("https://endpoint.example.com/webhook")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri.request_uri)
request['accept'] = 'application/json'
request['content-type'] = 'application/json'
response = http.request(request)
puts response.body
```
```php
$client = new GuzzleHttpClient();
try {
$response = $client->request('GET', 'https://endpoint.example.com/webhook', [
'headers' => [
'accept' => 'application/json',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
} catch (GuzzleHttpExceptionGuzzleException $e) {
echo 'Error: ' . $e->getMessage();
}
```
```python
import requests
url = "https://endpoint.example.com/webhook"
headers = {
"accept": "application/json",
"content-type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.text)
```
--------------------------------
### Example Success Response
Source: https://developer.idanalyzer.com/reference/post-quickscan
Provides an example of a successful JSON response from the Developer ID Analyzer. This example demonstrates the 'success' boolean field and includes a nested 'value' object, illustrating a typical output structure when the analysis completes without errors.
```json
{
"success": true,
"value": {
"2": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object"
}
},
"3": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object"
}
}
}
}
```
--------------------------------
### Example Data Entry
Source: https://developer.idanalyzer.com/reference/get-transaction-transactionid
Provides an example of a data entry within the profile schema. This example includes an ID, a 'data' object with an 'address1' array containing a structured address object with value, confidence, source, index, and inputBox coordinates.
```json
{
"id": "abf22fde81b046c989291c9bc5b672a1",
"data": {
"address1": [
{
"value": "2570 24TH STREET",
"confidence": 0.99,
"source": "visual",
"index": 0,
"inputBox": [
[
343,
315
],
[
570,
315
],
[
570,
340
],
[
343,
340
]
]
}
]
}
}
```
--------------------------------
### List KYC Profiles API Request (Python)
Source: https://developer.idanalyzer.com/reference/kyc-profile-2
This Python snippet uses the 'requests' library to perform a GET request to the List KYC Profiles API. It retrieves and prints the JSON response containing the KYC profile data. Ensure you have the 'requests' library installed (`pip install requests`).
```python
import requests
url = "https://api2.idanalyzer.com/profile"
headers = {
"accept": "application/json"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status() # Raise an exception for bad status codes
print(response.json())
except requests.exceptions.RequestException as e:
print(f"Error fetching KYC profiles: {e}")
```
--------------------------------
### List KYC Profiles API Request (Node.js)
Source: https://developer.idanalyzer.com/reference/kyc-profile-2
This Node.js snippet shows how to fetch KYC profiles using the 'axios' library. It makes a GET request to the specified API endpoint and expects a JSON array of profile objects in the response. Ensure 'axios' is installed (`npm install axios`).
```javascript
const axios = require('axios');
const getKycProfiles = async () => {
try {
const response = await axios.get('https://api2.idanalyzer.com/profile', {
headers: {
'accept': 'application/json'
}
});
console.log(response.data);
return response.data;
} catch (error) {
console.error('Error fetching KYC profiles:', error);
}
};
getKycProfiles();
```
--------------------------------
### Install Requests Library
Source: https://developer.idanalyzer.com/docs/building-an-aml-compliance-web-app
This command installs the Requests library using pip. This library simplifies making HTTP requests, which will be used to interact with the ID Analyzer API.
```shell
pip install requests
```
--------------------------------
### List KYC Profiles API Request (Ruby)
Source: https://developer.idanalyzer.com/reference/kyc-profile-2
This Ruby snippet utilizes the 'httparty' gem to make a GET request to the List KYC Profiles API. It sends the request to the profile endpoint and logs the JSON response containing the KYC profile data. Make sure to install 'httparty' (`gem install httparty`).
```ruby
require 'httparty'
url = 'https://api2.idanalyzer.com/profile'
headers = { 'accept' => 'application/json' }
response = HTTParty.get(url, headers: headers)
if response.success?
puts response.parsed_response
else
puts "Error: #{response.code} - #{response.message}"
end
```
--------------------------------
### GET /admin/backup/config
Source: https://developer.idanalyzer.com/reference/get-admin-backup-config
Retrieves the full server settings for backup purposes. This endpoint is secured and requires an administrator token.
```APIDOC
## GET /admin/backup/config
### Description
Backup full server settings. This endpoint retrieves the complete configuration of the backup server.
### Method
GET
### Endpoint
/admin/backup/config
### Parameters
#### Query Parameters
None
#### Request Body
None
### Request Example
None
### Response
#### Success Response (200)
- **BINARY DATA** (binary) - The backup configuration data in binary format.
#### Response Example
(Binary data representing server settings)
```
--------------------------------
### List Webhook History (Ruby)
Source: https://developer.idanalyzer.com/reference/webhook-3
Ruby example using the 'httparty' gem to fetch webhook history. It shows how to make a GET request with specified headers and display the response.
```ruby
require 'httparty'
url = 'https://api2.idanalyzer.com/webhook'
headers = {
'accept' => 'application/json',
'content-type' => 'application/json'
}
response = HTTParty.get(url, headers: headers)
puts response.body
```