Read an upload
curl --request GET \
--url https://api.zerogen.com/v1/uploads/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zerogen.com/v1/uploads/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerogen.com/v1/uploads/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"projectId": "<string>",
"status": "upload_required",
"assetId": "<string>",
"upload": {
"method": "PUT",
"url": "<string>",
"headers": {},
"expiresAt": "2023-11-07T05:31:56Z"
},
"folder": {
"id": "<string>",
"filed": true,
"error": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}Uploads
Read an upload
One of the caller’s uploads and, once ready, its Library asset.
Needs the uploads:create scope.
GET
/
uploads
/
{id}
Read an upload
curl --request GET \
--url https://api.zerogen.com/v1/uploads/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zerogen.com/v1/uploads/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerogen.com/v1/uploads/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"projectId": "<string>",
"status": "upload_required",
"assetId": "<string>",
"upload": {
"method": "PUT",
"url": "<string>",
"headers": {},
"expiresAt": "2023-11-07T05:31:56Z"
},
"folder": {
"id": "<string>",
"filed": true,
"error": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}Authorizations
A ZeroGen API key: zg_ for a live key, zg_test_ for a test key.
Path Parameters
The upload's ID, as create returned it
Response
The upload.
The upload's ID, which completes it
upload_required: PUT the bytes, then complete; ready: the asset can be used
Available options:
upload_required, ready Once ready, the Library asset to send as a run input; an identical file already in the project is reused
Where to PUT the file's exact bytes, with these headers, before expiresAt
Show child attributes
Show child attributes
Whether the asset was added to the folder named at create
Show child attributes
Show child attributes