...
Many programming environments support consuming WSDL to create a “proxy class”. This process greatly simplified implementation of the API because the proxy class allows easy single line interactions with the API, rather than needing to manually compose XML requests, and manually parse XML responses. The WSDL metadata can be accessed by appending “?WSDL” to the Service Definition URL:
Code Block |
---|
https://clientname.apparmor.com/API/Subscribers/Subscribers.asmx?WSDL |
General User Flow
Generally speaking, the API is used to create a “user profile” interface that allows users to update their profile, and adjust subscriptions. Developers will typically implement the API following the following type of flow:
User signs in
User profile is retrieved using GetUser(), GetUserByEmail(), or GetUserBySSOID()
The user profile is formatted and displayed on-screen
Changes to the user profile fields are created by calling the UpdateField() function
Changes to subscriptions are created using CreateSubscription() or DeleteSubscription()
Once changes are complete, the user profile is retrieved again using GetUser(), GetUserByEmail(), or GetUserBySSOID() and displayed on-screen.
Our API was designed with primitive values as inputs and outputs to simplify implementation. The only exception is the User object returned by GetUser(), GetUserByEmail(), or GetUserBySSOID(). This was done by design to limit the “chatty-ness” of the API requests, and avoid the developer from having to construct complex objects as inputs.
Dashboard Configuration
Before implementing the API, we strongly encourage completing the Dashboard Configuration of your system. Specifically, it is very important that:
...
GetUser() - Requires an AppArmor “UserID” input parameter
GetUserByEmail() - Requires the user’s login email address as input parameter
GetUserBySSOID() - Requires the user’s single-sign-on (SSO) identifier as input parameter
GetUserByField() - Allows locating a user by a custom field value
The AppArmor “UserID” is a hashed alphanumeric identifier that is included as part of the User object that is returned from a successful request to the above functions. Interactions with the other API functions will require the “UserID” as a parameter, so be sure to keep this value once retrieved.
...
The SendSMS() and SendEmail() functions allow validation that an email address or phone number is actually owned by the user. These functions can be used to send a verification code to the user. The implementation of the verification code functionality is left up to the developer using the API.
...