WattTime · Capability

WattTime API — Authentication

WattTime API — Authentication. 2 operations. Lead operation: WattTime Login and Obtain Access Token. Self-contained Naftiko capability covering one Watttime business surface.

Run with Naftiko WatttimeAuthentication

What You Can Do

GET
Login — WattTime Login and Obtain Access Token
/v1/login
POST
Register — WattTime Register New Account
/v1/register

MCP Tools

watttime-login-and-obtain-access

WattTime Login and Obtain Access Token

read-only idempotent
watttime-register-new-account

WattTime Register New Account

Capability Spec

watttime-authentication.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: WattTime API — Authentication
  description: 'WattTime API — Authentication. 2 operations. Lead operation: WattTime Login and Obtain Access Token. Self-contained
    Naftiko capability covering one Watttime business surface.'
  tags:
  - Watttime
  - Authentication
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    WATTTIME_API_KEY: WATTTIME_API_KEY
capability:
  consumes:
  - type: http
    namespace: watttime-authentication
    baseUri: https://api.watttime.org/v3
    description: WattTime API — Authentication business capability. Self-contained, no shared references.
    resources:
    - name: login
      path: /login
      operations:
      - name: login
        method: GET
        description: WattTime Login and Obtain Access Token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: register
      path: /register
      operations:
      - name: register
        method: POST
        description: WattTime Register New Account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.WATTTIME_API_KEY}}'
  exposes:
  - type: rest
    namespace: watttime-authentication-rest
    port: 8080
    description: REST adapter for WattTime API — Authentication. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/login
      name: login
      description: REST surface for login.
      operations:
      - method: GET
        name: login
        description: WattTime Login and Obtain Access Token
        call: watttime-authentication.login
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/register
      name: register
      description: REST surface for register.
      operations:
      - method: POST
        name: register
        description: WattTime Register New Account
        call: watttime-authentication.register
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: watttime-authentication-mcp
    port: 9090
    transport: http
    description: MCP adapter for WattTime API — Authentication. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: watttime-login-and-obtain-access
      description: WattTime Login and Obtain Access Token
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: watttime-authentication.login
      outputParameters:
      - type: object
        mapping: $.
    - name: watttime-register-new-account
      description: WattTime Register New Account
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: watttime-authentication.register
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.