Skip to main content
PUT
/
imgs
Replace N images
curl --request PUT \
  --url https://api.wesog.com/imgs \
  --header 'API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "id": "<string>",
    "src": "<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>"
    ]
  }
]
'
{
  "method": "add",
  "resource": "video",
  "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>"
    }
  ]
}

Authorizations

API-Key
string
header
required

Query Parameters

wait
boolean
default:false

Wait for completion?

urgent
boolean
default:false

Enqueue at head of queue if True

strict
boolean
default:false

Use strict mode if True

lang
string
default:es

en|es|pt|fr|ru

Body

application/json
id
string
required
src
string
required
url_img_watermark
string | null
url_img_thumbnail
string | null
title
string | null
headline
string | null
caption
string | null
alt_text
string | null
ai_generated
boolean | null
model_release
boolean | null
property_release
boolean | null
nsfw
boolean | null
status
string | null
date
string | null
location
string | null
city
string | null
country
string | null
event
string | null
author
string | null
provider
string | null
shot
string | null
scene
string | null
technique
string | null
medium
string | null
keywords
string[] | null
categories
string[] | null
collections
string[] | null

Response

images successfully replaced

Output of:

  • a synchronous (blocking) operation. POST /imgs?wait=true
  • operation status. GET ops/<op_id>
method
enum<string>
required

Operation type based on the HTTP method.

Available options:
add,
upd,
del,
multiple
resource
enum<string>
required

Resource type involved in the operation.

Available options:
video,
image,
celebs
num_total
integer
required

Total of elements.

num_good
integer
required

Number of correctly processed elements.

num_bad
integer
required

Number of failed processed elements.

is_started
boolean
required

Boolean indicating if the operation has started.

is_finished
boolean
required

Boolean indicating if the operations has finished.

all_good
boolean | null
required

Boolean indicating that there is no failed elements yet.

do_wait
boolean
required

Boolean for know if have to wait or not.

do_urgent
boolean
required

Boolean for know if it is an urgent operation.

do_strict
boolean
required

Boolean for know if is required strict operations over DB.

idle_ms
number
required

Duration (milliseconds) between the operation has been created and has started.

exec_ms
number
required

Duration (milliseconds) between the operation has been started and has finished.

created_at
string
required

Creation datetime.

started_at
string
required

Start datetime.

finished_at
string
required

Finalization datetime.

errors
OpError · object[]
required

List of errors that occurred during processing the operation.