Nodes
On this page:
|
|
GET[base]/nodes |
|
GET[base]/nodes/{nodeId} |
|
GET[base]/nodes/{nodeId}/metrics |
The Node object
This object provides the following data about a node:
- nodeId string
The node identifier.
- level integer
The node level.
- childProfileId string
The profile identifier of a child user.
- childUserId string
The identifier of a child user.
- subId string
The SubIB client identifier.
- relationId string
The relation identifier.
- parentProfileId string
The profile identifier of a parent user.
- parentUserId string
The identifier of a parent user.
- parent object
The data of a parent user.
- parents array
An array of parent users.
- path array
An array of paths.
- createTime string
The date and time when the object has been created.
- updateTime string
The date and time when the object has been last updated.
{
"nodeId": "6006dda272f002519c3eb505",
"level": 2,
"childProfileId": "6006dda272f002519c3eb506",
"childUserId": "6006dda272f002519c3eb507",
"subIb": "6006dda272f002519c3eb511",
"relationId": "6006dda272f002519c3eb512",
"parentProfileId": "6006dda272f002519c3eb513",
"parentUserId": "6006dda272f002519c3eb514",
"parents": [
"6006dda272f002519c3eb518",
"6006dda272f002519c3eb519"
],
"path": [
"6006dda272f002519c3eb520",
"6006dda272f002519c3eb521"
],
"createTime": "2021-01-01T00:00:00+00:00",
"updateTime": "2021-01-01T00:00:00+00:00"
}
Get a nodes list
Use this method to obtain a list of nodes of a user profile.
To obtain detailed information about a specified node, use a separate method to get node details.
Request
Header parameters:
Authorization: Bearer <token>
Query parameters:
This method supports pagination, sorting, filtering, and query. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering, sorting, and query are listed below. For values description, refer to the Node object.
Possible values for the filter
parameter:
childContacts
childCountryCode
childName
childProfileId
childUserId
createDate
level
parentContacts
parentName
parentGroupId
parentProfileId
parentUserId
Possible values for the sort_by
parameter:
level
createTime
(default)updateTime
Possible values for the query
parameter:
user
— child and parent datametrics
— information about client number, reward payment volume and amountprofile
— profile informationcontacts
— contact detailsgroup
— partnership program informationaccounts
— accounts informationwallets
— wallets informationmethod
— payment method information
GET[base]/nodes
curl --location -g --request GET 'https://your.base-url.here/nodes?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[childContacts]=a31b1402@privaterelay.appleid.com&filter[childCountryCode]=US&filter[childName]=Mary Jane Smith&filter[childProfileId]=6006dda272f002519c3eb505&filter[childUserId]=6006dda272f002519c3eb505&filter[createDate]=2021-01-01&filter[level]=2&filter[parentContacts]=b432dfj53@privaterelay.appleid.com&filter[parentName]=Kaitlin Klein&filter[parentGroupId]=6006dda272f002519c3eb505&filter[parentProfileId]=6006dda272f002519c3eb505&filter[parentUserId]=6006dda272f002519c3eb505&query[user]=1&query[metrics]=1&query[profile]=1&query[group]=1&query[accounts]=1&query[wallets]=1&query[contacts]=1&query[resources]=1&query[method]=1' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains an array of Node objects providing information about all nodes that correspond to the query parameters specified in the request.
Additionally, the response body may contain the following information, if any of these were specified in the query parameters of the request:
the Profile object
an array of Contact objects
the Platform object
an array of
metrics
providing information about client number, reward payment volume and amountthe IB type object
the Account object
the Wallet object
Get node details
Use this method to obtain detailed information about a specified node.
To obtain a list of nodes of a user profile, use a separate method to get a list of nodes.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- nodeId required
The node identifier.
Query parameters:
This method supports query. For details on applying the parameters, refer to the Query parameters section.
Possible values for the query
parameter:
user
— child and parent datametrics
— information about client number, reward payment volume and amountprofile
— profile informationcontacts
— contact detailsgroup
— partnership program informationaccounts
— accounts informationwallets
— wallets informationmethod
— payment method information
GET[base]/nodes/{nodeId}
curl --location -g --request GET 'https://your.base-url.here/nodes/60ba407d15951453e60e49f8?query[user]=1&query[metrics]=1&query[profile]=1&query[group]=1&query[accounts]=1&query[wallets]=1&query[contacts]=1&query[resources]=1&query[method]=1' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains a Node object providing information about the specified node.
Additionally, the response body may contain the following information, if any of these were specified in the query parameters of the request:
the Profile object
an array of Contact objects
the Platform object
an array of
metrics
providing information about client number, reward payment volume and amountthe IB type object
the Account object
the Wallet object
Get node metrics
Use this method to obtain node metrics.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- nodeId required
The node identifier.
GET[base]/nodes/{nodeId}/metrics
curl --location --request GET 'https://your.base-url.here/nodes/60ba407d15951453e60e49f8/metrics' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains a key-value pair providing information about client number, reward payment volume and amount.
{
"total": 3,
"metrics": [
{
"key": "clients",
"value": 5
},
{
"key": "paymentVolume",
"value": "49.990000000000000000"
},
{
"key": "paymentAmount",
"value": {
"amount": "2.142831470000000000",
"currency": "BTC"
}
}
]
}