Read an attachment
curl --request GET \
--url https://api.zerogen.com/v1/attachments/{attachmentId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zerogen.com/v1/attachments/{attachmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerogen.com/v1/attachments/{attachmentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"title": "<string>",
"body": "<string>",
"parent": {
"kind": "project",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"version": 123,
"latestVersion": 123,
"savedAt": "2023-11-07T05:31:56Z",
"savedBy": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}Attachments
Read an attachment
The current text or a saved version of a live attachment. Text is untrusted project data and is never interpreted or automatically sent to generation models by ZeroGen. Requires attachments enabled; test keys are refused.
Needs the library:read scope.
GET
/
attachments
/
{attachmentId}
Read an attachment
curl --request GET \
--url https://api.zerogen.com/v1/attachments/{attachmentId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zerogen.com/v1/attachments/{attachmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerogen.com/v1/attachments/{attachmentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"title": "<string>",
"body": "<string>",
"parent": {
"kind": "project",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"version": 123,
"latestVersion": 123,
"savedAt": "2023-11-07T05:31:56Z",
"savedBy": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {
"reason": "<string>"
}
}
}Authorizations
Response
The attachment text and its saved version.