Graph Service
API Reference
Path Table
Method | Path | Description |
---|---|---|
POST | /v1/graphs/getGraphs | Fetch graphs for specified MSA Ids and Block Number |
PUT | /v1/graphs | Request an update to a given user's graph |
GET | /v1/webhooks | Get all registered webhooks |
PUT | /v1/webhooks | Watch graphs for specified dsnpIds and receive updates |
DELETE | /v1/webhooks | Delete all registered webhooks |
GET | /v1/webhooks/users/{msaId} | Get all registered webhooks for a specific MSA Id |
DELETE | /v1/webhooks/users/{msaId} | Delete all webhooks registered for a specific MSA |
GET | /v1/webhooks/urls | Get all webhooks registered to the specified URL |
DELETE | /v1/webhooks/urls | Delete all MSA webhooks registered with the given URL |
GET | /healthz | Check the health status of the service |
GET | /livez | Check the live status of the service |
GET | /readyz | Check the ready status of the service |
Reference Table
Name | Path | Description |
---|---|---|
PrivacyType | #/components/schemas/PrivacyType | Indicator connection type (public or private) |
ConnectionType | #/components/schemas/ConnectionType | Indicator of the type of connection (follow or friendship) |
KeyType | #/components/schemas/KeyType | Key type of graph encryption keypair (currently only X25519 supported) |
GraphKeyPairDto | #/components/schemas/GraphKeyPairDto | |
GraphsQueryParamsDto | #/components/schemas/GraphsQueryParamsDto | |
DsnpGraphEdgeDto | #/components/schemas/DsnpGraphEdgeDto | |
UserGraphDto | #/components/schemas/UserGraphDto | |
Direction | #/components/schemas/Direction | Indicator of the direction of this connection |
ConnectionDto | #/components/schemas/ConnectionDto | |
ConnectionDtoWrapper | #/components/schemas/ConnectionDtoWrapper | |
ProviderGraphDto | #/components/schemas/ProviderGraphDto | |
GraphChangeResponseDto | #/components/schemas/GraphChangeResponseDto | |
WatchGraphsDto | #/components/schemas/WatchGraphsDto |
Path Details
[POST]/v1/graphs/getGraphs
- Summary
Fetch graphs for specified MSA Ids and Block Number
RequestBody
- application/json
{
// Indicator connection type (public or private)
privacyType: enum[private, public]
// Indicator of the type of connection (follow or friendship)
connectionType: enum[follow, friendship]
dsnpIds?: string[]
graphKeyPairs: {
// Key type of graph encryption keypair (currently only X25519 supported)
keyType: enum[X25519]
// Public graph encryption key as a hex string (prefixed with "0x")
publicKey: string
// Private graph encryption key as a hex string (prefixed with "0x")
privateKey: string
}[]
}
Responses
- 200 Graphs retrieved successfully
application/json
{
// MSA Id that is the owner of the graph represented by the graph edges in this object
dsnpId: string
dsnpGraphEdges: {
// MSA Id of the user represented by this graph edge
userId: string
// Block number when connection represented by this graph edge was created
since: number
}[]
// Optional error message if the request failed
errorMessage?: string
}[]
[PUT]/v1/graphs
- Summary
Request an update to a given user's graph
RequestBody
- application/json
{
// MSA Id that owns the connections represented in this object
dsnpId: string
// Array of connections known to the Provider for ths MSA referenced in this object
connections: #/components/schemas/ConnectionDtoWrapper
graphKeyPairs: {
// Key type of graph encryption keypair (currently only X25519 supported)
keyType: enum[X25519]
// Public graph encryption key as a hex string (prefixed with "0x")
publicKey: string
// Private graph encryption key as a hex string (prefixed with "0x")
privateKey: string
}[]
// Optional URL of a webhook to invoke when the request is complete
webhookUrl?: string
}
Responses
- 201 Graph update request created successfully
application/json
{
// Reference ID by which the results/status of a submitted GraphChangeRequest may be retrieved
referenceId: string
}
[GET]/v1/webhooks
- Summary
Get all registered webhooks
Responses
- 200 Retrieved all registered webhooks
[PUT]/v1/webhooks
- Summary
Watch graphs for specified dsnpIds and receive updates
RequestBody
- application/json
{
dsnpIds?: string[]
// Webhook URL to call when graph changes for the referenced MSAs are detected
webhookEndpoint: string
}
Responses
- 200 Successfully started watching graphs
[DELETE]/v1/webhooks
- Summary
Delete all registered webhooks
Responses
- 200 Removed all registered webhooks
[GET]/v1/webhooks/users/{msaId}
- Summary
Get all registered webhooks for a specific MSA Id
Parameters(Query)
includeAll?: boolean
Responses
- 200 Retrieved all registered webhooks for the given MSA Id
application/json
string[]
[DELETE]/v1/webhooks/users/{msaId}
- Summary
Delete all webhooks registered for a specific MSA
Responses
- 200 Removed all registered webhooks for the specified MSA
[GET]/v1/webhooks/urls
- Summary
Get all webhooks registered to the specified URL
Parameters(Query)
url: string
Responses
- 200 Retrieved all watched MSA graphs registered to the specified URL
application/json
string[]
[DELETE]/v1/webhooks/urls
- Summary
Delete all MSA webhooks registered with the given URL
Parameters(Query)
url: string
Responses
- 200 Removed all webhooks registered to the specified URL
[GET]/healthz
- Summary
Check the health status of the service
Responses
- 200 Service is healthy
[GET]/livez
- Summary
Check the live status of the service
Responses
- 200 Service is live
[GET]/readyz
- Summary
Check the ready status of the service
Responses
- 200 Service is ready
References
#/components/schemas/PrivacyType
{
"type": "string",
"description": "Indicator connection type (public or private)",
"enum": [
"private",
"public"
]
}
#/components/schemas/ConnectionType
{
"type": "string",
"description": "Indicator of the type of connection (follow or friendship)",
"enum": [
"follow",
"friendship"
]
}
#/components/schemas/KeyType
{
"type": "string",
"description": "Key type of graph encryption keypair (currently only X25519 supported)",
"enum": [
"X25519"
]
}
#/components/schemas/GraphKeyPairDto
{
// Key type of graph encryption keypair (currently only X25519 supported)
keyType: enum[X25519]
// Public graph encryption key as a hex string (prefixed with "0x")
publicKey: string
// Private graph encryption key as a hex string (prefixed with "0x")
privateKey: string
}
#/components/schemas/GraphsQueryParamsDto
{
// Indicator connection type (public or private)
privacyType: enum[private, public]
// Indicator of the type of connection (follow or friendship)
connectionType: enum[follow, friendship]
dsnpIds?: string[]
graphKeyPairs: {
// Key type of graph encryption keypair (currently only X25519 supported)
keyType: enum[X25519]
// Public graph encryption key as a hex string (prefixed with "0x")
publicKey: string
// Private graph encryption key as a hex string (prefixed with "0x")
privateKey: string
}[]
}
#/components/schemas/DsnpGraphEdgeDto
{
// MSA Id of the user represented by this graph edge
userId: string
// Block number when connection represented by this graph edge was created
since: number
}
#/components/schemas/UserGraphDto
{
// MSA Id that is the owner of the graph represented by the graph edges in this object
dsnpId: string
dsnpGraphEdges: {
// MSA Id of the user represented by this graph edge
userId: string
// Block number when connection represented by this graph edge was created
since: number
}[]
// Optional error message if the request failed
errorMessage?: string
}
#/components/schemas/Direction
{
"type": "string",
"description": "Indicator of the direction of this connection",
"enum": [
"connectionTo",
"connectionFrom",
"bidirectional",
"disconnect"
]
}
#/components/schemas/ConnectionDto
{
// Indicator connection type (public or private)
privacyType: enum[private, public]
// Indicator of the direction of this connection
direction: enum[connectionTo, connectionFrom, bidirectional, disconnect]
// Indicator of the type of connection (follow or friendship)
connectionType: enum[follow, friendship]
// MSA Id representing the target of this connection
dsnpId: string
}
#/components/schemas/ConnectionDtoWrapper
{
data: {
// Indicator connection type (public or private)
privacyType: enum[private, public]
// Indicator of the direction of this connection
direction: enum[connectionTo, connectionFrom, bidirectional, disconnect]
// Indicator of the type of connection (follow or friendship)
connectionType: enum[follow, friendship]
// MSA Id representing the target of this connection
dsnpId: string
}[]
}
#/components/schemas/ProviderGraphDto
{
// MSA Id that owns the connections represented in this object
dsnpId: string
// Array of connections known to the Provider for ths MSA referenced in this object
connections: #/components/schemas/ConnectionDtoWrapper
graphKeyPairs: {
// Key type of graph encryption keypair (currently only X25519 supported)
keyType: enum[X25519]
// Public graph encryption key as a hex string (prefixed with "0x")
publicKey: string
// Private graph encryption key as a hex string (prefixed with "0x")
privateKey: string
}[]
// Optional URL of a webhook to invoke when the request is complete
webhookUrl?: string
}
#/components/schemas/GraphChangeResponseDto
{
// Reference ID by which the results/status of a submitted GraphChangeRequest may be retrieved
referenceId: string
}
#/components/schemas/WatchGraphsDto
{
dsnpIds?: string[]
// Webhook URL to call when graph changes for the referenced MSAs are detected
webhookEndpoint: string
}