APIs

This section contains the API documentation for Domain Power Service (DPS).

Interacting with the gRPC API

Using dpsctl

The dpsctl command-line tool provides the easiest way to interact with DPS:

# Authenticate with DPS
dpsctl login --username alice

# List all topologies
dpsctl topology list

# Get server version
dpsctl server-version

# List resource groups
dpsctl resource-group list

# Check system status
dpsctl check status

Using grpcurl

For direct gRPC API access, use grpcurl:

# Get a token first
grpcurl -d '{
  "passwordCredential": {
    "username": "alice",
    "password": "your-password"
  }
}' \
  api.{{ .Site.Params.ProjectShortNameLower }}.your.domain:443 \
  nvidia.dcpower.v1.AuthService/Token

# Use the token to call APIs
export {{ .Site.Params.ProjectShortName }}_ACCESS_TOKEN="<token-from-above>"

# List all available services
grpcurl -H "authorization: Bearer ${{ .Site.Params.ProjectShortName }}_ACCESS_TOKEN" \
  api.{{ .Site.Params.ProjectShortNameLower }}.your.domain:443 \
  list

# Get server version
grpcurl -H "authorization: Bearer ${{ .Site.Params.ProjectShortName }}_ACCESS_TOKEN" \
  api.{{ .Site.Params.ProjectShortNameLower }}.your.domain:443 \
  nvidia.dcpower.v1.VersionService/GetVersion

# List topologies
grpcurl -H "authorization: Bearer ${{ .Site.Params.ProjectShortName }}_ACCESS_TOKEN" \
  api.{{ .Site.Params.ProjectShortNameLower }}.your.domain:443 \
  nvidia.dcpower.v1.TopologyService/ListTopologies