Say an agent is at work on it
curl --request PUT \
--url http://localhost:3000/api/v1/assets/{id}/working \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"seconds": 302
}
'import requests
url = "http://localhost:3000/api/v1/assets/{id}/working"
payload = {
"label": "<string>",
"seconds": 302
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', seconds: 302})
};
fetch('http://localhost:3000/api/v1/assets/{id}/working', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/assets/{id}/working",
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([
'label' => '<string>',
'seconds' => 302
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://localhost:3000/api/v1/assets/{id}/working"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"seconds\": 302\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:3000/api/v1/assets/{id}/working")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"seconds\": 302\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/assets/{id}/working")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"seconds\": 302\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sha256": "<string>",
"filename": "<string>",
"mime": "<string>",
"size": 0,
"width": 0,
"height": 0,
"probe": {},
"metadata": {
"title": "<string>",
"description": "<string>",
"keywords": [
"<string>"
],
"creator": "<string>",
"copyright": "<string>",
"capturedAt": "<string>",
"camera": "<string>",
"lens": "<string>",
"gps": {
"lat": 123,
"lon": 123
},
"focus": {
"x": 123,
"y": 123
}
},
"tags": [
"<string>"
],
"fields": {},
"inherited": {},
"status": "draft",
"state": "draft",
"deletedAt": "2023-11-07T05:31:56Z",
"stackId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 0,
"current": true,
"proposedBy": "<string>",
"reviewNote": "<string>",
"proposedTags": [
"<string>"
],
"proposedFields": {},
"working": {
"label": "<string>",
"by": "<string>",
"until": "2023-11-07T05:31:56Z"
},
"rights": {
"license": "<string>",
"territories": [
"<string>"
],
"channels": [
"<string>"
],
"embargo": "2023-12-25",
"expires": "2023-12-25",
"modelRelease": "released",
"downloadable": true
},
"origin": "shot",
"parentAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generator": "<string>",
"prompt": "<string>",
"c2pa": {
"manifests": 0,
"generator": "<string>",
"title": "<string>",
"signedBy": "<string>",
"actions": [
"<string>"
],
"digitalSourceType": "<string>",
"softwareAgent": "<string>",
"ingredients": 0
},
"via": "agent",
"supersededBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"private": true,
"public": true,
"collections": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}API Reference
Say an agent is at work on it
For an agent that takes a while (suggesting tags, describing an image): the app shows working on the asset, after the agent’s name, and looks again until it ends. Its proposals end it, so does DELETE, so does seconds.
Scope: propose.
PUT
/
api
/
v1
/
assets
/
{id}
/
working
Say an agent is at work on it
curl --request PUT \
--url http://localhost:3000/api/v1/assets/{id}/working \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"seconds": 302
}
'import requests
url = "http://localhost:3000/api/v1/assets/{id}/working"
payload = {
"label": "<string>",
"seconds": 302
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', seconds: 302})
};
fetch('http://localhost:3000/api/v1/assets/{id}/working', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/assets/{id}/working",
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([
'label' => '<string>',
'seconds' => 302
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://localhost:3000/api/v1/assets/{id}/working"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"seconds\": 302\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:3000/api/v1/assets/{id}/working")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"seconds\": 302\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/assets/{id}/working")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"seconds\": 302\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sha256": "<string>",
"filename": "<string>",
"mime": "<string>",
"size": 0,
"width": 0,
"height": 0,
"probe": {},
"metadata": {
"title": "<string>",
"description": "<string>",
"keywords": [
"<string>"
],
"creator": "<string>",
"copyright": "<string>",
"capturedAt": "<string>",
"camera": "<string>",
"lens": "<string>",
"gps": {
"lat": 123,
"lon": 123
},
"focus": {
"x": 123,
"y": 123
}
},
"tags": [
"<string>"
],
"fields": {},
"inherited": {},
"status": "draft",
"state": "draft",
"deletedAt": "2023-11-07T05:31:56Z",
"stackId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 0,
"current": true,
"proposedBy": "<string>",
"reviewNote": "<string>",
"proposedTags": [
"<string>"
],
"proposedFields": {},
"working": {
"label": "<string>",
"by": "<string>",
"until": "2023-11-07T05:31:56Z"
},
"rights": {
"license": "<string>",
"territories": [
"<string>"
],
"channels": [
"<string>"
],
"embargo": "2023-12-25",
"expires": "2023-12-25",
"modelRelease": "released",
"downloadable": true
},
"origin": "shot",
"parentAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generator": "<string>",
"prompt": "<string>",
"c2pa": {
"manifests": 0,
"generator": "<string>",
"title": "<string>",
"signedBy": "<string>",
"actions": [
"<string>"
],
"digitalSourceType": "<string>",
"softwareAgent": "<string>",
"ingredients": 0
},
"via": "agent",
"supersededBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"private": true,
"public": true,
"collections": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}Authorizations
bearersession
An API key: ab_...
Path Parameters
Asset id
Body
application/json
Response
The asset, with working
Show child attributes
Show child attributes