Skip to content

Quick Start

Authentication

Famoco uses "Access Tokens" to authenticate API calls. An Access Token can be generated in the MDM. Go to the "API Access Tokens" module in the menu.

Starter Kit

By clicking the "Add" button, the following menu should appear:

Starter Kit

On this menu, you can select the "scope" of the token created, and eventually an expiration date. Upon clicking "Save", your newly created token should appear on the list.

Examples

For a complete list of all possible API calls, see Definitions

Obtaining your organization ID

curl -H "Authorization: Bearer fhL62gUGza2pw0TDZLadSfBvUZj6mx" \
    https://my.famoco.com/api/organizations/
{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 1,
            "name": "My Organization",
        }
    ]
}

Listing your devices

curl -H "Authorization: Bearer fhL62gUGza2pw0TDZLadSfBvUZj6mx" \
    https://my.famoco.com/api/organizations/1/devices/
{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
          "id": 1,
          "famoco_id": "(01)03770004396001(21)0581",
          "hardware_details": {
            "imei": [
              "010018800000010",
              "010018810000018"
            ],
            "wifi_mac": "00:16:58:01:00:01",
            "bluetooth_mac": "00:16:58:02:00:01",
            "model": "FX200"
          },
          "state_details": {
            "battery": {
              "plugged": 0,
              "voltage": 4048,
              "level": 3,
              "status": 4
            },
            "ip": "127.0.0.1",
            "geolocation_method": "GPS",
            "last_sync": "2015-10-21T07:28:00.582725Z",
            "latitude": "38.6935973",
            "longitude": "-9.20571150",
            "maintenance_status": "In the field",
            "sync_status": "Synced",
            "os_version": "FX200_v1.0",
            "owner_name": "Alan Smithee",
            "product_model": "FX200",
            "system_applications": [
              {
                "package_name": "com.famoco.launcher",
                "package_version_code": 1
              },
              {
                "package_name": "com.famoco.fms",
                "package_version_code": 2
              },
              {
                "package_name": "com.famoco.settings",
                "package_version_code": 3
              }
            ]
          },
          "device_fields": {
            "com.user.appone": {
              "field": "data"
            }
          },
          "heartbeat": "OK",
          "create_date": "2015-10-21T07:28:00.582725Z",
          "update_date": "2015-10-21T07:28:00.582725Z",
          "settings": {
            "volume": 3,
            "dev_mode": true,
            "nfc": false,
            "bluetooth": true,
            "gps": true,
            "auto_timezone": false,
            "timezone": "Etc/GMT+1",
            "fms_sync_interval": 3600000,
            "screen_timeout": 60000,
            "locale": "en_US",
            "wifi": {
              "enabled": true,
              "security": "WPA/WPA2",
              "ssid": "MySecureNetwork",
              "password": "MyS3cur3Passw0rd",
              "sleep_policy": 2
            },
            "apn": {
              "enabled": true,
              "name": "myapn",
              "apn": "network.com",
              "mcc": "787",
              "mnc": "3737",
              "type": [
                "default",
                "mms"
              ],
              "proxy": "string",
              "port": "8000",
              "user": "user",
              "password": "password",
              "server": "string",
              "mmsc": "string",
              "mmsproxy": "string",
              "mmsport": "8080",
              "authtype": 1,
              "protocol": "IPv4V6",
              "roaming_protocol": "IPv6",
              "bearer": 14
            },
            "data": {
              "enabled": true,
              "roaming": true
            }
          },
          "organization": {
            "id": 1,
            "name": "My Organization"
          },
          "profile": {
            "id": 1,
            "name": "Profile One"
          },
          "subscriber_number": 1,
          "is_archived": false,
          "effective_profile": {
            "id": 1,
            "name": "Profile One"
          },
          "prev_effective_profile": 2,
          "applications": [
            1,
            2,
            3
          ],
          "applications_details": [
            {
              "id": 1,
              "package_name": "com.user.appone",
              "package_version_code": 100,
              "package_version_name": "1.0.0",
              "label": "User Application 1",
              "icon": "/media/1/icon_filename_1.png",
              "size": 1024
            },
            {
              "id": 2,
              "package_name": "com.user.apptwo",
              "package_version_code": 200,
              "package_version_name": "2.0.0",
              "label": "User Application 2",
              "icon": "/media/1/icon_filename_2.png",
              "size": 2048
            },
            {
              "id": 3,
              "package_name": "com.user.famocolayer",
              "package_version_code": 100,
              "package_version_name": "1.0.0",
              "label": "Famoco Layer",
              "icon": "/media/1/icon_filename_FL.png",
              "size": 3072
            }
          ],
          "autolaunch_application": 2,
          "autolaunch_application_details": {
            "id": 1,
            "package_name": "com.user.appone",
            "package_version_code": 100,
            "package_version_name": "1.0.0",
            "label": "User Application 1",
            "icon": "/media/1/icon_filename_1.png",
            "size": 0
          }
        }
    ]
}