Used variables
# Base URL of node B api
$API_B_BASE
# Main administrator JWT for node B
$MAIN_JWT_B
# Node B domain
$DOMAIN_B
# Node A domain
$DOMAIN_A
# Node name
$NODE_NAME
# Node B nodeID
$NODE_ID_B
# Node A nodeID
$NODE_ID_A
# Node URI
$NODE_URI
Example request
curl -X POST "$API_B_BASE/federation/nodes" \
-H "authorization: Bearer $MAIN_JWT_B" \
--header "Content-Type: application/json" \
--data "{
\"baseURL\": \"$DOMAIN_B_BASE_URL\",
\"name\": \"$DOMAIN_B_NAME\"
}";
Example response
{
"response": {
"nodeID": "$NODE_ID_B",
"name": "$DOMAIN_B_NAME",
"status": "pending",
"baseURL": "$DOMAIN_B_BASE_URL",
"sharedNodeID": "$NODE_ID_A",
"createdAt": "2020-12-01T14:24:47.246145938Z",
"createdBy": "0"
}
}