DataZen Documentation
DataZen User Guide

DataZen API Examples

These samples start a pipeline with token-based authentication (Authorization: Token …). Replace the token and pipeline GUID with values from your environment. See the Overview for authentication options and Security for issuing Service Tokens.

The start API is a POST to /job/start?guid=…, where guid is the pipeline identifier.

The base URL differs for every implementation: self-hosted — https://localhost:9550/; cloud — https://<ENVIRONMENT>.enzounified.com/api/<AGENT ID>/.

Using an X.509 certificate to sign API requests is highly recommended. When a Service Token requires signing, see Examples with X.509.

Raw HTTP

Example request (similar to a Fiddler Composer capture). Adjust the host for your self-hosted or cloud base URL.

POST https://localhost:9550/job/start?guid=211161ac428447be80dc96fdde209b83 HTTP/1.1
User-Agent: Fiddler
Authorization: Token OWVhZTJiODE4MjlhNDc2OWJlOWU5MWQ3YmQyYmE3N2E=

PowerShell

# Base URL differs by deployment:
#   self-hosted: https://localhost:9550/
#   cloud:       https://<ENVIRONMENT>.enzounified.com/api/<AGENT ID>/
$baseUrl = "https://localhost:9550/"
$guid    = "211161ac428447be80dc96fdde209b83"
$token   = "OWVhZTJiODE4MjlhNDc2OWJlOWU5MWQ3YmQyYmE3N2E="

Invoke-RestMethod -Method Post `
  -Uri ($baseUrl.TrimEnd('/') + "/job/start?guid=$guid") `
  -Headers @{ Authorization = "Token $token" }

Python

import requests

# Base URL differs by deployment:
#   self-hosted: https://localhost:9550/
#   cloud:       https://<ENVIRONMENT>.enzounified.com/api/<AGENT ID>/
base_url = "https://localhost:9550/"
guid = "211161ac428447be80dc96fdde209b83"
token = "OWVhZTJiODE4MjlhNDc2OWJlOWU5MWQ3YmQyYmE3N2E="

resp = requests.post(
    f"{base_url.rstrip('/')}/job/start",
    params={"guid": guid},
    headers={"Authorization": f"Token {token}"},
)
resp.raise_for_status()
print(resp.text)

C#

using System.Net.Http;

// Base URL differs by deployment:
//   self-hosted: https://localhost:9550/
//   cloud:       https://<ENVIRONMENT>.enzounified.com/api/<AGENT ID>/
var baseUrl = "https://localhost:9550/";
var guid = "211161ac428447be80dc96fdde209b83";
var token = "OWVhZTJiODE4MjlhNDc2OWJlOWU5MWQ3YmQyYmE3N2E=";

using var client = new HttpClient();
using var request = new HttpRequestMessage(
    HttpMethod.Post,
    $"{baseUrl.TrimEnd('/')}/job/start?guid={guid}");
request.Headers.TryAddWithoutValidation("Authorization", "Token " + token);

using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());