Skip to main content

ProjectApiClient

com.notificationhub.sdk.client.ProjectApiClient — accessed via client.projects().

Methods

create

ProjectCredentialsResponse create(String projectName) throws NotificationHubException

Creates a new project and returns its initial credentials, including the one-time rawSecret.

get

ProjectResponse get(UUID projectId) throws NotificationHubException

list

PaginatedProjects list(int page, int size) throws NotificationHubException

updateStatus

ProjectResponse updateStatus(UUID projectId, ProjectStatus status) throws NotificationHubException

updateName

ProjectResponse updateName(UUID projectId, String newName) throws NotificationHubException

delete

void delete(UUID projectId) throws NotificationHubException

rotateSecret

ProjectCredentialsResponse rotateSecret(UUID projectId) throws NotificationHubException

Issues a new secret for the project and invalidates the previous one.

rotateApiKey

Map<String, String> rotateApiKey(UUID projectId) throws NotificationHubException

Types

ProjectResponse (record)

FieldType
idUUID
nameString
statusProjectStatus
createdAtInstant

ProjectCredentialsResponse (record)

FieldType
idUUID
nameString
apiKeyString
rawSecretString
messageString

PaginatedProjects (record)

FieldType
contentList<ProjectResponse>
totalPagesint
totalElementslong

ProjectStatus (enum)

ACTIVE, SUSPENDED, DISABLED