Skip to content

API Subscription Subscriber

Neil O'Keeffe edited this page Dec 14, 2021 · 1 revision

Home / API / Channel

Create

Creates a subscription to PxStat via Firebase. This is only open to users that are not already authenticated either via Firebase, Active Directory or with a Local account. However the user must have already been created in Firebase - this normally happens at the front end of the PxStat application.

Authentication: Firebase

Privilege : None

Method: PxStat.Subscription.Subscriber_API.Create

Parameters:

Name Type Default Description
SbrPreference String null Subscriber preference - not currently used
LngIsoCode String Default language for installation Langugage ISO 639-1 Code
Uid String required Firebase identifier. This will be read from Firebase during login
AccessToken String required This will be issued by Firebase during login and has a lifetime of one hour

Return: success or error

Delete

Deletes a Firebase Subscriber. An existing Subscriber can only delete themselves. A Power User can delete any Subscriber

Authentication: Firebase, Windows

Privilege : None ,Power User to delete any other subscriber

Method: PxStat.Subscription.Subscriber_API.Delete

Parameters:

Name Type Default Description
Uid String required Firebase identifier. This will be read from Firebase during login
AccessToken String required for self deletion This will be issued by Firebase during login and has a lifetime of one hour

Return: success or error

Read

Reads one or all Subscribers. If a Subscriber Uid is supplied then that Subscriber is returned, otherwise all subscribers are returned

Authentication: Windows

Privilege : Power User

Method: PxStat.Subscription.Subscriber_API.Read

Parameters:

Name Type Default Description
Uid String required Firebase identifier

Return: Array [ Object ]

Name Type Description
SbrUserId String Firebase identifier
SbrPreference String Subscriber preference - not currently used
CcnEmail String Email address as supplied by Firebase
LngIsoCode String Langugage ISO 639-1 Code
SbrKey String Firebase identifier used to signal registration when using machine-based calls
DisplayName String User name as supplied by Firebase

ReadCurrent

Allows a Subscriber to read their own details

Authentication: Firebase

Privilege : None

Method: PxStat.Subscription.Subscriber_API.ReadCurrent

Parameters:

Name Type Default Description
Uid String required Firebase identifier. This will be read from Firebase during login
AccessToken String required for self deletion This will be issued by Firebase during login and has a lifetime of one hour

Return: Array [ Object ]

Name Type Description
SbrUserId String Firebase identifier
SbrPreference String Subscriber preference - not currently used
CcnEmail String Email address as supplied by Firebase
LngIsoCode String Langugage ISO 639-1 Code
SbrKey String Firebase identifier identifier used to signal registration when using machine-based calls
DisplayName String User name as supplied by Firebase

Update

Allows a Subscriber to update either their SbrPrefernece (not currently used) or their preferred language

Authentication: Firebase

Privilege : None

Method: PxStat.Subscription.Subscriber_API.Update

Parameters:

Name Type Default Description
Uid String required Firebase identifier
AccessToken String required for self deletion This will be issued by Firebase during login and has a lifetime of one hour
SbrPreference String null Subscriber preference - not currently used
LngIsoCode String Default language for installation Langugage ISO 639-1 Code

Return: Array [ Object ]

UpdateKey

Allows a Subscriber to generate a new Subscriber Key (this is the Firebase identifier used to signal registration when using machine-based calls)

Authentication: None

Privilege : None

Method: PxStat.Subscription.Subscriber_API.UpdateKey

Parameters:

Name Type Default Description
Uid String required Firebase identifier
AccessToken String required for self deletion This will be issued by Firebase during login and has a lifetime of one hour

Return: string SbrKey

Clone this wiki locally