dev-master 2017-04-14 07:56 UTC


Zipkin's Query api is rooted at api/v1, on a host that by default listens on port 9411. It primarily serves the zipkin-ui, although it includes a POST endpoint that can receive spans.

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen


PHP 5.4.0 and later

Installation & Usage


To install the bindings via Composer, add the following to composer.json:

  "repositories": [
      "type": "git",
      "url": "https://github.com/27tech/zipkin-api-php.git"
  "require": {
    "27tech/zipkin-api-php": "*@dev"

Then run composer install

Manual Installation

Download the files and include autoload.php:



To run the unit tests:

composer install

Getting Started

Please follow the installation procedure and then run the following:

require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DefaultApi();
$end_ts = 56; // int | only return links from spans where `Span.timestamp`  are at or before this time in epoch milliseconds.
$loopback = "loopback_example"; // string | only return links where all Span.timestamp are at or after (`endTs - * lookback`) in milliseconds. Defaults to `endTs`, limited to a system parameter `QUERY_LOOKBACK`

try {
    $result = $api_instance->dependenciesGet($end_ts, $loopback);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->dependenciesGet: ', $e->getMessage(), PHP_EOL;


Documentation for API Endpoints

All URIs are relative to http://localhost:9411/api/v1

Class Method HTTP request Description
DefaultApi dependenciesGet GET /dependencies
DefaultApi servicesGet GET /services
DefaultApi spansGet GET /spans
DefaultApi spansPost POST /spans
DefaultApi traceTraceIdGet GET /trace/{traceId}
DefaultApi tracesGet GET /traces

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.