Activate process
PUT /organizations/{org_id}/runs/{run_id}/activate
This endpoint restores (unarchives) a previously archived process instance (run), making it active again.
Replace {org_id}
with your Organization ID and {run_id}
with the ID of the process run to activate.
Authorization: Bearer {your_access_token}
Accept: application/json
X-Tallyfy-Client: APIClient
No request body is needed for this PUT request.
const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';const orgId = 'YOUR_ORGANIZATION_ID';const runId = 'PROCESS_RUN_ID_TO_ACTIVATE';const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/runs/${runId}/activate`;
const headers = new Headers();headers.append('Authorization', `Bearer ${accessToken}`);headers.append('Accept', 'application/json');headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, { method: 'PUT', // Use PUT method headers: headers // No body required for this request}).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 activate process ${runId}:`, data); throw new Error(`HTTP error! status: ${response.status}`); } console.log(`Successfully activated process ${runId}. Status: ${response.status}`); return data; // Activation returns the updated process });}).then(data => { console.log('Activated process details:'); console.log(JSON.stringify(data, null, 2));}).catch(error => { console.error(`Error activating process ${runId}:`, error.message);});
import requestsimport jsonimport os
access_token = os.environ.get('TALLYFY_ACCESS_TOKEN', 'YOUR_PERSONAL_ACCESS_TOKEN')org_id = os.environ.get('TALLYFY_ORG_ID', 'YOUR_ORGANIZATION_ID')run_id = 'PROCESS_RUN_ID_TO_ACTIVATE'api_url = f'https://go.tallyfy.com/api/organizations/{org_id}/runs/{run_id}/activate'
headers = { 'Authorization': f'Bearer {access_token}', 'Accept': 'application/json', 'X-Tallyfy-Client': 'APIClient'}
response = Nonetry: # PUT request with no body data needed response = requests.put(api_url, headers=headers) response.raise_for_status() # Expect 200 OK, raises HTTPError for 4xx/5xx
print(f'Successfully activated process {run_id}. Status: {response.status_code}') activated_process = response.json() print('Activated process details:') print(json.dumps(activated_process, indent=4))
except requests.exceptions.HTTPError as http_err: error_details = "" try: if response is not None: error_details = response.json() except json.JSONDecodeError: if response is not None: error_details = response.text
print(f"HTTP error occurred activating process {run_id}: {http_err}") print(f"Response Body: {error_details}")
except requests.exceptions.RequestException as req_err: print(f"Request failed activating process {run_id}: {req_err}")except json.JSONDecodeError: print(f"Failed to decode successful JSON response for process {run_id} activation") if response is not None: print(f"Response Text: {response.text}")except Exception as err: print(f"An unexpected error occurred: {err}")
import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.io.IOException;
public class ActivateProcess { public static void main(String[] args) { String accessToken = System.getenv().getOrDefault("TALLYFY_ACCESS_TOKEN", "YOUR_PERSONAL_ACCESS_TOKEN"); String orgId = System.getenv().getOrDefault("TALLYFY_ORG_ID", "YOUR_ORGANIZATION_ID"); String runId = "PROCESS_RUN_ID_TO_ACTIVATE"; String apiUrl = String.format("https://go.tallyfy.com/api/organizations/%s/runs/%s/activate", orgId, runId);
HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(apiUrl)) .header("Authorization", "Bearer " + accessToken) .header("Accept", "application/json") .header("X-Tallyfy-Client", "APIClient") .PUT(HttpRequest.BodyPublishers.noBody()) // Use PUT method with no request body .build();
try { HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() == 200) { System.out.println("Successfully activated process " + runId + ". Status: 200 OK"); System.out.println("Response Body (Activated Process):"); System.out.println(response.body()); // TODO: Consider parsing JSON using Jackson/Gson } else { System.err.println("Failed to activate process " + runId + ". Status: " + response.statusCode()); System.err.println("Response Body: " + response.body()); } } catch (IOException | InterruptedException e) { System.err.println("Request failed: " + e.getMessage()); Thread.currentThread().interrupt(); } catch (Exception e) { System.err.println("An unexpected error occurred: " + e.getMessage()); e.printStackTrace(); } }}
package main
import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "os" "time")
func main() { accessToken := os.Getenv("TALLYFY_ACCESS_TOKEN") if accessToken == "" { accessToken = "YOUR_PERSONAL_ACCESS_TOKEN" } orgId := os.Getenv("TALLYFY_ORG_ID") if orgId == "" { orgId = "YOUR_ORGANIZATION_ID" } runId := "PROCESS_RUN_ID_TO_ACTIVATE" apiUrl := fmt.Sprintf("https://go.tallyfy.com/api/organizations/%s/runs/%s/activate", orgId, runId)
client := &http.Client{Timeout: 15 * time.Second} // Create PUT request with no body (nil reader) req, err := http.NewRequest(http.MethodPut, apiUrl, nil) if err != nil { fmt.Printf("Error creating activate process request for run %s: %v\n", runId, err) return }
req.Header.Set("Authorization", "Bearer "+accessToken) req.Header.Set("Accept", "application/json") req.Header.Set("X-Tallyfy-Client", "APIClient")
resp, err := client.Do(req) if err != nil { fmt.Printf("Error executing activate process request for run %s: %v\n", runId, err) return } defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Printf("Error reading activate process response body for run %s: %v\n", runId, err) return }
if resp.StatusCode == http.StatusOK { fmt.Printf("Successfully activated process %s. Status: %d\n", runId, resp.StatusCode) fmt.Println("Response Body (Activated Process):") // Pretty print JSON response var prettyJSON bytes.Buffer if err := json.Indent(&prettyJSON, body, "", " "); err == nil { fmt.Println(prettyJSON.String()) } else { fmt.Println(string(body)) } // TODO: Unmarshal JSON if needed } else { fmt.Printf("Failed to activate process %s. Status: %d\nBody: %s\n", runId, resp.StatusCode, string(body)) }}
#include <iostream>#include <string>#include <cpprest/http_client.h>#include <cpprest/json.h>
using namespace web;using namespace web::http;using namespace web::http::client;using namespace web::json;
pplx::task<void> ActivateTallyfyProcess(const utility::string_t& runId){ utility::string_t accessToken = U("YOUR_PERSONAL_ACCESS_TOKEN"); utility::string_t orgId = U("YOUR_ORGANIZATION_ID"); utility::string_t apiUrl = U("https://go.tallyfy.com/api/organizations/") + orgId + U("/runs/") + runId + U("/activate");
http_client client(apiUrl); http_request request(methods::PUT);
request.headers().add(U("Authorization"), U("Bearer ") + accessToken); request.headers().add(U("Accept"), U("application/json")); request.headers().add(U("X-Tallyfy-Client"), U("APIClient")); // No request body is needed for activation
return client.request(request).then([runId](http_response response) { utility::string_t runIdW = runId; return response.extract_json().then([response, runIdW](pplx::task<value> task) { try { value const & body = task.get(); if (response.status_code() == status_codes::OK) { std::wcout << L"Successfully activated process " << runIdW << L". Status: " << response.status_code() << L"\nResponse:\n" << body.serialize() << std::endl; } else { std::wcerr << L"Failed to activate process " << runIdW << L". Status: " << response.status_code() << L"\nResponse: " << body.serialize() << std::endl; } } catch (const http_exception& e) { std::wcerr << L"HTTP exception during activate process: " << e.what() << std::endl; // Consider extracting string body for non-JSON errors } catch (const std::exception& e) { std::wcerr << L"Exception during activate process response handling: " << e.what() << std::endl; } }); });}
int main() { try { ActivateTallyfyProcess(U("PROCESS_RUN_ID_TO_ACTIVATE")).wait(); // Replace with actual Run ID } catch (const std::exception &e) { std::cerr << "Error in main: " << e.what() << std::endl; } return 0;}// Requires C++ REST SDK (Casablanca)
using System;using System.Net.Http;using System.Net.Http.Headers;using System.Threading.Tasks;using System.Text.Json;
public class TallyfyProcessActivator{ private static readonly HttpClient client = new HttpClient();
public static async Task ActivateProcessAsync(string runId) { var accessToken = Environment.GetEnvironmentVariable("TALLYFY_ACCESS_TOKEN") ?? "YOUR_PERSONAL_ACCESS_TOKEN"; var orgId = Environment.GetEnvironmentVariable("TALLYFY_ORG_ID") ?? "YOUR_ORGANIZATION_ID"; var apiUrl = $"https://go.tallyfy.com/api/organizations/{orgId}/runs/{runId}/activate";
try { using var request = new HttpRequestMessage(HttpMethod.Put, apiUrl); request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); request.Headers.Add("X-Tallyfy-Client", "APIClient"); // No request body needed for PUT /activate
HttpResponseMessage response = await client.SendAsync(request); string responseBody = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode) // Expect 200 OK { Console.WriteLine($"Successfully activated process {runId}. Status: {response.StatusCode}"); Console.WriteLine("Activated process details:"); try { using var doc = JsonDocument.Parse(responseBody); Console.WriteLine(JsonSerializer.Serialize(doc.RootElement, new JsonSerializerOptions { WriteIndented = true })); } catch (JsonException) { Console.WriteLine(responseBody); } } else { Console.WriteLine($"Failed to activate process {runId}. Status: {response.StatusCode}"); Console.WriteLine($"Response: {responseBody}"); } } catch (HttpRequestException e) { Console.WriteLine($"Request Exception activating process {runId}: {e.Message}"); } catch (Exception ex) { Console.WriteLine($"An unexpected error occurred: {ex.Message}"); } }
// Example Usage: // static async Task Main(string[] args) // { // await ActivateProcessAsync("PROCESS_RUN_ID_TO_ACTIVATE"); // }}
A successful request returns a 200 OK
status code. The response body contains the details of the reactivated process run, with the archived_at
timestamp removed and the status
updated (likely to its pre-archive state, e.g., active
or complete
).
{ "data": { "id": "PROCESS_RUN_ID_TO_ACTIVATE", "name": "Restored Project Run", "status": "active", // Or 'complete', etc. "archived_at": null, // Timestamp is removed // ... other process properties ... "last_updated": "2024-05-22T11:00:00Z" // Reflects activation time }}
If the process run ID is not found, was not archived, or you lack permission, an error status code (404
, 400
, 403
) will be returned.
The DELETE endpoint enables archiving of process instances by hiding them from default views while maintaining data accessibility for future restoration through authenticated API requests.
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.
A PUT endpoint that allows updating properties of an existing process run including name summary owner tags folders and form field values while returning the complete updated process data upon success.
A comprehensive guide for reopening completed tasks through DELETE requests with authentication headers showcasing implementation examples in JavaScript Python Java and Go.
About Tallyfy
- 2025 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks