curl --request PUT \
--url https://api.wesog.com/imgs \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"src": "<string>",
"src_path": "<string>",
"url_img_watermark": "<string>",
"url_img_thumbnail": "<string>",
"title": "<string>",
"headline": "<string>",
"caption": "<string>",
"alt_text": "<string>",
"ai_generated": true,
"model_release": true,
"property_release": true,
"nsfw": true,
"status": "<string>",
"date": "<string>",
"location": "<string>",
"city": "<string>",
"country": "<string>",
"event": "<string>",
"author": "<string>",
"provider": "<string>",
"shot": "<string>",
"scene": "<string>",
"technique": "<string>",
"medium": "<string>",
"keywords": [
"<string>"
],
"categories": [
"<string>"
],
"collections": [
"<string>"
]
}
]
'import requests
url = "https://api.wesog.com/imgs"
payload = [
{
"id": "<string>",
"src": "<string>",
"src_path": "<string>",
"url_img_watermark": "<string>",
"url_img_thumbnail": "<string>",
"title": "<string>",
"headline": "<string>",
"caption": "<string>",
"alt_text": "<string>",
"ai_generated": True,
"model_release": True,
"property_release": True,
"nsfw": True,
"status": "<string>",
"date": "<string>",
"location": "<string>",
"city": "<string>",
"country": "<string>",
"event": "<string>",
"author": "<string>",
"provider": "<string>",
"shot": "<string>",
"scene": "<string>",
"technique": "<string>",
"medium": "<string>",
"keywords": ["<string>"],
"categories": ["<string>"],
"collections": ["<string>"]
}
]
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
id: '<string>',
src: '<string>',
src_path: '<string>',
url_img_watermark: '<string>',
url_img_thumbnail: '<string>',
title: '<string>',
headline: '<string>',
caption: '<string>',
alt_text: '<string>',
ai_generated: true,
model_release: true,
property_release: true,
nsfw: true,
status: '<string>',
date: '<string>',
location: '<string>',
city: '<string>',
country: '<string>',
event: '<string>',
author: '<string>',
provider: '<string>',
shot: '<string>',
scene: '<string>',
technique: '<string>',
medium: '<string>',
keywords: ['<string>'],
categories: ['<string>'],
collections: ['<string>']
}
])
};
fetch('https://api.wesog.com/imgs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wesog.com/imgs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'id' => '<string>',
'src' => '<string>',
'src_path' => '<string>',
'url_img_watermark' => '<string>',
'url_img_thumbnail' => '<string>',
'title' => '<string>',
'headline' => '<string>',
'caption' => '<string>',
'alt_text' => '<string>',
'ai_generated' => true,
'model_release' => true,
'property_release' => true,
'nsfw' => true,
'status' => '<string>',
'date' => '<string>',
'location' => '<string>',
'city' => '<string>',
'country' => '<string>',
'event' => '<string>',
'author' => '<string>',
'provider' => '<string>',
'shot' => '<string>',
'scene' => '<string>',
'technique' => '<string>',
'medium' => '<string>',
'keywords' => [
'<string>'
],
'categories' => [
'<string>'
],
'collections' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wesog.com/imgs"
payload := strings.NewReader("[\n {\n \"id\": \"<string>\",\n \"src\": \"<string>\",\n \"src_path\": \"<string>\",\n \"url_img_watermark\": \"<string>\",\n \"url_img_thumbnail\": \"<string>\",\n \"title\": \"<string>\",\n \"headline\": \"<string>\",\n \"caption\": \"<string>\",\n \"alt_text\": \"<string>\",\n \"ai_generated\": true,\n \"model_release\": true,\n \"property_release\": true,\n \"nsfw\": true,\n \"status\": \"<string>\",\n \"date\": \"<string>\",\n \"location\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"event\": \"<string>\",\n \"author\": \"<string>\",\n \"provider\": \"<string>\",\n \"shot\": \"<string>\",\n \"scene\": \"<string>\",\n \"technique\": \"<string>\",\n \"medium\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ],\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ]\n }\n]")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.wesog.com/imgs")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\n \"src\": \"<string>\",\n \"src_path\": \"<string>\",\n \"url_img_watermark\": \"<string>\",\n \"url_img_thumbnail\": \"<string>\",\n \"title\": \"<string>\",\n \"headline\": \"<string>\",\n \"caption\": \"<string>\",\n \"alt_text\": \"<string>\",\n \"ai_generated\": true,\n \"model_release\": true,\n \"property_release\": true,\n \"nsfw\": true,\n \"status\": \"<string>\",\n \"date\": \"<string>\",\n \"location\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"event\": \"<string>\",\n \"author\": \"<string>\",\n \"provider\": \"<string>\",\n \"shot\": \"<string>\",\n \"scene\": \"<string>\",\n \"technique\": \"<string>\",\n \"medium\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ],\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ]\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wesog.com/imgs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"<string>\",\n \"src\": \"<string>\",\n \"src_path\": \"<string>\",\n \"url_img_watermark\": \"<string>\",\n \"url_img_thumbnail\": \"<string>\",\n \"title\": \"<string>\",\n \"headline\": \"<string>\",\n \"caption\": \"<string>\",\n \"alt_text\": \"<string>\",\n \"ai_generated\": true,\n \"model_release\": true,\n \"property_release\": true,\n \"nsfw\": true,\n \"status\": \"<string>\",\n \"date\": \"<string>\",\n \"location\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"event\": \"<string>\",\n \"author\": \"<string>\",\n \"provider\": \"<string>\",\n \"shot\": \"<string>\",\n \"scene\": \"<string>\",\n \"technique\": \"<string>\",\n \"medium\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ],\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ]\n }\n]"
response = http.request(request)
puts response.read_body{
"num_total": 123,
"num_good": 123,
"num_bad": 123,
"is_started": true,
"is_finished": true,
"all_good": true,
"do_wait": true,
"do_urgent": true,
"do_strict": true,
"idle_ms": 123,
"exec_ms": 123,
"created_at": "<string>",
"started_at": "<string>",
"finished_at": "<string>",
"errors": [
{
"id": 123,
"msg": "<string>"
}
]
}{
"operation_id": 123,
"n_total": 123,
"msg": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Replace N images
Completely replace existing images in DB.
curl --request PUT \
--url https://api.wesog.com/imgs \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"src": "<string>",
"src_path": "<string>",
"url_img_watermark": "<string>",
"url_img_thumbnail": "<string>",
"title": "<string>",
"headline": "<string>",
"caption": "<string>",
"alt_text": "<string>",
"ai_generated": true,
"model_release": true,
"property_release": true,
"nsfw": true,
"status": "<string>",
"date": "<string>",
"location": "<string>",
"city": "<string>",
"country": "<string>",
"event": "<string>",
"author": "<string>",
"provider": "<string>",
"shot": "<string>",
"scene": "<string>",
"technique": "<string>",
"medium": "<string>",
"keywords": [
"<string>"
],
"categories": [
"<string>"
],
"collections": [
"<string>"
]
}
]
'import requests
url = "https://api.wesog.com/imgs"
payload = [
{
"id": "<string>",
"src": "<string>",
"src_path": "<string>",
"url_img_watermark": "<string>",
"url_img_thumbnail": "<string>",
"title": "<string>",
"headline": "<string>",
"caption": "<string>",
"alt_text": "<string>",
"ai_generated": True,
"model_release": True,
"property_release": True,
"nsfw": True,
"status": "<string>",
"date": "<string>",
"location": "<string>",
"city": "<string>",
"country": "<string>",
"event": "<string>",
"author": "<string>",
"provider": "<string>",
"shot": "<string>",
"scene": "<string>",
"technique": "<string>",
"medium": "<string>",
"keywords": ["<string>"],
"categories": ["<string>"],
"collections": ["<string>"]
}
]
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
id: '<string>',
src: '<string>',
src_path: '<string>',
url_img_watermark: '<string>',
url_img_thumbnail: '<string>',
title: '<string>',
headline: '<string>',
caption: '<string>',
alt_text: '<string>',
ai_generated: true,
model_release: true,
property_release: true,
nsfw: true,
status: '<string>',
date: '<string>',
location: '<string>',
city: '<string>',
country: '<string>',
event: '<string>',
author: '<string>',
provider: '<string>',
shot: '<string>',
scene: '<string>',
technique: '<string>',
medium: '<string>',
keywords: ['<string>'],
categories: ['<string>'],
collections: ['<string>']
}
])
};
fetch('https://api.wesog.com/imgs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wesog.com/imgs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'id' => '<string>',
'src' => '<string>',
'src_path' => '<string>',
'url_img_watermark' => '<string>',
'url_img_thumbnail' => '<string>',
'title' => '<string>',
'headline' => '<string>',
'caption' => '<string>',
'alt_text' => '<string>',
'ai_generated' => true,
'model_release' => true,
'property_release' => true,
'nsfw' => true,
'status' => '<string>',
'date' => '<string>',
'location' => '<string>',
'city' => '<string>',
'country' => '<string>',
'event' => '<string>',
'author' => '<string>',
'provider' => '<string>',
'shot' => '<string>',
'scene' => '<string>',
'technique' => '<string>',
'medium' => '<string>',
'keywords' => [
'<string>'
],
'categories' => [
'<string>'
],
'collections' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wesog.com/imgs"
payload := strings.NewReader("[\n {\n \"id\": \"<string>\",\n \"src\": \"<string>\",\n \"src_path\": \"<string>\",\n \"url_img_watermark\": \"<string>\",\n \"url_img_thumbnail\": \"<string>\",\n \"title\": \"<string>\",\n \"headline\": \"<string>\",\n \"caption\": \"<string>\",\n \"alt_text\": \"<string>\",\n \"ai_generated\": true,\n \"model_release\": true,\n \"property_release\": true,\n \"nsfw\": true,\n \"status\": \"<string>\",\n \"date\": \"<string>\",\n \"location\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"event\": \"<string>\",\n \"author\": \"<string>\",\n \"provider\": \"<string>\",\n \"shot\": \"<string>\",\n \"scene\": \"<string>\",\n \"technique\": \"<string>\",\n \"medium\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ],\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ]\n }\n]")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.wesog.com/imgs")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\n \"src\": \"<string>\",\n \"src_path\": \"<string>\",\n \"url_img_watermark\": \"<string>\",\n \"url_img_thumbnail\": \"<string>\",\n \"title\": \"<string>\",\n \"headline\": \"<string>\",\n \"caption\": \"<string>\",\n \"alt_text\": \"<string>\",\n \"ai_generated\": true,\n \"model_release\": true,\n \"property_release\": true,\n \"nsfw\": true,\n \"status\": \"<string>\",\n \"date\": \"<string>\",\n \"location\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"event\": \"<string>\",\n \"author\": \"<string>\",\n \"provider\": \"<string>\",\n \"shot\": \"<string>\",\n \"scene\": \"<string>\",\n \"technique\": \"<string>\",\n \"medium\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ],\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ]\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wesog.com/imgs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"<string>\",\n \"src\": \"<string>\",\n \"src_path\": \"<string>\",\n \"url_img_watermark\": \"<string>\",\n \"url_img_thumbnail\": \"<string>\",\n \"title\": \"<string>\",\n \"headline\": \"<string>\",\n \"caption\": \"<string>\",\n \"alt_text\": \"<string>\",\n \"ai_generated\": true,\n \"model_release\": true,\n \"property_release\": true,\n \"nsfw\": true,\n \"status\": \"<string>\",\n \"date\": \"<string>\",\n \"location\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"event\": \"<string>\",\n \"author\": \"<string>\",\n \"provider\": \"<string>\",\n \"shot\": \"<string>\",\n \"scene\": \"<string>\",\n \"technique\": \"<string>\",\n \"medium\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ],\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ]\n }\n]"
response = http.request(request)
puts response.read_body{
"num_total": 123,
"num_good": 123,
"num_bad": 123,
"is_started": true,
"is_finished": true,
"all_good": true,
"do_wait": true,
"do_urgent": true,
"do_strict": true,
"idle_ms": 123,
"exec_ms": 123,
"created_at": "<string>",
"started_at": "<string>",
"finished_at": "<string>",
"errors": [
{
"id": 123,
"msg": "<string>"
}
]
}{
"operation_id": 123,
"n_total": 123,
"msg": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Query Parameters
Wait for completion?
Enqueue at head of queue if True
Use strict mode if True
en|es|pt|fr|ru
Body
Response
images successfully replaced
Output of:
- a synchronous (blocking) operation. POST /imgs?wait=true
- operation status. GET ops/<op_id>
Operation type based on the HTTP method.
add, upd, del, multiple Resource type involved in the operation.
video, image, celebs Total of elements.
Number of correctly processed elements.
Number of failed processed elements.
Boolean indicating if the operation has started.
Boolean indicating if the operations has finished.
Boolean indicating that there is no failed elements yet.
Boolean for know if have to wait or not.
Boolean for know if it is an urgent operation.
Boolean for know if is required strict operations over DB.
Duration (milliseconds) between the operation has been created and has started.
Duration (milliseconds) between the operation has been started and has finished.
Creation datetime.
Start datetime.
Finalization datetime.
List of errors that occurred during processing the operation.
Show child attributes
Show child attributes