Skip to content

Cognitive Systems WiFi Motion AppCloud API (v1-5-x)

The AppCloud APIs are used by mobile applications to communicate with the Cognitive Systems Infrastructure.

Download OpenAPI description
Languages
Servers
Mock server

https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/

https://docs.cognitivesystems.com/api/v1/

Overview

Operations

Out of Box

Operations

Logging In

Operations

Login and Begin Session

Request

Session create for a user. Each session create updates a "valid_from" UTC timestamp column in the user model.

Any subseqeuent session creates for the same user will invalidate any previously issued tokens, effectively preventing account sharing or multiple devices being logged-in with the same account.

Query
multiboolean

Prevents the update of the valid_from field, allowing multiple sessions with the same account.

Default false
Bodyapplication/json
emailstringrequired
passwordstringrequired
first_namestring
last_namestring
curl -i -X POST \
  'https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/sessions?multi=false' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "string",
    "password": "string",
    "first_name": "string",
    "last_name": "string"
  }'

Responses

Bodyapplication/json
refresh_tokenstring
tokenstring
userobject
Response
application/json
{ "refresh_token": "string", "token": "string", "user": { "id": 0, "username": "string", "email": "string", "first_name": "string", "last_name": "string", "created_at": "string", "updated_at": "string", "confirmed_at": "string", "sub": "string", "valid_from": 0 } }

Re-login and refresh existing session

Request

Used by Wifi Motion app to refresh session and issue new auth + refresh tokens.

Query
multiboolean

Prevents the update of the valid_from field on session refresh, allowing multiple sessions with the same account.

Default false
Bodyapplication/json
tokenstringrequired
curl -i -X PATCH \
  'https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/sessions?multi=false' \
  -H 'Content-Type: application/json' \
  -d '{
    "token": "string"
  }'

Responses

Bodyapplication/json
refresh_tokenstring[Bearer\s]?[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?...

New refresh token

Example: "NEW.AUTH.TOKEN"
tokenstring[Bearer\s]?[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?...

New auth token

Example: "NEW.REFRESH.TOKEN"
userobject

User data

Example: {"id":420,"email":"user@cognitivesystems.com","first_name":"John","last_name":"Smith","created_at":"2020-01-04T22:05:38.793Z","updated_at":"2020-01-04T22:06:02.059Z","confirmed_at":"2020-01-04T22:06:02.056Z"}
Response
application/json
{ "refresh_token": "NEW.AUTH.TOKEN", "token": "NEW.REFRESH.TOKEN", "user": { "id": 420, "email": "user@cognitivesystems.com", "first_name": "John", "last_name": "Smith", "created_at": "2020-01-04T22:05:38.793Z", "updated_at": "2020-01-04T22:06:02.059Z", "confirmed_at": "2020-01-04T22:06:02.056Z" } }

Login using Apple account and Begin Session

Request

This API endpoint allows users to create a session by authenticating via Apple’s Single Sign-On (SSO).

The endpoint validates an Apple JWT token and then follows the /sessions flow to establish a user session

Bodyapplication/json
userobject
access_tokenstringrequired

JWT token issued by Apple SSO

Example: "NEW.APPLE.AUTH.TOKEN"
curl -i -X POST \
  https://docs.cognitivesystems.com/_mock/assets/specs/app-cloud/v1-5-x/sessions/sso/apple \
  -H 'Content-Type: application/json' \
  -d '{
    "user": {
      "name": {
        "firstName": "John",
        "lastName": "Smith"
      },
      "email": "user@cognitivesystems.com"
    },
    "access_token": "NEW.APPLE.AUTH.TOKEN"
  }'

Responses

Bodyapplication/json
refresh_tokenstring
tokenstring
userobject
Response
application/json
{ "refresh_token": "string", "token": "string", "user": { "id": 0, "username": "string", "email": "string", "first_name": "string", "last_name": "string", "created_at": "string", "updated_at": "string", "confirmed_at": "string", "sub": "string", "valid_from": 0 } }

Geofencing

Operations

Account Management

Operations

Network Settings

Operations

Sounding v2

Operations

Events, History, and Visualizations

Operations

Household Insights [BETA]

Operations

Zone Priority [BETA]

Operations

Universal Alerting

Operations

Meta

Operations

Administration

Operations