FlashLex IOT Gateway API API Reference

The FlashLex API provides a backend connected to the internet the ability to send and recieve messages to your IOT fleet.

API Endpoint
https://api.flashlex.com/dev/v1
Schemes: https
Version: v1

Authentication

basicAuth

type
basic

auth

type
apiKey
name
Authorization
in
header
x-amazon-apigateway-authtype
custom

verifyThing

type
apiKey
name
Authorization
in
header
x-amazon-apigateway-authtype
custom

subscriptions

Finds all subscriptions for the account

GET /subscriptions

Will return all the subscription records for the user account.

Successful subscriptions response.

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "status": "OK",
    "code": 200,
    "messages": [
      {
        "key": "message",
        "value": "This is something helpful."
      }
    ],
    "result": [
      {
        "flsubscriptionspk": "46c8af5f-308b-4ab6-a938-c4cc3209c73c",
        "fltimestamp": 1558824554,
        "datecreated": "2019-05-25T22:45:24Z",
        "common_name": "SAPPHIRE",
        "startts": 1571094037,
        "endts": 1571092033,
        "flstatus": "scheduled",
        "fluserspk": "ecd13b11-6d91-4e8e-9156-60e451a3c975",
        "product_id": "prod_FGB5V9qSzP6f3R",
        "plan_id": "plan_FGBe9MHTfmOxiG",
        "plan_name": "Flashlex Sapphire 30"
      }
    ]
  }
]

Returns the current active subscription and policy.

GET /subscriptions/active

Will return all the active subscription record for the user account and the policy for authorization of activity. Will return free subscription if none has been activated.

Successful response.

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "subscription": {
      "flsubscriptionspk": "46c8af5f-308b-4ab6-a938-c4cc3209c73c",
      "fltimestamp": 1558824554,
      "datecreated": "2019-05-25T22:45:24Z",
      "common_name": "SAPPHIRE",
      "startts": 1571094037,
      "endts": 1571092033,
      "flstatus": "scheduled",
      "fluserspk": "ecd13b11-6d91-4e8e-9156-60e451a3c975",
      "product_id": "prod_FGB5V9qSzP6f3R",
      "plan_id": "plan_FGBe9MHTfmOxiG",
      "plan_name": "Flashlex Sapphire 30"
    },
    "policy": {
      "Statement": [
        {
          "Action": "flashex:createThing",
          "Effect": "Deny",
          "Resource": "ecd13b11-6d91-4e8e-9156-60e451a3c975:thing:*",
          "AllowedCount": 1,
          "ActualCount": 3
        }
      ]
    }
  }
}

Return a subscription record by its id.

GET /subscriptions/{subscriptionId}

Will retreive a specific subscription record by its primary key.

subscriptionId: string
in path

(no description)

Successful subscriptions response.

404 Not Found

Not Found. The subscription was not found.

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "flsubscriptionspk": "46c8af5f-308b-4ab6-a938-c4cc3209c73c",
    "fltimestamp": 1558824554,
    "datecreated": "2019-05-25T22:45:24Z",
    "common_name": "SAPPHIRE",
    "startts": 1571094037,
    "endts": 1571092033,
    "flstatus": "scheduled",
    "fluserspk": "ecd13b11-6d91-4e8e-9156-60e451a3c975",
    "product_id": "prod_FGB5V9qSzP6f3R",
    "plan_id": "plan_FGBe9MHTfmOxiG",
    "plan_name": "Flashlex Sapphire 30"
  }
}

things

Finds all things for the account

GET /things

Will return all the thing records for the user account.

Successful response.

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": [
    {
      "flthingspk": "8fe28087-5cc9-4c2d-a04d-1cf5fcff8f3e",
      "fltimestamp": 1558824554,
      "datecreated": "2019-05-25T22:45:24Z",
      "certificateId": "dc73c46d2d70629ed4ce92d41a98e2cccb2836beb1ab04788f3c7a7bc0629cf2",
      "fluserspk": "a1333b61-87cb-4156-c018-b0ea304d879f",
      "certificatePem": "-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIUSMb6t+9DeEzaSt7tTZoCxCa+EzcwDQYJKoZIhvcNAQEL\nBQAwTTFLMEkGA1UECwxCQW1hem9uIFdlYiBTZXJ2aWNlcyBPPUFtYXpvbi5jb20g\nSW5jLiBMPVNlYXR0bGUgU1Q9V2FzaGluZ3RvbiBDPVVTMB4XDTE5MDUyMzAwNTc0\nM1oXDTQ5MTIzMTIzNTk1OVowHjEcMBoGA1UEAwwTQVdTIElvVCBDZXJ0aWZpY2F0\nZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANIvSuy6I8h42GHxM8M6\nXoIV8ZsYQyoIpAmfd1RFs+EIbLqzGYXzuhzHbJuXBFraivLpnzapY04g44ZMIz34A\nmpwaEDpie8QJvfzm3WO/OfFqyT7+Lgn9/KRNxGzBlrPu8LWH1kkd5jsXvNfhumW7\nhmAAzwPvYxqDKNx84mUVhQHv8CAg+co0yTLDwkqJ1zM6zogyRiY02R5/oS3h\n-----END CERTIFICATE-----\n",
      "keyPairPrivate": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEA0i9K7LojyHjYYfEzwzpeghXxmxhDKgikCZ93VEWxiojn5EyI\nieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZo6XMaEfFAqmrZJ6esH0U1w55PLZg\nu+/HRaZsyHloHDvldc/CrQMBhG3iNb3l4AJI6EmDAfY13FPE0kWERHYp96YwOkEL\n6CI0IXb6Av8D/eukuC/FSQrrbn34NDCIlm4pQ8ZMRg\nqDDG6tigW4Wmz/RMBtgcG7q48zc5fGYA9hREs6zmzNFzgVOJNblRmZTZ7fjtGHQu\nTAqlAoGAUsxThpkmsP6uD6RFBaiQV7DHwlagy+osXjSETFdnKs+pn5sT/t0iaqAj\nOWDij+hSu6z6uw/PP4PTAIzacYXLe/LHuAEZa2P4Rbl66qxHr51dY/h+SG48dkWR\ncZ1EMJ0I7/9MwH2gNyvC0RApwMcaCRK82My1mCGjo+t+Wd1C4PE=\n-----END RSA PRIVATE KEY-----\n",
      "keyPairPublic": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0i9K7LojyHjYYfEzwzpe\nghXxmxhDKgikCZ93VEWxiojn5EyIieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZ\no6XMaEfFAqmrZJ6esH0U1w55PLZgmZlXpjqhPgj3w1WzuNipCVHrt9m08OuCvTZ01ZhkYrZ9\nfxj47jz27uFM/aa60Fz/B00Y0yJHZijoYJWgu/ejgO8YxEh6yJ1T+1NvGOHdchn/\nRwIDAQAB\n-----END PUBLIC KEY-----\n",
      "testStatus": "CREATED",
      "thingDist": "Python",
      "thingName": "a1333b61-palooza",
      "thingType": "RasberryPi"
    }
  ]
}

Creates a new thing.

POST /things

Will create a new thing and all the backend infrastructure required to onboard a new thing.

The thing being proposed for the payment to be converted. In the form of UTC epoc seconds.

Request Content-Types: application/json
Request Example
{
  "flthingspk": "8fe28087-5cc9-4c2d-a04d-1cf5fcff8f3e"
}

Successful create.

Forbidden

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "flthingspk": "8fe28087-5cc9-4c2d-a04d-1cf5fcff8f3e",
    "fltimestamp": 1558824554,
    "datecreated": "2019-05-25T22:45:24Z",
    "certificateId": "dc73c46d2d70629ed4ce92d41a98e2cccb2836beb1ab04788f3c7a7bc0629cf2",
    "fluserspk": "a1333b61-87cb-4156-c018-b0ea304d879f",
    "certificatePem": "-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIUSMb6t+9DeEzaSt7tTZoCxCa+EzcwDQYJKoZIhvcNAQEL\nBQAwTTFLMEkGA1UECwxCQW1hem9uIFdlYiBTZXJ2aWNlcyBPPUFtYXpvbi5jb20g\nSW5jLiBMPVNlYXR0bGUgU1Q9V2FzaGluZ3RvbiBDPVVTMB4XDTE5MDUyMzAwNTc0\nM1oXDTQ5MTIzMTIzNTk1OVowHjEcMBoGA1UEAwwTQVdTIElvVCBDZXJ0aWZpY2F0\nZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANIvSuy6I8h42GHxM8M6\nXoIV8ZsYQyoIpAmfd1RFs+EIbLqzGYXzuhzHbJuXBFraivLpnzapY04g44ZMIz34A\nmpwaEDpie8QJvfzm3WO/OfFqyT7+Lgn9/KRNxGzBlrPu8LWH1kkd5jsXvNfhumW7\nhmAAzwPvYxqDKNx84mUVhQHv8CAg+co0yTLDwkqJ1zM6zogyRiY02R5/oS3h\n-----END CERTIFICATE-----\n",
    "keyPairPrivate": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEA0i9K7LojyHjYYfEzwzpeghXxmxhDKgikCZ93VEWxiojn5EyI\nieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZo6XMaEfFAqmrZJ6esH0U1w55PLZg\nu+/HRaZsyHloHDvldc/CrQMBhG3iNb3l4AJI6EmDAfY13FPE0kWERHYp96YwOkEL\n6CI0IXb6Av8D/eukuC/FSQrrbn34NDCIlm4pQ8ZMRg\nqDDG6tigW4Wmz/RMBtgcG7q48zc5fGYA9hREs6zmzNFzgVOJNblRmZTZ7fjtGHQu\nTAqlAoGAUsxThpkmsP6uD6RFBaiQV7DHwlagy+osXjSETFdnKs+pn5sT/t0iaqAj\nOWDij+hSu6z6uw/PP4PTAIzacYXLe/LHuAEZa2P4Rbl66qxHr51dY/h+SG48dkWR\ncZ1EMJ0I7/9MwH2gNyvC0RApwMcaCRK82My1mCGjo+t+Wd1C4PE=\n-----END RSA PRIVATE KEY-----\n",
    "keyPairPublic": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0i9K7LojyHjYYfEzwzpe\nghXxmxhDKgikCZ93VEWxiojn5EyIieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZ\no6XMaEfFAqmrZJ6esH0U1w55PLZgmZlXpjqhPgj3w1WzuNipCVHrt9m08OuCvTZ01ZhkYrZ9\nfxj47jz27uFM/aa60Fz/B00Y0yJHZijoYJWgu/ejgO8YxEh6yJ1T+1NvGOHdchn/\nRwIDAQAB\n-----END PUBLIC KEY-----\n",
    "testStatus": "CREATED",
    "thingDist": "Python",
    "thingName": "a1333b61-palooza",
    "thingType": "RasberryPi"
  }
}
Response Example (403 Forbidden)
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "subscription": {
      "flsubscriptionspk": "46c8af5f-308b-4ab6-a938-c4cc3209c73c",
      "fltimestamp": 1558824554,
      "datecreated": "2019-05-25T22:45:24Z",
      "common_name": "SAPPHIRE",
      "startts": 1571094037,
      "endts": 1571092033,
      "flstatus": "scheduled",
      "fluserspk": "ecd13b11-6d91-4e8e-9156-60e451a3c975",
      "product_id": "prod_FGB5V9qSzP6f3R",
      "plan_id": "plan_FGBe9MHTfmOxiG",
      "plan_name": "Flashlex Sapphire 30"
    },
    "policy": {
      "Statement": [
        {
          "Action": "flashex:createThing",
          "Effect": "Deny",
          "Resource": "ecd13b11-6d91-4e8e-9156-60e451a3c975:thing:*",
          "AllowedCount": 1,
          "ActualCount": 3
        }
      ]
    }
  }
}

Return a thing record by its id.

GET /things/{thingId}

Will retreive a specific thing record by its primary key.

thingId: string
in path

(no description)

Successful response.

404 Not Found

Not Found. The thing was not found.

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "flthingspk": "8fe28087-5cc9-4c2d-a04d-1cf5fcff8f3e",
    "fltimestamp": 1558824554,
    "datecreated": "2019-05-25T22:45:24Z",
    "certificateId": "dc73c46d2d70629ed4ce92d41a98e2cccb2836beb1ab04788f3c7a7bc0629cf2",
    "fluserspk": "a1333b61-87cb-4156-c018-b0ea304d879f",
    "certificatePem": "-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIUSMb6t+9DeEzaSt7tTZoCxCa+EzcwDQYJKoZIhvcNAQEL\nBQAwTTFLMEkGA1UECwxCQW1hem9uIFdlYiBTZXJ2aWNlcyBPPUFtYXpvbi5jb20g\nSW5jLiBMPVNlYXR0bGUgU1Q9V2FzaGluZ3RvbiBDPVVTMB4XDTE5MDUyMzAwNTc0\nM1oXDTQ5MTIzMTIzNTk1OVowHjEcMBoGA1UEAwwTQVdTIElvVCBDZXJ0aWZpY2F0\nZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANIvSuy6I8h42GHxM8M6\nXoIV8ZsYQyoIpAmfd1RFs+EIbLqzGYXzuhzHbJuXBFraivLpnzapY04g44ZMIz34A\nmpwaEDpie8QJvfzm3WO/OfFqyT7+Lgn9/KRNxGzBlrPu8LWH1kkd5jsXvNfhumW7\nhmAAzwPvYxqDKNx84mUVhQHv8CAg+co0yTLDwkqJ1zM6zogyRiY02R5/oS3h\n-----END CERTIFICATE-----\n",
    "keyPairPrivate": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEA0i9K7LojyHjYYfEzwzpeghXxmxhDKgikCZ93VEWxiojn5EyI\nieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZo6XMaEfFAqmrZJ6esH0U1w55PLZg\nu+/HRaZsyHloHDvldc/CrQMBhG3iNb3l4AJI6EmDAfY13FPE0kWERHYp96YwOkEL\n6CI0IXb6Av8D/eukuC/FSQrrbn34NDCIlm4pQ8ZMRg\nqDDG6tigW4Wmz/RMBtgcG7q48zc5fGYA9hREs6zmzNFzgVOJNblRmZTZ7fjtGHQu\nTAqlAoGAUsxThpkmsP6uD6RFBaiQV7DHwlagy+osXjSETFdnKs+pn5sT/t0iaqAj\nOWDij+hSu6z6uw/PP4PTAIzacYXLe/LHuAEZa2P4Rbl66qxHr51dY/h+SG48dkWR\ncZ1EMJ0I7/9MwH2gNyvC0RApwMcaCRK82My1mCGjo+t+Wd1C4PE=\n-----END RSA PRIVATE KEY-----\n",
    "keyPairPublic": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0i9K7LojyHjYYfEzwzpe\nghXxmxhDKgikCZ93VEWxiojn5EyIieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZ\no6XMaEfFAqmrZJ6esH0U1w55PLZgmZlXpjqhPgj3w1WzuNipCVHrt9m08OuCvTZ01ZhkYrZ9\nfxj47jz27uFM/aa60Fz/B00Y0yJHZijoYJWgu/ejgO8YxEh6yJ1T+1NvGOHdchn/\nRwIDAQAB\n-----END PUBLIC KEY-----\n",
    "testStatus": "CREATED",
    "thingDist": "Python",
    "thingName": "a1333b61-palooza",
    "thingType": "RasberryPi"
  }
}

Delete a thing record by its id.

DELETE /things/{thingId}

Will delete a specific thing record by its primary key and orchestrate the removal of all related infrastructure and messages.

thingId: string
in path

(no description)

200 OK

Successful response.

404 Not Found

Not Found. The thing was not found.

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "string",
  "code": "integer",
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": "object"
}

The REST call to get messages for a specific thing.

GET /things/{thingId}/messages

Will retreive the messages for a thing as an rest response.

thingId: string
in path

(no description)

startts: integer
in query

start of the query UTC epoc seconds

endts: integer
in query

end of the query UTC epoc seconds

messagetype: string
in query

the type of message, ingress and egress supported

Successful response.

404 Not Found

Not Found. The thing was not found.

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": [
    {
      "flmessagespk": "02eff3d7-6e3f-4d91-aeb9-20cacd0d2a46",
      "fltimestamp": 1558824554,
      "datecreated": "2019-05-25T22:45:24Z",
      "flthingspk": "48338542-9866-4046-9ecc-ad74e1807cc5",
      "fluserspk": "1cd13b12-6d91-4e8e-9156-60e451a3c975",
      "messagetype": "ingress"
    }
  ]
}

The REST call to delete messages for a specific thing.

DELETE /things/{thingId}/messages

Will delete the messages for a thing with the provided query model.

thingId: string
in path

(no description)

startts: integer
in query

start of the query UTC epoc seconds

endts: integer
in query

end of the query UTC epoc seconds

messagetype: string
in query

the type of message, ingress and egress supported

200 OK

Successful delete.

404 Not Found

Not Found. The thing was not found.

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "string",
  "code": "integer",
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": "object"
}

Get messages for a thing as a zip archive.

GET /things/{thingId}/archive

Will get the messages for a thing with the provided query model as a zip archive.

thingId: string
in path

(no description)

startts: integer
in query

start of the query UTC epoc seconds

endts: integer
in query

end of the query UTC epoc seconds

messagetype: string
in query

the type of message, ingress and egress supported

200 OK

Successful response. Base64 encoded file.

type
string (byte)
404 Not Found

Not Found. The thing was not found.

Response Content-Types: application/zip
Response Example (200 OK)
"string (byte)"

Intended for a thing to send a message to be saved.

POST /things/{thingId}/collect

Will accept a message from a thing using asymetric auth for the thing.

thingId: string
in path

(no description)

Successful response.

404 Not Found

Not Found. The thing was not found.

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "message": "Message Collected",
    "flthingspk": "48338542-9866-4046-9ecc-ad74e1807cc5",
    "flmessagespk": "8f913dc2-3865-46fb-b078-059ff6974bcb"
  }
}

GET /things/{thingId}/dist

thingId: string
in path

(no description)

200 OK

Successful response. Base64 encoded file.

type
string (byte)
404 Not Found

Not Found. The thing was not found.

Response Content-Types: application/zip
Response Example (200 OK)
"string (byte)"

POST /things/{thingId}/publish

The message body being sent to the thing, can be JSON or free form text.

thingId: string
in path

(no description)

Request Content-Types: application/json
Request Example
"FOO|BAR|This is a message."
200 OK

Successful response.

404 Not Found

Not Found. The thing was not found.

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "string",
  "code": "integer",
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": "object"
}

auth

GET /token

200 OK

Successful response.

Response Content-Types: application/zip
Response Example (200 OK)
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

users

GET /users/{sub}

sub: string
in path

(no description)

Successful response.

404 Not Found

Not Found. The thing was not found.

Response Content-Types: application/json
Response Example (200 OK)
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "fluserspk": "02eff3d7-6e3f-4d91-aeb9-20cacd0d2a46",
    "fltimestamp": 1558824554,
    "datecreated": "2019-05-25T22:45:24Z",
    "emailverified": true,
    "username": "roo@foobar.com"
  }
}

Schema Definitions

RestResponse: object

status: string
code: integer
messages: KeyValue
KeyValue
result: object
Example
{
  "status": "string",
  "code": "integer",
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": "object"
}

KeyValue: object

key: string
value: string
Example
{
  "key": "message",
  "value": "This is something helpful."
}

RestResponseSubscriptions: object

status: string
code: integer
messages: KeyValue
KeyValue
result: Subscription
Subscription
Example
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": [
    {
      "flsubscriptionspk": "46c8af5f-308b-4ab6-a938-c4cc3209c73c",
      "fltimestamp": 1558824554,
      "datecreated": "2019-05-25T22:45:24Z",
      "common_name": "SAPPHIRE",
      "startts": 1571094037,
      "endts": 1571092033,
      "flstatus": "scheduled",
      "fluserspk": "ecd13b11-6d91-4e8e-9156-60e451a3c975",
      "product_id": "prod_FGB5V9qSzP6f3R",
      "plan_id": "plan_FGBe9MHTfmOxiG",
      "plan_name": "Flashlex Sapphire 30"
    }
  ]
}

RestResponseSubscription: object

status: string
code: integer
messages: KeyValue
KeyValue
result: Subscription
Example
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "flsubscriptionspk": "46c8af5f-308b-4ab6-a938-c4cc3209c73c",
    "fltimestamp": 1558824554,
    "datecreated": "2019-05-25T22:45:24Z",
    "common_name": "SAPPHIRE",
    "startts": 1571094037,
    "endts": 1571092033,
    "flstatus": "scheduled",
    "fluserspk": "ecd13b11-6d91-4e8e-9156-60e451a3c975",
    "product_id": "prod_FGB5V9qSzP6f3R",
    "plan_id": "plan_FGBe9MHTfmOxiG",
    "plan_name": "Flashlex Sapphire 30"
  }
}

RestResponseSubscriptionPolicy: object

status: string
code: integer
messages: KeyValue
KeyValue
result: SubscriptionPolicy
Example
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "subscription": {
      "flsubscriptionspk": "46c8af5f-308b-4ab6-a938-c4cc3209c73c",
      "fltimestamp": 1558824554,
      "datecreated": "2019-05-25T22:45:24Z",
      "common_name": "SAPPHIRE",
      "startts": 1571094037,
      "endts": 1571092033,
      "flstatus": "scheduled",
      "fluserspk": "ecd13b11-6d91-4e8e-9156-60e451a3c975",
      "product_id": "prod_FGB5V9qSzP6f3R",
      "plan_id": "plan_FGBe9MHTfmOxiG",
      "plan_name": "Flashlex Sapphire 30"
    },
    "policy": {
      "Statement": [
        {
          "Action": "flashex:createThing",
          "Effect": "Deny",
          "Resource": "ecd13b11-6d91-4e8e-9156-60e451a3c975:thing:*",
          "AllowedCount": 1,
          "ActualCount": 3
        }
      ]
    }
  }
}

SubscriptionPolicy: object

subscription: Subscription
policy: Policy
Example
{
  "subscription": {
    "flsubscriptionspk": "46c8af5f-308b-4ab6-a938-c4cc3209c73c",
    "fltimestamp": 1558824554,
    "datecreated": "2019-05-25T22:45:24Z",
    "common_name": "SAPPHIRE",
    "startts": 1571094037,
    "endts": 1571092033,
    "flstatus": "scheduled",
    "fluserspk": "ecd13b11-6d91-4e8e-9156-60e451a3c975",
    "product_id": "prod_FGB5V9qSzP6f3R",
    "plan_id": "plan_FGBe9MHTfmOxiG",
    "plan_name": "Flashlex Sapphire 30"
  },
  "policy": {
    "Statement": [
      {
        "Action": "flashex:createThing",
        "Effect": "Deny",
        "Resource": "ecd13b11-6d91-4e8e-9156-60e451a3c975:thing:*",
        "AllowedCount": 1,
        "ActualCount": 3
      }
    ]
  }
}

Subscription: object

flsubscriptionspk: string
fltimestamp: integer
datecreated: string
common_name: string
startts: integer
endts: integer
flstatus: string
fluserspk: string
product_id: string
plan_id: string
plan_name: string
Example
{
  "flsubscriptionspk": "46c8af5f-308b-4ab6-a938-c4cc3209c73c",
  "fltimestamp": 1558824554,
  "datecreated": "2019-05-25T22:45:24Z",
  "common_name": "SAPPHIRE",
  "startts": 1571094037,
  "endts": 1571092033,
  "flstatus": "scheduled",
  "fluserspk": "ecd13b11-6d91-4e8e-9156-60e451a3c975",
  "product_id": "prod_FGB5V9qSzP6f3R",
  "plan_id": "plan_FGBe9MHTfmOxiG",
  "plan_name": "Flashlex Sapphire 30"
}

RestResponseThing: object

status: string
code: integer
messages: KeyValue
KeyValue
result: Thing
Example
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "flthingspk": "8fe28087-5cc9-4c2d-a04d-1cf5fcff8f3e",
    "fltimestamp": 1558824554,
    "datecreated": "2019-05-25T22:45:24Z",
    "certificateId": "dc73c46d2d70629ed4ce92d41a98e2cccb2836beb1ab04788f3c7a7bc0629cf2",
    "fluserspk": "a1333b61-87cb-4156-c018-b0ea304d879f",
    "certificatePem": "-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIUSMb6t+9DeEzaSt7tTZoCxCa+EzcwDQYJKoZIhvcNAQEL\nBQAwTTFLMEkGA1UECwxCQW1hem9uIFdlYiBTZXJ2aWNlcyBPPUFtYXpvbi5jb20g\nSW5jLiBMPVNlYXR0bGUgU1Q9V2FzaGluZ3RvbiBDPVVTMB4XDTE5MDUyMzAwNTc0\nM1oXDTQ5MTIzMTIzNTk1OVowHjEcMBoGA1UEAwwTQVdTIElvVCBDZXJ0aWZpY2F0\nZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANIvSuy6I8h42GHxM8M6\nXoIV8ZsYQyoIpAmfd1RFs+EIbLqzGYXzuhzHbJuXBFraivLpnzapY04g44ZMIz34A\nmpwaEDpie8QJvfzm3WO/OfFqyT7+Lgn9/KRNxGzBlrPu8LWH1kkd5jsXvNfhumW7\nhmAAzwPvYxqDKNx84mUVhQHv8CAg+co0yTLDwkqJ1zM6zogyRiY02R5/oS3h\n-----END CERTIFICATE-----\n",
    "keyPairPrivate": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEA0i9K7LojyHjYYfEzwzpeghXxmxhDKgikCZ93VEWxiojn5EyI\nieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZo6XMaEfFAqmrZJ6esH0U1w55PLZg\nu+/HRaZsyHloHDvldc/CrQMBhG3iNb3l4AJI6EmDAfY13FPE0kWERHYp96YwOkEL\n6CI0IXb6Av8D/eukuC/FSQrrbn34NDCIlm4pQ8ZMRg\nqDDG6tigW4Wmz/RMBtgcG7q48zc5fGYA9hREs6zmzNFzgVOJNblRmZTZ7fjtGHQu\nTAqlAoGAUsxThpkmsP6uD6RFBaiQV7DHwlagy+osXjSETFdnKs+pn5sT/t0iaqAj\nOWDij+hSu6z6uw/PP4PTAIzacYXLe/LHuAEZa2P4Rbl66qxHr51dY/h+SG48dkWR\ncZ1EMJ0I7/9MwH2gNyvC0RApwMcaCRK82My1mCGjo+t+Wd1C4PE=\n-----END RSA PRIVATE KEY-----\n",
    "keyPairPublic": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0i9K7LojyHjYYfEzwzpe\nghXxmxhDKgikCZ93VEWxiojn5EyIieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZ\no6XMaEfFAqmrZJ6esH0U1w55PLZgmZlXpjqhPgj3w1WzuNipCVHrt9m08OuCvTZ01ZhkYrZ9\nfxj47jz27uFM/aa60Fz/B00Y0yJHZijoYJWgu/ejgO8YxEh6yJ1T+1NvGOHdchn/\nRwIDAQAB\n-----END PUBLIC KEY-----\n",
    "testStatus": "CREATED",
    "thingDist": "Python",
    "thingName": "a1333b61-palooza",
    "thingType": "RasberryPi"
  }
}

RestResponseThings: object

status: string
code: integer
messages: KeyValue
KeyValue
result: Thing
Thing
Example
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": [
    {
      "flthingspk": "8fe28087-5cc9-4c2d-a04d-1cf5fcff8f3e",
      "fltimestamp": 1558824554,
      "datecreated": "2019-05-25T22:45:24Z",
      "certificateId": "dc73c46d2d70629ed4ce92d41a98e2cccb2836beb1ab04788f3c7a7bc0629cf2",
      "fluserspk": "a1333b61-87cb-4156-c018-b0ea304d879f",
      "certificatePem": "-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIUSMb6t+9DeEzaSt7tTZoCxCa+EzcwDQYJKoZIhvcNAQEL\nBQAwTTFLMEkGA1UECwxCQW1hem9uIFdlYiBTZXJ2aWNlcyBPPUFtYXpvbi5jb20g\nSW5jLiBMPVNlYXR0bGUgU1Q9V2FzaGluZ3RvbiBDPVVTMB4XDTE5MDUyMzAwNTc0\nM1oXDTQ5MTIzMTIzNTk1OVowHjEcMBoGA1UEAwwTQVdTIElvVCBDZXJ0aWZpY2F0\nZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANIvSuy6I8h42GHxM8M6\nXoIV8ZsYQyoIpAmfd1RFs+EIbLqzGYXzuhzHbJuXBFraivLpnzapY04g44ZMIz34A\nmpwaEDpie8QJvfzm3WO/OfFqyT7+Lgn9/KRNxGzBlrPu8LWH1kkd5jsXvNfhumW7\nhmAAzwPvYxqDKNx84mUVhQHv8CAg+co0yTLDwkqJ1zM6zogyRiY02R5/oS3h\n-----END CERTIFICATE-----\n",
      "keyPairPrivate": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEA0i9K7LojyHjYYfEzwzpeghXxmxhDKgikCZ93VEWxiojn5EyI\nieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZo6XMaEfFAqmrZJ6esH0U1w55PLZg\nu+/HRaZsyHloHDvldc/CrQMBhG3iNb3l4AJI6EmDAfY13FPE0kWERHYp96YwOkEL\n6CI0IXb6Av8D/eukuC/FSQrrbn34NDCIlm4pQ8ZMRg\nqDDG6tigW4Wmz/RMBtgcG7q48zc5fGYA9hREs6zmzNFzgVOJNblRmZTZ7fjtGHQu\nTAqlAoGAUsxThpkmsP6uD6RFBaiQV7DHwlagy+osXjSETFdnKs+pn5sT/t0iaqAj\nOWDij+hSu6z6uw/PP4PTAIzacYXLe/LHuAEZa2P4Rbl66qxHr51dY/h+SG48dkWR\ncZ1EMJ0I7/9MwH2gNyvC0RApwMcaCRK82My1mCGjo+t+Wd1C4PE=\n-----END RSA PRIVATE KEY-----\n",
      "keyPairPublic": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0i9K7LojyHjYYfEzwzpe\nghXxmxhDKgikCZ93VEWxiojn5EyIieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZ\no6XMaEfFAqmrZJ6esH0U1w55PLZgmZlXpjqhPgj3w1WzuNipCVHrt9m08OuCvTZ01ZhkYrZ9\nfxj47jz27uFM/aa60Fz/B00Y0yJHZijoYJWgu/ejgO8YxEh6yJ1T+1NvGOHdchn/\nRwIDAQAB\n-----END PUBLIC KEY-----\n",
      "testStatus": "CREATED",
      "thingDist": "Python",
      "thingName": "a1333b61-palooza",
      "thingType": "RasberryPi"
    }
  ]
}

CreateThingRequest: object

flthingspk: string
Example
{
  "flthingspk": "8fe28087-5cc9-4c2d-a04d-1cf5fcff8f3e"
}

Thing: object

flthingspk: string
fltimestamp: integer
datecreated: string
certificateId: string
fluserspk: string
certificatePem: string
keyPairPrivate: string
keyPairPublic: string
testStatus: string
thingDist: string
thingName: string
thingType: string
Example
{
  "flthingspk": "8fe28087-5cc9-4c2d-a04d-1cf5fcff8f3e",
  "fltimestamp": 1558824554,
  "datecreated": "2019-05-25T22:45:24Z",
  "certificateId": "dc73c46d2d70629ed4ce92d41a98e2cccb2836beb1ab04788f3c7a7bc0629cf2",
  "fluserspk": "a1333b61-87cb-4156-c018-b0ea304d879f",
  "certificatePem": "-----BEGIN CERTIFICATE-----\nMIIDWTCCAkGgAwIBAgIUSMb6t+9DeEzaSt7tTZoCxCa+EzcwDQYJKoZIhvcNAQEL\nBQAwTTFLMEkGA1UECwxCQW1hem9uIFdlYiBTZXJ2aWNlcyBPPUFtYXpvbi5jb20g\nSW5jLiBMPVNlYXR0bGUgU1Q9V2FzaGluZ3RvbiBDPVVTMB4XDTE5MDUyMzAwNTc0\nM1oXDTQ5MTIzMTIzNTk1OVowHjEcMBoGA1UEAwwTQVdTIElvVCBDZXJ0aWZpY2F0\nZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANIvSuy6I8h42GHxM8M6\nXoIV8ZsYQyoIpAmfd1RFs+EIbLqzGYXzuhzHbJuXBFraivLpnzapY04g44ZMIz34A\nmpwaEDpie8QJvfzm3WO/OfFqyT7+Lgn9/KRNxGzBlrPu8LWH1kkd5jsXvNfhumW7\nhmAAzwPvYxqDKNx84mUVhQHv8CAg+co0yTLDwkqJ1zM6zogyRiY02R5/oS3h\n-----END CERTIFICATE-----\n",
  "keyPairPrivate": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEA0i9K7LojyHjYYfEzwzpeghXxmxhDKgikCZ93VEWxiojn5EyI\nieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZo6XMaEfFAqmrZJ6esH0U1w55PLZg\nu+/HRaZsyHloHDvldc/CrQMBhG3iNb3l4AJI6EmDAfY13FPE0kWERHYp96YwOkEL\n6CI0IXb6Av8D/eukuC/FSQrrbn34NDCIlm4pQ8ZMRg\nqDDG6tigW4Wmz/RMBtgcG7q48zc5fGYA9hREs6zmzNFzgVOJNblRmZTZ7fjtGHQu\nTAqlAoGAUsxThpkmsP6uD6RFBaiQV7DHwlagy+osXjSETFdnKs+pn5sT/t0iaqAj\nOWDij+hSu6z6uw/PP4PTAIzacYXLe/LHuAEZa2P4Rbl66qxHr51dY/h+SG48dkWR\ncZ1EMJ0I7/9MwH2gNyvC0RApwMcaCRK82My1mCGjo+t+Wd1C4PE=\n-----END RSA PRIVATE KEY-----\n",
  "keyPairPublic": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0i9K7LojyHjYYfEzwzpe\nghXxmxhDKgikCZ93VEWxiojn5EyIieINFWJHNDHuOOlzN9uJCrMMVrQDnzegNdqZ\no6XMaEfFAqmrZJ6esH0U1w55PLZgmZlXpjqhPgj3w1WzuNipCVHrt9m08OuCvTZ01ZhkYrZ9\nfxj47jz27uFM/aa60Fz/B00Y0yJHZijoYJWgu/ejgO8YxEh6yJ1T+1NvGOHdchn/\nRwIDAQAB\n-----END PUBLIC KEY-----\n",
  "testStatus": "CREATED",
  "thingDist": "Python",
  "thingName": "a1333b61-palooza",
  "thingType": "RasberryPi"
}

RestResponseMessages: object

status: string
code: integer
messages: KeyValue
KeyValue
result: Message
Message
Example
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": [
    {
      "flmessagespk": "02eff3d7-6e3f-4d91-aeb9-20cacd0d2a46",
      "fltimestamp": 1558824554,
      "datecreated": "2019-05-25T22:45:24Z",
      "flthingspk": "48338542-9866-4046-9ecc-ad74e1807cc5",
      "fluserspk": "1cd13b12-6d91-4e8e-9156-60e451a3c975",
      "messagetype": "ingress"
    }
  ]
}

RestResponseMessage: object

status: string
code: integer
messages: KeyValue
KeyValue
result: Message
Example
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "flmessagespk": "02eff3d7-6e3f-4d91-aeb9-20cacd0d2a46",
    "fltimestamp": 1558824554,
    "datecreated": "2019-05-25T22:45:24Z",
    "flthingspk": "48338542-9866-4046-9ecc-ad74e1807cc5",
    "fluserspk": "1cd13b12-6d91-4e8e-9156-60e451a3c975",
    "messagetype": "ingress"
  }
}

RestResponseMessageCollection: object

status: string
code: integer
messages: KeyValue
KeyValue
result: object
message: string
flthingspk: string
flmessagespk: string
Example
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "message": "Message Collected",
    "flthingspk": "48338542-9866-4046-9ecc-ad74e1807cc5",
    "flmessagespk": "8f913dc2-3865-46fb-b078-059ff6974bcb"
  }
}

Message: object

flmessagespk: string
fltimestamp: integer
datecreated: string
flthingspk: string
fluserspk: string
messagetype: string
Example
{
  "flmessagespk": "02eff3d7-6e3f-4d91-aeb9-20cacd0d2a46",
  "fltimestamp": 1558824554,
  "datecreated": "2019-05-25T22:45:24Z",
  "flthingspk": "48338542-9866-4046-9ecc-ad74e1807cc5",
  "fluserspk": "1cd13b12-6d91-4e8e-9156-60e451a3c975",
  "messagetype": "ingress"
}

FlashLexLogin: object

accessToken: string
Example
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

RestResponseUser: object

status: string
code: integer
messages: KeyValue
KeyValue
result: User
Example
{
  "status": "OK",
  "code": 200,
  "messages": [
    {
      "key": "message",
      "value": "This is something helpful."
    }
  ],
  "result": {
    "fluserspk": "02eff3d7-6e3f-4d91-aeb9-20cacd0d2a46",
    "fltimestamp": 1558824554,
    "datecreated": "2019-05-25T22:45:24Z",
    "emailverified": true,
    "username": "roo@foobar.com"
  }
}

User: object

fluserspk: string
fltimestamp: integer
datecreated: string
emailverified: boolean
username: string
Example
{
  "fluserspk": "02eff3d7-6e3f-4d91-aeb9-20cacd0d2a46",
  "fltimestamp": 1558824554,
  "datecreated": "2019-05-25T22:45:24Z",
  "emailverified": true,
  "username": "roo@foobar.com"
}

Policy: object

Example
{
  "Statement": [
    {
      "Action": "flashex:createThing",
      "Effect": "Deny",
      "Resource": "ecd13b11-6d91-4e8e-9156-60e451a3c975:thing:*",
      "AllowedCount": 1,
      "ActualCount": 3
    }
  ]
}

PolicyStatement: object

Action: string
Effect: string
Resource: string
AllowedCount: integer
ActualCount: integer
Example
{
  "Action": "flashex:createThing",
  "Effect": "Deny",
  "Resource": "ecd13b11-6d91-4e8e-9156-60e451a3c975:thing:*",
  "AllowedCount": 1,
  "ActualCount": 3
}