Skip to main content

Platform resource

warning

All of the platform functions are only available to users with Sentry Interactive issued auth tokens

Create application

val application = PlatformOperations.CreateApplication.Builder()
.setName("APPLICATION_NAME")
.setCompanyName("COMPANY_NAME")
.setMailingAddress("COMPANY@MAIL.COM")
.build()
// Returns a UUID
val response = sdk.platform().createApplication(application)

List applications

// Returns a List<ApplicationResponse>
val response = sdk.platform().listApplications()

Get application

// Returns a ApplicationResponse
val response = sdk.platform().getApplication(APPLICATION_ID)

Update application name

// Returns Unit
sdk.platform().updateApplicationName(
applicationId = APPLICATION_ID,
name = "APPLICATION_NAME"
)

Update application company name

// Returns Unit
sdk.platform().updateApplicationCompanyName(
applicationId = APPLICATION_ID,
companyName = "APPLICATION_COMPANY_NAME"
)

Update application mailing address

// Returns Unit
sdk.platform().updateApplicationMailingAddress(
applicationId = APPLICATION_ID,
mailingAddress = "COMPANY@MAIL.COM"
)

Update application privacy policy

// Returns Unit
sdk.platform().updateApplicationPrivacyPolicy(
applicationId = APPLICATION_ID,
privacyPolicy = PRIVACY_POLICY
)

Update application support contact

// Returns Unit
sdk.platform().updateApplicationSupportContact(
applicationId = APPLICATION_ID,
supportContact = SUPPORT_CONTACT_URL
)
// Returns Unit
sdk.platform().updateApplicationAppLink(
applicationId = APPLICATION_ID,
appLink = APP_LINK
)

Update application email preferences

// Returns Unit
val emailPreferences = PlatformOperations.EmailPreferences.Builder()
.setSenderEmail("SENDER_EMAIL")
.setSenderName("SENDER_NAME")
.setPrimaryColour("PRIMARY_COLOR")
.setSecondaryColour("SECONDARY_COLOR")
.setOnlySendEssentialEmails(false)
.build()
sdk.platform().updateApplicationEmailPreferences(
applicationId = APPLICATION_ID,
emailPreferences = emailPreferences
)

Update application log url

// Returns Unit
sdk.platform().updateApplicationLogoUrl(
applicationId = APPLICATION_ID,
logoUrl = LOGO_URL
)

Delete application

danger

This operation is executed instantly and is irreversible

// Returns Unit
sdk.platform().deleteApplication(APPLICATION_ID)

Get logo upload url

// Returns a GetLogoUploadUrlResponse
val response = sdk.platform().getLogoUploadUrl(
applicationId = APPLICATION_ID,
contentType = "CONTENT_TYPE"
)

Add auth key

val key = OctetKeyPair.Builder(Curve.Ed25519, Base64URL("0ufELXg9OUjkAZUs5aGdgVbz664erh8t9cTvFBHicrc"))
.keyUse(KeyUse.SIGNATURE)
.algorithm(Algorithm.parse("EdDSA"))
.keyID("90a983fd-9077-41f9-840c-7220581017f5")
.build()
// Returns Unit
sdk.platform().addAuthKey(
applicationId = APPLICATION_ID,
key = key
)

Add auth issuer

// Returns Unit
sdk.platform().addAuthIssuer(
applicationId = APPLICATION_ID,
url = URL
)

Delete auth issuer

// Returns Unit
sdk.platform().deleteAuthIssuer(
applicationId = APPLICATION_ID,
url = URL
)

Add CORS domain

// Returns Unit
sdk.platform().addCorsDomain(
applicationId = APPLICATION_ID,
url = URL
)

Remove CORS domain

// Returns Unit
sdk.platform().removeCorsDomain(
applicationId = APPLICATION_ID,
url = URL
)

Add application owner

// Returns Unit
sdk.platform().addApplicationOwner(
applicationId = APPLICATION_ID,
userId = OWNER_ID
)

Remove application owner

// Returns Unit
sdk.platform().removeApplicationOwner(
applicationId = APPLICATION_ID,
userId = OWNER_ID
)

Get application owners details

// Returns a List<ApplicationOwnerDetailsResponse>
val response = sdk.platform().getApplicationOwnersDetails(APPLICATION_ID)