POST restapi/personal/person/push/v1

Set push notifications in itslearning (on or off) for a device. This method will also register the device for push notifications with the push provider (if needed).

Request Information

URI Parameters

None.

Body Parameters

If push should be enabled or not and the type of push provider for the device - with an Id (Apple or Google supported)

Itslearning.RestApi.Entities.PushSetting
NameDescriptionTypeAdditional information
DeviceId

Current (or new) unique DeviceId for the application on the phone or the tablet. This ID must be recognized by Google Cloud Messaging or Apple Push Notification Service. When PushProvider=Apple: the same as DeviceToken When PushProvider=Google: the same as RegistrationId

string

None.

OldDeviceId

Old DeviceId for the application on the phone or the tablet. When the application receives a new DeviceId, the application should also provide the old one here, so that itslearning can replace the old one. This is to make sure that we use the correct deviceId as soon as possible, and to prevent itslearning from sending multiple push notification messages with the same content.

string

None.

PushProvider

Type of push provider (e.g. "Google" or "Apple")

string

None.

IsEnabled

If push notifications should be enabled or not

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "DeviceId": "sample string 1",
  "OldDeviceId": "sample string 2",
  "PushProvider": "sample string 3",
  "IsEnabled": true
}

application/xml, text/xml

Sample:
<PushSetting xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Itslearning.RestApi.Entities">
  <DeviceId>sample string 1</DeviceId>
  <IsEnabled>true</IsEnabled>
  <OldDeviceId>sample string 2</OldDeviceId>
  <PushProvider>sample string 3</PushProvider>
</PushSetting>

application/x-www-form-urlencoded

Sample:
No sample available

Response Information

Resource Description

200 ok if operation was successful

System.Net.Http.HttpResponseMessage
NameDescriptionTypeAdditional information
Version

System.Version

None.

Content

System.Net.Http.HttpContent

None.

StatusCode

System.Net.HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

System.Net.Http.HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.