Programs
List a program's revisions
Every revision of the program, newest first: why it changed, what changed, whether the target is still in reach, and whether the change was applied.
GET
/
v1
/
teammates
/
{external_id}
/
programs
/
{program_id}
/
revisions
List a program's revisions
curl --request GET \
--url https://api.technicallyfit.com/v1/teammates/{external_id}/programs/{program_id}/revisions \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.technicallyfit.com/v1/teammates/{external_id}/programs/{program_id}/revisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.technicallyfit.com/v1/teammates/{external_id}/programs/{program_id}/revisions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"applied_at": "<string>",
"approval": {
"decided_at": "<string>",
"mode": "automatic",
"status": "applied"
},
"cause": {
"day_index": 123,
"event_ids": [
"<string>"
],
"kind": "created",
"session_id": "<string>",
"summary": "<string>",
"week_number": 123
},
"created_at": "<string>",
"diff": {
"changes": [
{
"after": {
"id": "<string>",
"name": "<string>"
},
"before": {
"id": "<string>",
"name": "<string>"
},
"day_index": 123,
"pattern": "<string>",
"session_id": "<string>",
"week_number": 123
}
],
"from_day": 123,
"from_week": 123,
"sessions_added": 123,
"sessions_removed": 123,
"summary": "<string>",
"weeks_changed": [
123
]
},
"engine_version": "<string>",
"feasibility": [
{
"feasible": true,
"projected_final": 123,
"quantity": "<string>",
"shortfall": 123,
"target": 123,
"unit": "<string>",
"warning": "<string>"
}
],
"parent_revision": 123,
"revision": 123,
"warnings": [
"<string>"
]
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}Path Parameters
Query Parameters
⌘I
List a program's revisions
curl --request GET \
--url https://api.technicallyfit.com/v1/teammates/{external_id}/programs/{program_id}/revisions \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.technicallyfit.com/v1/teammates/{external_id}/programs/{program_id}/revisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.technicallyfit.com/v1/teammates/{external_id}/programs/{program_id}/revisions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"applied_at": "<string>",
"approval": {
"decided_at": "<string>",
"mode": "automatic",
"status": "applied"
},
"cause": {
"day_index": 123,
"event_ids": [
"<string>"
],
"kind": "created",
"session_id": "<string>",
"summary": "<string>",
"week_number": 123
},
"created_at": "<string>",
"diff": {
"changes": [
{
"after": {
"id": "<string>",
"name": "<string>"
},
"before": {
"id": "<string>",
"name": "<string>"
},
"day_index": 123,
"pattern": "<string>",
"session_id": "<string>",
"week_number": 123
}
],
"from_day": 123,
"from_week": 123,
"sessions_added": 123,
"sessions_removed": 123,
"summary": "<string>",
"weeks_changed": [
123
]
},
"engine_version": "<string>",
"feasibility": [
{
"feasible": true,
"projected_final": 123,
"quantity": "<string>",
"shortfall": 123,
"target": 123,
"unit": "<string>",
"warning": "<string>"
}
],
"parent_revision": 123,
"revision": 123,
"warnings": [
"<string>"
]
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}