Pyramid Analytics REST API documentation
PyramidAnalyticsLib is a service that:
- Configures URL, user name and password to a Pyramid 2020 server.
- Authenticates against the server.
- Adds additional authentication methods for ByToken and Embed use cases Pyramid REST Auth APIs
- Maintains Tenants, User Profiles, Roles and Tasks/Schedules
PyramidAnalyticsUnitTest does the obvious and shows examples of using PyramidAnalyticsLib.
PyramidAnayticsServer p = new PyramidAnayticsServer(credentials.Url, credentials.User, credentials.Password, true);
Tokens used for embedding need an Internet domain where they are embedding from. When embedding in a web page, this is "document.domain" in JavaScript.
string userEmbeddingToken = p.authenticateEmbed(embedDomain);
User ids have to pre-exist in Pyramid in order to login as those users.
string userLoginByToken = p.authenticateUserByToken(loginAsUser);
string userEmbedLoginByToken = p.authenticateUserEmbedByToken(loginAsUser, embedDomain);
Tenants, security and User creation workflow via REST
The script in the above page shows the creation sequence flow. Also look at PyramidAnalyticsUnitTest.testTenantsAndRoles