Get a project's photo
GEThttps://api.getwerk.ai/api/v1/projects/{projectId}/photo
The project's photo, as a JPEG.
With If-None-Match holding the photo's current ETag, the answer is 304 with no body.
Authorization
AuthorizationheaderRequired
Authorization: Bearer <key> Authentication
Headers
If-None-Matchstring
The ETag of a copy already held; when it is current, the answer is 304.
Path parameters
projectIdstring, uuidRequired
The project's id.
Query parameters
versionstring
The photo's version as last read; when it is no longer current, the photo is not found.
Response
200 The photo, with its version as its ETag.
image/jpeg
304 The copy held is current.
Errors
400
invalid_query The query is not in the form the route takes; the limit is in the unit of the input details.field names (characters for a text, entries for a list, the value for a number).401
session_revoked The request carries no session the server holds, or its session has ended.401
session_expired The session has expired.404
conversation_not_found The project the request names, or its chat, is not one the signed-in person is in.404
project_photo_not_found The project has no photo, or none at the version the request names.409
session_changed The session changed while the request was in flight.429
rate_limited More requests of this kind were sent than Werk takes within the time it counts them over.500
server_error The server could not complete the request, and it is not known whether a write it holds was made.curl
curl "https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/photo?version=2" \
-H "Authorization: Bearer wk_key_..."TypeScript
const res = await fetch("https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/photo?version=2", {
headers: {
Authorization: "Bearer wk_key_...",
},
});200
Send a requestGET
It is sent with the key you give, as you. A change made here is real.
JSON
The request could not be sent, or its response could not be read.