Skip to content

Archive process

Endpoint

DELETE /organizations/{org_id}/runs/{run_id}

This endpoint archives a specific process instance (run). Archiving typically hides the process from default views but retains its data and allows it to be restored later.

Request

Replace {org_id} with your Organization ID and {run_id} with the ID of the process run to archive.

Headers

  • Authorization: Bearer {your_access_token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient

Body

No request body is needed for this DELETE request.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const runId = 'PROCESS_RUN_ID_TO_ARCHIVE';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/runs/${runId}`;
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, {
method: 'DELETE', // DELETE method archives the process run
headers: headers
})
.then(response => {
return response.json().then(data => { // Attempt to parse JSON regardless of status
if (!response.ok) { // Expect 200 OK on success
console.error(`Failed to archive process ${runId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
console.log(`Successfully archived process ${runId}. Status: ${response.status}`);
return data; // Archive usually returns the updated process data
});
})
.then(data => {
console.log('Archived process details:');
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error archiving process ${runId}:`, error.message);
});

Response

A successful request returns a 200 OK status code. The response body usually contains the details of the archived process run, now including an archived_at timestamp and likely a status of archived.

{
"data": {
"id": "PROCESS_RUN_ID_TO_ARCHIVE",
"name": "Old Completed Project",
"status": "archived", // Status reflects archive
// ... other process properties ...
"archived_at": "2024-05-22T10:00:00Z" // Timestamp indicates archival
}
}

If the process run ID is not found or you lack permission, a 404 or 403 error will be returned.


Processes > Delete process

A DELETE endpoint permanently removes a specific process instance and its associated data with authentication headers returning either 200 OK or 204 No Content status codes upon successful deletion.

Tasks > Archive task

A DELETE endpoint archives standalone tasks by hiding them from default views while preserving data for potential future restoration through authenticated API requests with provided code examples in multiple programming languages.

Processes > Activate process

A PUT endpoint that restores archived process instances to active status by removing the archived timestamp and updating the process state through authenticated API requests requiring organization and run IDs.

Templates > Archive or delete template

The API supports template removal through archiving which retains data and permanent deletion which irreversibly removes all template information and its associated data.