General Information

Overview

This document provides general information for using Compeat's Web API.

Base URL

The base URL should be provided by a representative of Compeat. For now, let us assume the base URL is https://compeat.com/example/api. To use the API, you must append the following information to this URL.

For example, to access version 1 using client ID "xyz", the URL would be as follows.

https://compeat.com/example/webapi/v1/xyz

All other methods described throughout this documentation use a tilde to denote the base URL. For example:

~/HelloWorld

In the context of the above example, this would be interpreted as follows.

https://compeat.com/example/webapi/v1/xyz/HelloWorld

Documentation Conventions

Authentication

Compeat's Web API uses header-based basic authentication. HTTP requests must include a header similar to the following.

Authorization: Basic {base-64-encoded credentials}

For example, if your user name and password are "UserName" and "Password", respectively, you would send this header.

Authorization: Basic VXNlck5hbWU6UGFzc3dvcmQ=

If there's a problem with the client ID, user name, and/or password, the server will respond with HTTP 403.

Methods

Check connectivity

GET ~/ConnectivityTest

You can use this method to make sure the server is accessible using the client ID and credentials you supply.

Response:

The server will respond with HTTP 200 for success or 403 for failure.