Return role of a server in a cluster
Get to know whether this server is a Coordinator or DB-Server
GET /_admin/server/role
Returns the role of a server in a cluster. The role is returned in the role attribute of the result. Possible return values for role are:
- SINGLE: the server is a standalone server without clustering
- COORDINATOR: the server is a coordinator in a cluster
- PRIMARY: the server is a primary database server in a cluster
- SECONDARY: the server is a secondary database server in a cluster
- AGENT: the server is an agency node in a cluster
- UNDEFINED: in a cluster, UNDEFINED is returned if the server role cannot be determined.
HTTP 200
A json document with these Properties is returned:
Is returned in all cases.
- errorNum: the server error number
- code: the HTTP status code, allways 200
- role: one of [ SINGLE, COORDINATOR, PRIMARY, SECONDARY, AGENT, UNDEFINED]
- error: allways false
Return Codes
- 200: Is returned in all cases.
Response Body
- errorNum: the server error number
- code: the HTTP status code, allways 200
- role: one of [ SINGLE, COORDINATOR, PRIMARY, SECONDARY, AGENT, UNDEFINED]
- error: allways false