Hosts

The Hosts API provides endpoints for managing the hosts tracing your applications.

Hosts

GET /api-v2/hosts

Return a list of all hosts traced.

This list will be sorted in reverse chronological order of the last trace that the host has seen.

Sample

{
    "data": [
        {
            "first_heartbeat": 1385074694,
            "id": 123456,
            "last_heartbeat": 1408641942,
            "last_trace": 1408641600,
            "name": "dev_testing"
        },
        {
            "first_heartbeat": 1395337803,
            "id": 654321,
            "last_heartbeat": 1408641930,
            "last_trace": None,
            "name": "web_production"
        }
    ],
    "response": "ok"
}

Instrumentation Versions

GET /api-v2/hosts/<host_id>/versions

Returns a list of the instrumentation installed on a host, and the current version of that instrumentation. A platform key is set if the instrumentation reports it (can be "linux" or "windows").

Sample

{
    "data":[
        {
            "release_date": 1402876800,
            "version": "1.3.0",
            "platform": null,
            "name": "nginx",
            "update_required": false
        },
        {
            "release_date": 1392249600,
            "version": 1.1.0,
            "platform": "linux",
            "name": "tracelyzer",
            "update_required": true
        }
    ]
    "response": "ok"
}

Hosts by App

GET /api-v2/app/<appname>/hosts

Returns a list of hosts assigned to the specified app.

Sample

{
    "data": [
        {
            "first_heartbeat": 1385074694,
            "id": 123456,
            "last_heartbeat": 1408641942,
            "last_trace": 1408641600,
            "name": "dev_testing"
        },
        {
            "first_heartbeat": 1395337803,
            "id": 654321,
            "last_heartbeat": 1408641930,
            "last_trace": None,
            "name": "web_production"
        }
    ],
    "response": "ok"
}

Deletion

DELETE /api-v2/hosts/<host_id>

Returns True if the host is successfully deleted.

Sample

{
    "data": true,
    "response":"ok"
}

Raises an error if no host with the specified ID is found, or multiple hosts are found.

Sample

{
    "data": "No host found with ID 123456789",
    "response": "error"
}

Table Of Contents

Related Topics