The ArchFX Cloud has an extensive Restful API that give the user access to every database record. The ArchFX WebApp is 100% driven by this API and therefore, any information that the user sees on the Web App, can be extracted via an API call. But the fact is that the Web App only accesses a small (but important) set of API calls.

This document will focus on how to easily access stream data, which is the raw data that comes directly from Arch PODs or any ArchFX Broker Connector. This document will also show how to access the higher level Global KPI aggregations.

With this document, a user can either get raw data and compute its own KPIs, and send to a different system, or it can access the computed Global KPIs (e.g. OEE, LU, etc.). This document is not intended to give a complete view of everything that is possible via the API, but simply to give a basic set of examples for how to get factory machine data.

Note that for this document, every time we refer to [<>](<https://arch.archfx.iio>) you should replace arch with whatever your specific ArchFX Cloud company domain is, usually something like

ArchFX Cloud API Basics

The ArchFX Cloud API uses JWT tokens to authenticate, so the first thing to learn is how to authenticate. The following API call can be use to authenticate:

POST: <**auth/api-jwt-auth/**>

PAYLOAD: application/json
"username": "email",
"password": "string"

This API call will respond with a token, which you will need to use for all subsequent API calls described in this document. You will add the following to your API header:

'Authorization': 'JWT ' + _token_you_just_got
'Content-Type': 'application/json'

Example: Curl command to login

$ curl <> -d [email protected] -d password=secret

$ curl -X GET <> -H 'Authorization: JWT very.big.token'
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
            "id": 1,
            "email": "[email protected]",
            "username": "joe",
            "name": "I am a user",
            "avatar": {
                "tiny": "<>...",
                "thumbnail": "<>...",
                "medium": "<>..."
            "slug": "joe",
            "is_staff": false

Command URL to retrieve a JWT token

This is useful using a web browser navigating to after logging into the Arch website.

$ curl <> -H 'Authorization: JWT very.big.token'
    "token": "smaller token",
    "jwt": "very.big.token"

Browsable API

For debugging and learning what each API can do, ArchFX Cloud has a browsable API which allows you to copy and paste any GET API call on the browser to see results (assuming you are logged on into your account), or to browse the API. Just go to (note that not all APIs are displayed) to see

Basic Database Models