Skip to content

Instantly share code, notes, and snippets.

@dknowles2
Created December 23, 2022 13:44
Show Gist options
  • Save dknowles2/d2338fb734d59f128fff2b2ea2a41099 to your computer and use it in GitHub Desktop.
Save dknowles2/d2338fb734d59f128fff2b2ea2a41099 to your computer and use it in GitHub Desktop.
Details of the Schlage WiFi API

Notes about the API

Authentication

Authentication is done via Amazon Cognito.

  • user pool region: us-west-2
  • user pool: us-west-2_2zhrVs9d4
  • client id: t5836cptp2s1il0u9lki03j5
  • client secret: 1kfmt18bgaig51in4j4v1j3jbe7ioqtjhle5o6knqc5dat0tpuvo

API Documentation

User

  • /users
    • GET - Returns a list of users
    • POST - Creates a new user
  • /users/@me
    • GET - Returns info about the currently logged in user
  • /users/{urlencoded_userId}
    • GET - Returns info about the given user id
    • PUT - Updates user info for the given user id
    • DELETE - Deletes the user with the given id

Devices

  • /devices

    • GET - Returns all devices owned by the currently authenticated user

      To return only a single type of device, pass one of the following query parameters:

      • Locks: archetype=lock
      • Bridges: devicetypeId=br400
    • POST - Adds a new device

  • /devices/{urlencoded_deviceId}/logs

    • GET - Returns logs for a device Query parameters:
      • limit - int, The number of messages to return
      • sort - str, The field to sort by
    • DELETE - Clears all logs.
  • /devices/{urlencoded_deviceId}

    • GET - Returns a single device
    • PUT - Updates a device
    • DELETE - Deletes a device
  • /devices/{urlencoded_deviceId}/commands

    • POST - Performs a command on a lock.

      The is command contained in the commandId field in the JSON body, which should be one of the following:

      • addaccesscode
      • updateaccesscode
      • deleteaccesscode
      • deleteallaccesscodes

      Some of the commands listed below for bridge devices may also work.

  • /devices/{urlencoded_deviceId}/storage/accesscode

    • GET - Returns access codes associated with a device
    • POST - Adds a new access code for a device
  • /devices/{urlencoded_deviceId}/storage/accesscode/{urlencoded_accessCodeId}

    • GET - Returns a specific access code
    • PUT - Updates a specific access code
    • DELETE - Deletes a specific access code
  • /devices/{urlencoded_deviceId}/users

    • GET - Returns all lock users
  • /devices/{urlencoded_deviceId}/users/{urlencoded_userId}

    • PUT - Updates a lock user
    • DELETE - Removes a lock user
  • /devices/{bridge_deviceId}

    • GET - Returns a bridge device.
    • PUT - Updates a bridge device.
    • DELETE - Removes a bridge device.
  • /devices/{bridge_deviceId}/commands

    • POST - Performs a command on a bridge.

      The is command contained in the commandId field in the JSON body, which should be one of the following:

      • changelockstate
      • getaccesscodes
      • addaccesscode
      • updateaccesscode
      • deleteaccesscode
      • gethistory
      • clearhistory
      • updatelockdatetime
      • updatelockfirmware
      • linklock
      • unlinklock
      • pinglock
      • pingbridge
      • fwupdatebridge
      • deletebridge (Facotry reset)
  • /notifications

    • GET - Returns notifications
    • POST - Adds a notification. Requires a single query parameter, deviceId, for the device to associate the notification with.
  • /notifications/{urlencoded_notificationId}

    • PUT - Updates a notification
    • DELETE - Deletes a notification
  • /invitations

    • GET - Returns invitations
    • POST - Adds an invitation
  • /invitations/{urlencoded_deviceId}

    • GET - Returns invitations related to a specific device
  • /invitations/{urlencoded_inviteId}

    • DELETE - Removes a specific invitation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment