Skip to main content

Consul.NET

.NET client library for the Consul HTTP API

Downloads
NuGet
CI
License
Contributors
Contribute with GitPod
.NET Framework: >= 4.6.1
.NET Core: >= 2.0.0
dotnet add package Consul

Curious about what's next? try the โšก preview version

Easy to Use

Consul.NET was designed by humans, for humans. It's meant to be intuitive, simple and easy to use.

Open-Source

Consul.NET is open-source and free to use. It's developed by the community and for the community.

Production Ready

Consul.NET is used in production by many companies and is battle-tested.

Supported APIs

Consul API: 1.7.14

This version indicates the version of Consul API that is fully supported. Recent versions may still work, but with some missing features.

โœ… supported ยท ๐Ÿšง in progress ยท โŒ not supported

GroupEndpointRouteStatus
Admin PartitionCreate a PartitionPUT v1/partition๐Ÿšง
Read a PartitionGET v1/partition/:nameโŒ
Update a PartitionPUT v1/partition/:nameโŒ
Delete a PartitionDELETE v1/partition/:nameโŒ
List all PartitionsGET v1/partitionsโŒ
AgentRetrieve host informationGET v1/agent/hostโœ…
List MembersGET v1/agent/membersโœ…
Read ConfigurationGET v1/agent/selfโœ…
Reload AgentPUT v1/agent/reloadโœ…
Enable Maintenance ModePUT v1/agent/maintenanceโœ…
View MetricsGET v1/agent/metricsโœ…
Stream LogsGET v1/agent/monitorโœ…
Join AgentPUT v1/agent/join/:addressโœ…
Graceful Leave and ShutdownPUT v1/agent/leaveโœ…
Force Leave and ShutdownPUT v1/agent/force-leave/:nodeโœ…
Agent-ChecksList ChecksGET v1/agent/checksโœ…
Register CheckPUT v1/agent/check/registerโœ…
Deregister CheckPUT v1/agent/check/deregister/:check_idโœ…
TTL Check PassPUT v1/agent/check/pass/:check_idโœ…
TTL Check WarnPUT v1/agent/check/warn/:check_idโœ…
TTL Check FailPUT v1/agent/check/fail/:check_idโœ…
TTL Check UpdatePUT /agent/check/update/:check_idโœ…
Agent-ServicesList ServicesGET v1/agent/servicesโœ…
Get Service ConfigurationGET v1/agent/service/:service_idโœ…
Get local service healthGET v1/agent/health/service/name/:service_nameโœ…
Get local service health by IDGET v1/agent/health/service/id/:service_idโœ…
Register ServicePUT v1/agent/service/registerโœ…
Deregister ServicePUT v1/agent/service/deregister/:service_idโœ…
Enable Maintenance ModePUT v1/agent/service/maintenance/:service_idโœ…
ConnectAuthorizePOST v1/agent/connect/authorizeโœ…
Certificate Authority (CA) RootsGET v1/agent/connect/ca/rootsโœ…
Service Leaf CertificateGET v1/agent/connect/ca/leaf/:serviceโœ…
CatalogRegister EntityPUT v1/catalog/registerโœ…
Deregister EntityPUT v1/catalog/deregisterโœ…
List DatacentersGET v1/catalog/datacentersโœ…
List NodesGET v1/catalog/nodesโœ…
List ServicesGET v1/catalog/servicesโœ…
List Nodes for ServiceGET v1/catalog/service/:serviceโœ…
Retrieve Map of Services for a NodeGET v1/catalog/node/:nodeโœ…
List Services for NodeGET v1/catalog/node-services/:nodeโœ…
List Services for GatewayGET v1/catalog/gateway-services/:gatewayโœ…
ConfigApply ConfigurationPUT v1/configโœ…
Get ConfigurationGET v1/config/:kind/:nameโœ…
List ConfigurationsGET v1/config/:kind/:nameโœ…
Delete ConfigurationDELETE v1/config/:kind/:nameโœ…
ConnectList CA Root CertificatesGET v1/connect/ca/rootsโœ…
Get CA ConfigurationGET v1/connect/ca/configuration๐Ÿšง
Update CA ConfigurationPUT v1/connect/ca/configurationโŒ
Upsert Intention by NamePUT v1/connect/intentions/exactโŒ
Create Intention with IDPOST v1/connect/intentionsโŒ
Update Intention by IDPUT v1/connect/intentions/:uuidโŒ
Read Specific Intention by NameGET v1/connect/intentions/exactโŒ
Read Specific Intention by IDGET v1/connect/intentions/:uuidโŒ
List IntentionsGET v1/connect/intentionsโŒ
Delete Intention by NameDELETE v1/connect/intentions/exactโŒ
Delete Intention by IDDELETE v1/connect/intentions/:uuidโŒ
Check Intention ResultGET v1/connect/intentions/checkโŒ
List Matching IntentionsGET v1/connect/intentions/matchโŒ
CoordinateRead WAN CoordinatesGET v1/coordinate/datacentersโœ…
Read LAN Coordinates for all nodesGET v1/coordinate/nodesโœ…
Read LAN Coordinates for a nodeGET v1/coordinate/node/:nodeโœ…
Update LAN Coordinates for a nodePUT v1/coordinate/updateโœ…
Discovery ChainRead Compiled Discovery ChainGET v1/discovery-chain/:serviceโœ…
POST v1/discovery-chain/:servicePOST v1/discovery-chain/:serviceโœ…
EventsFire EventPUT v1/event/fire/:nameโœ…
List EventsGET v1/event/listโœ…
HealthList Checks for NodeGET v1/health/node/:nodeโœ…
List Checks for ServiceGET v1/health/checks/:serviceโœ…
List Nodes for ServiceGET v1/health/service/:serviceโœ…
List Nodes for Connect-capable ServiceGET v1/health/connect/:serviceโœ…
List Nodes for Ingress Gateways Associated to a ServiceGET v1/health/ingress/:serviceโœ…
List Checks in StateGET v1/health/state/:stateโœ…
KV StoreRead KeyGET v1/kv/:keyโœ…
Create/Update KeyPUT v1/kv/:keyโœ…
Delete KeyDELETE v1/kv/:keyโœ…
Operator-AreaCreate Network AreaPOST v1/operator/areaโœ…
List Network AreasGET v1/operator/areaโœ…
Update Network AreaPUT v1/operator/area/:uuidโœ…
List Specific Network AreaGET v1/operator/area/:uuidโœ…
Delete Network AreaDELETE v1/operator/area/:uuidโœ…
Join Network AreaPUT v1/operator/area/:uuid/join๐Ÿšง
List Network Area MembersGET v1/operator/area/:uuid/membersโŒ
Autopilot OperatorRead ConfigurationGET v1/operator/autopilot/configurationโŒ
Update ConfigurationPUT v1/operator/autopilot/configurationโŒ
Read HealthGET v1/operator/autopilot/healthโŒ
Read the Autopilot StateGET v1/operator/autopilot/stateโŒ
Keyring OperatorList Gossip Encryption KeysGET v1/operator/keyringโœ…
Add New Gossip Encryption KeyPOST v1/operator/keyringโœ…
Change Primary Gossip Encryption KeyPUT v1/operator/keyringโœ…
Delete Gossip Encryption KeyDELETE v1/operator/keyringโœ…
License - OperatorGetting the Consul LicenseGET v1/operator/licenseโœ…
Updating the Consul LicensePUT v1/operator/license๐Ÿ›‘ (Deprecated in 1.10.0)
Resetting the Consul LicenseDELETE v1/operator/license๐Ÿ›‘ (Deprecated in 1.10.0)
Raft OperatorRead ConfigurationGET v1/operator/raft/configurationโœ…
Delete Raft PeerDELETE v1/operator/raft/peerโœ…
Network Segments - OperatorList Network SegmentsGET v1/operator/segmentโœ…
NamespaceCreate a NamespacePUT v1/namespaceโœ…
Read a NamespaceGET v1/namespace/:nameโœ…
Update a NamespacePUT v1/namespace/:nameโœ…
Delete a NamespaceDELETE v1/namespace/:nameโœ…
List all NamespacesGET v1/namespacesโœ…
Prepared QueryCreate Prepared QueryPOST v1/queryโœ…
List Prepared QueriesGET v1/queryโœ…
Update Prepared QueryPUT v1/query/:uuidโœ…
Read Prepared QueryGET v1/query/:uuidโœ…
Delete Prepared QueryDELETE v1/query/:uuidโœ…
Execute Prepared QueryGET v1/query/:uuid/executeโœ…
Explain Prepared QueryGET v1/query/:uuid/explainโœ…
SessionCreate SessionPUT v1/session/createโœ…
Delete SessionPUT v1/session/destroy/:uuidโœ…
Read SessionGET v1/session/info/:uuidโœ…
List Sessions for NodeGET v1/session/node/:nodeโœ…
List SessionsGET v1/session/listโœ…
Renew SessionPUT v1/session/renew/:uuidโœ…
SnapshotGenerate SnapshotGET v1/snapshotโœ…
Restore SnapshotPUT v1/snapshotโœ…
StatusGet Raft LeaderGET v1/status/leaderโœ…
List Raft PeersGET v1/status/peersโœ…
TransactionsCreate TransactionPUT v1/txnโœ