Networking & Services
This section details the GraphQL queries for retrieving information about your Blocklet Server's networking and service configurations. You can fetch data related to notifications, routing rules, domains, certificates, and webhooks. For operations that modify these configurations, see the Networking & Services Mutations documentation.
Notifications#
Queries for managing and retrieving notification data.
getNotifications#
Fetches a paginated list of notifications for a specific receiver or sender.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing query parameters. |
|
| The DID of the notification receiver. |
|
| The DID of the notification sender. |
|
| Filter notifications by their read status. |
|
| Pagination options for the result set. |
|
| The DID of the team to filter notifications for. |
|
| An array of severity levels to filter by (e.g., 'info', 'error'). |
|
| An array of component DIDs to filter by. |
Returns
Returns a ResponseGetNotifications object containing the list of notifications, pagination details, and the count of unread notifications.
Example Usage
const notifications = await client.getNotifications({
input: {
receiver: 'z1...userDid',
read: false,
paging: { page: 1, pageSize: 10 },
},
});
console.log(notifications.list);Example Response
{
"code": "ok",
"list": [
{
"id": "...",
"sender": "zNK...blockletDid",
"receiver": "z1...userDid",
"title": "New Update Available",
"description": "A new version of the blocklet is ready to be installed.",
"read": false,
"createdAt": 1678886400
}
],
"paging": {
"page": 1,
"pageSize": 10,
"total": 1
},
"unreadCount": 1
}makeAllNotificationsAsRead#
Marks all notifications for a specific receiver as read.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing the filter criteria. |
|
| The DID of the notification receiver. |
|
| The DID of the team to filter notifications for. |
Returns
Returns a ResponseMakeAllNotificationsAsRead object indicating the number of notifications affected.
Example Usage
const result = await client.makeAllNotificationsAsRead({
input: {
receiver: 'z1...userDid',
},
});
console.log(`Affected notifications: ${result.data.numAffected}`);Example Response
{
"code": "ok",
"data": {
"numAffected": 5
}
}getNotificationSendLog#
Retrieves a log of sent notifications, filterable by date range and other criteria.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing query parameters. |
|
| The DID of the team to retrieve logs for. |
|
| A tuple specifying the start and end date for the logs. |
|
| Pagination options for the result set. |
Returns
Returns a ResponseNotificationSendLog object with a paginated list of notification logs.
Example Usage
const logs = await client.getNotificationSendLog({
input: {
teamDid: 'zNK...blockletDid',
paging: { page: 1, pageSize: 20 },
},
});
console.log(logs.list);getReceivers#
Fetches a list of receivers for a specific notification.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing query parameters. |
|
| The ID of the notification. |
|
| The DID of the team. |
|
| Pagination options. |
Returns
Returns a ResponseReceivers object with a paginated list of notification receivers.
getNotificationComponents#
Retrieves a list of component DIDs that have sent notifications.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing query parameters. |
|
| The DID of the team. |
|
| Optional. Filter by receiver DID. |
Returns
Returns a ResponseNotificationComponents object containing an array of component DIDs.
resendNotification#
Triggers a resend of a previously sent notification.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing the resend parameters. |
|
| The ID of the notification to resend. |
|
| The DID of the team. |
|
| Optional. A list of receiver DIDs to resend to. |
|
| If true, only resend to receivers who previously failed to receive it. |
Returns
Returns a ResponseResendNotification object confirming the resend request.
Routing#
Queries for retrieving routing configurations and snapshots.
getRoutingSites#
Fetches all configured routing sites. Can optionally retrieve sites from a specific snapshot.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing query parameters. |
|
| Optional. The hash of a routing snapshot to retrieve sites from. |
Returns
Returns a ResponseGetRoutingSites object containing an array of RoutingSite objects.
Example Usage
const sites = await client.getRoutingSites({});
console.log(sites.sites);Example Response
{
"code": "ok",
"sites": [
{
"id": "...",
"domain": "example.arcblock.io",
"rules": [
{
"id": "...",
"from": { "pathPrefix": "/" },
"to": { "did": "zNK...blockletDid", "type": "blocklet" }
}
]
}
]
}getRoutingSnapshots#
Retrieves a list of historical routing configuration snapshots.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing query parameters. |
|
| The maximum number of snapshots to return. |
Returns
Returns a ResponseGetRoutingSnapshots object containing an array of RoutingSnapshot objects.
getSnapshotSites#
Alias for getRoutingSites with a snapshotHash parameter, specifically for fetching sites from a snapshot.
getRoutingProviders#
Fetches a list of available routing providers and their status.
Returns
Returns a ResponseGetRoutingProviders object containing an array of RoutingProvider objects.
Domains & Certificates#
Queries for managing domains and SSL certificates.
isDidDomain#
Checks if a given domain is a DID domain.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing the domain to check. |
|
| The domain name. |
Returns
Returns a ResponseIsDidDomain object with a boolean value indicating the result.
getCertificates#
Retrieves all SSL certificates installed on the node.
Returns
Returns a ResponseGetCertificates object containing an array of Certificate objects.
checkDomains#
Verifies the DNS settings for a list of domains.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing the domains to check. |
|
| An array of domain names to verify. |
|
| The DID of the blocklet associated with the domains. |
Returns
Returns a ResponseCheckDomains object indicating the success of the check.
findCertificateByDomain#
Finds a specific SSL certificate by its associated domain name.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing the search criteria. |
|
| The domain name to search for. |
|
| The DID of the blocklet associated with the certificate. |
Returns
Returns a ResponseFindCertificateByDomain object containing the Certificate if found.
getDomainDNS#
Retrieves the DNS resolution status for a given domain.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing the domain and team DID. |
|
| The DID of the team/blocklet. |
|
| The domain to check. |
Returns
Returns a ResponseDomainDNS object detailing the DNS status, including CNAME match and resolution status.
Webhooks#
Queries for managing webhooks and their endpoints.
getWebHooks#
Retrieves a list of all configured webhooks.
Returns
Returns a ResponseWebHooks object containing an array of WebHook objects.
getWebhookSenders#
Fetches a list of available webhook sender types (e.g., Slack, API).
Returns
Returns a ResponseSenderList object with an array of WebHookSender objects.
sendTestMessage#
Sends a test message to a specified webhook to verify its configuration.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing the webhook ID and message. |
|
| The ID of the webhook to test. |
|
| The test message content. |
Returns
Returns a ResponseSendMsg object confirming the message was sent.
getWebhookEndpoints#
Retrieves a paginated list of configured webhook endpoints for a team.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing query parameters. |
|
| The DID of the team. |
|
| Pagination options. |
Returns
Returns a ResponseGetWebhookEndpoints object with a list of endpoints and pagination details.
getWebhookEndpoint#
Fetches a single webhook endpoint by its ID.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing query parameters. |
|
| The DID of the team. |
|
| The ID of the webhook endpoint. |
Returns
Returns a ResponseGetWebhookEndpoint object with the details of the specified endpoint.
getWebhookAttempts#
Retrieves a log of delivery attempts for a specific webhook event.
Parameters
Name | Type | Description |
|---|---|---|
|
| An object containing query parameters. |
|
| The DID of the team. |
|
| The ID of the event. |
|
| The ID of the webhook. |
|
| Pagination options. |
Returns
Returns a ResponseGetWebhookAttempts object with a paginated list of delivery attempts.
Next, explore queries for managing Data & Operations, such as backups and logs.