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)
| Field | Type |
|---|---|
id | UUID |
name | String |
status | ProjectStatus |
createdAt | Instant |
ProjectCredentialsResponse (record)
| Field | Type |
|---|---|
id | UUID |
name | String |
apiKey | String |
rawSecret | String |
message | String |
PaginatedProjects (record)
| Field | Type |
|---|---|
content | List<ProjectResponse> |
totalPages | int |
totalElements | long |
ProjectStatus (enum)
ACTIVE, SUSPENDED, DISABLED