Devices

Catalog


POST Authorize Add device

Request path:

https://staging.server.kahla.app/Devices/AddDevice

Request content type:

application/x-www-form-urlencoded

Form content example:

Name=yourName&PushEndpoint=yourPushEndpoint&PushP256DH=yourPushP256DH&PushAuth=yourPushAuth 

Request form:

Name Required Type
Name Required Text
PushEndpoint Required Text
PushP256DH Required Text
PushAuth Required Text

Possible Response:

{
  "value": 0,
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

POST Authorize Update device

Request path:

https://staging.server.kahla.app/Devices/UpdateDevice

Request content type:

application/x-www-form-urlencoded

Form content example:

DeviceId=0&Name=yourName&PushEndpoint=yourPushEndpoint&PushP256DH=yourPushP256DH&PushAuth=yourPushAuth 

Request form:

Name Required Type
DeviceId Required Number
Name Required Text
PushEndpoint Required Text
PushP256DH Required Text
PushAuth Required Text

Possible Response:

{
  "value": {
    "id": 0,
    "name": "an example string.",
    "ipAddress": "an example string.",
    "userId": "an example string.",
    "addTime": "2019-07-18T21:00:41.3927346Z"
  },
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Authorize My devices

Request path:

https://staging.server.kahla.app/Devices/MyDevicesTry

Request example:

https://staging.server.kahla.app/Devices/MyDevices

Possible Response:

{
  "items": [
    {
      "id": 0,
      "name": "an example string.",
      "ipAddress": "an example string.",
      "userId": "an example string.",
      "addTime": "2019-07-18T21:00:41.3933685Z"
    }
  ],
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

POST Authorize Push test message

Request path:

https://staging.server.kahla.app/Devices/PushTestMessage

Request content type:

application/x-www-form-urlencoded

Form content example:

 

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}