---
title: "Tenant Service API reference"
slug: "tenant-service-api-reference"
abstract: "Overview of URL commands available to the Tenant Service."
---
# Tenant Service API reference

This topic lists available commands and possible responses in the Tenant Service.

In the following examples, `[host]` is your Tenant Service root URL (for example, `http://def.service`).

You can use the following commands:

- `[host]`

    The default handler for all malformed or unrecognized requests. It returns the current timestamp.

    Example response:

    ```text
    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">7/13/2018 `12:30`:12 PM</string>
    ```

- `[host]/api/tenant`

    Lists all available endpoints for the configured tenant (JSON format).

    Parameters:

    - `active=false` also lists disabled endpoints.
    - `id=<guid-endpoint-id>` only returns information on the endpoint with the specified ID.

    Example:

    ```text
    http://def.service/api/tenant?active=false&id=41bb68e5-1111-2222-3333-d3bd0a61f0fd
    ```

    Example response:

    ```csharp
    [{ "Name": "Example Form Tenant Service Endpoint",
    "Enabled": true,
    "Id": "40216db7-1111-2222-3333-a76e956497ff"
    },
    { "Name": "Sample TS Endpoint",
    "Enabled": false,
    "Id": "41bb68e5-1111-2222-3333-d3bd0a61f0fd"
    }]
    ```

- `[host]/api/tenantservice`

    Parameters:

    - `id=<guid-endpoint-id>` runs the endpoint with the specified ID. It ignores any matching conditions on the endpoint.

    Any other parameters and query strings can be passed. If no ID is specified, the service attempts to find an endpoint based on matching conditions set on all enabled endpoints. It runs the first matching endpoint.

    Example:

    ```text
    http://def.service/api/tenantservice?id=40216db7-1111-2222-3333-a76e956497ff
    ```

    Example response:

    ```csharp
    {
    "Name": "Example Form Tenant Service Endpoint",
    "Id": "40216db7-5fc8-4940-88d7-a76e956497ff",
    "WasSuccess": false,
    "Messages": [ "Cannot build pipeline context PipelineContextBuilder" ],
    "ResultData": null
    }
    ```