List a file's earlier versions
curl --request GET \
--url https://guidinghand.ai/v1/agents/{agent_id}/file_revisions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/file_revisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/agents/{agent_id}/file_revisions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"object": "agent_file_revision",
"id": "frv_8Kd2mQ1xZp4LwRt7",
"agent_id": "<string>",
"path": "/stock/counts.xlsx",
"change": "written",
"bytes": 123,
"kind": "text",
"content_type": "<string>",
"saved_at": "2023-11-07T05:31:56Z",
"saved_by": {
"type": "user",
"email": "jane@acme.com"
},
"replaced_at": "2023-11-07T05:31:56Z",
"replaced_by": {
"type": "user",
"email": "jane@acme.com"
},
"content": "<string>"
}
]
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Agent files
List a file's earlier versions
Newest first. With path, one file’s (a deleted one’s too); without, every file’s, up to 200.
GET
/
v1
/
agents
/
{agent_id}
/
file_revisions
List a file's earlier versions
curl --request GET \
--url https://guidinghand.ai/v1/agents/{agent_id}/file_revisions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/file_revisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/agents/{agent_id}/file_revisions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"object": "agent_file_revision",
"id": "frv_8Kd2mQ1xZp4LwRt7",
"agent_id": "<string>",
"path": "/stock/counts.xlsx",
"change": "written",
"bytes": 123,
"kind": "text",
"content_type": "<string>",
"saved_at": "2023-11-07T05:31:56Z",
"saved_by": {
"type": "user",
"email": "jane@acme.com"
},
"replaced_at": "2023-11-07T05:31:56Z",
"replaced_by": {
"type": "user",
"email": "jane@acme.com"
},
"content": "<string>"
}
]
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}