operations.add_server
POST
/servers
const url = 'https://raw.githubusercontent.com/federation/v1/servers';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"server":{"id":"example","url":"https://candig.uhnresearch.ca","location":{"name":"UHN","province":"Ontario","province-code":"ca-on"},"testing":true},"authentication":{"issuer":"example","token":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://raw.githubusercontent.com/federation/v1/servers \ --header 'Content-Type: application/json' \ --data '{ "server": { "id": "example", "url": "https://candig.uhnresearch.ca", "location": { "name": "UHN", "province": "Ontario", "province-code": "ca-on" }, "testing": true }, "authentication": { "issuer": "example", "token": "example" } }'Add a server to the federation.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” register
boolean
Re-register all known servers/services
Request Body
Section titled “Request Body ” Media type application/json
object
server
required
A federated CanDIG instance in the network
object
id
required
Unique id for the server
string
url
required
Base URL of the CanDIG instance
string
Example
https://candig.uhnresearch.ca location
required
object
name
string
Example
UHN province
string
Example
Ontario province-code
string
Example
ca-on testing
If True, this is only registered as a test server in Federation, not in CanDIG overall
boolean
authentication
required
One of:
CanDIGv2 authentication
object
issuer
required
Issuer associated with the OIDC token.
string
token
required
OIDC access token issued to a user from the issuer. Can be expired, as long as it’s verifiable with the current public key.
string
Testing server
object
testing
required
If present and True, this is a request to register a testing server
boolean
Responses
Section titled “ Responses ”Server registered successfully
Server already registered
Authorization Error
Internal Error