Okta · Capability

Okta API — Session

Okta API — Session. 4 operations. Lead operation: Okta Create Session with Session Token. Self-contained Naftiko capability covering one Okta business surface.

Run with Naftiko OktaSession

What You Can Do

POST
Createsession — Okta Create Session with Session Token
/v1/api/v1/sessions
GET
Getsession — Get details about a session.
/v1/api/v1/sessions/{sessionid}
DELETE
Endsession — Okta Close Session
/v1/api/v1/sessions/{sessionid}
POST
Refreshsession — Okta Refresh Session
/v1/api/v1/sessions/{sessionid}/lifecycle/refresh

MCP Tools

okta-create-session-session-token

Okta Create Session with Session Token

get-details-about-session

Get details about a session.

read-only idempotent
okta-close-session

Okta Close Session

idempotent
okta-refresh-session

Okta Refresh Session

Capability Spec

okta-session.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Okta API — Session
  description: 'Okta API — Session. 4 operations. Lead operation: Okta Create Session with Session Token. Self-contained Naftiko
    capability covering one Okta business surface.'
  tags:
  - Okta
  - Session
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    OKTA_API_KEY: OKTA_API_KEY
capability:
  consumes:
  - type: http
    namespace: okta-session
    baseUri: https://your-subdomain.okta.com
    description: Okta API — Session business capability. Self-contained, no shared references.
    resources:
    - name: api-v1-sessions
      path: /api/v1/sessions
      operations:
      - name: createsession
        method: POST
        description: Okta Create Session with Session Token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v1-sessions-sessionId
      path: /api/v1/sessions/{sessionId}
      operations:
      - name: getsession
        method: GET
        description: Get details about a session.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: sessionId
          in: path
          type: string
          required: true
      - name: endsession
        method: DELETE
        description: Okta Close Session
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: sessionId
          in: path
          type: string
          required: true
    - name: api-v1-sessions-sessionId-lifecycle-refresh
      path: /api/v1/sessions/{sessionId}/lifecycle/refresh
      operations:
      - name: refreshsession
        method: POST
        description: Okta Refresh Session
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: sessionId
          in: path
          type: string
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.OKTA_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: okta-session-rest
    port: 8080
    description: REST adapter for Okta API — Session. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/api/v1/sessions
      name: api-v1-sessions
      description: REST surface for api-v1-sessions.
      operations:
      - method: POST
        name: createsession
        description: Okta Create Session with Session Token
        call: okta-session.createsession
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/sessions/{sessionid}
      name: api-v1-sessions-sessionid
      description: REST surface for api-v1-sessions-sessionId.
      operations:
      - method: GET
        name: getsession
        description: Get details about a session.
        call: okta-session.getsession
        with:
          sessionId: rest.sessionId
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: endsession
        description: Okta Close Session
        call: okta-session.endsession
        with:
          sessionId: rest.sessionId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/sessions/{sessionid}/lifecycle/refresh
      name: api-v1-sessions-sessionid-lifecycle-refresh
      description: REST surface for api-v1-sessions-sessionId-lifecycle-refresh.
      operations:
      - method: POST
        name: refreshsession
        description: Okta Refresh Session
        call: okta-session.refreshsession
        with:
          sessionId: rest.sessionId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: okta-session-mcp
    port: 9090
    transport: http
    description: MCP adapter for Okta API — Session. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: okta-create-session-session-token
      description: Okta Create Session with Session Token
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: okta-session.createsession
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-details-about-session
      description: Get details about a session.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: okta-session.getsession
      with:
        sessionId: tools.sessionId
      outputParameters:
      - type: object
        mapping: $.
    - name: okta-close-session
      description: Okta Close Session
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: okta-session.endsession
      with:
        sessionId: tools.sessionId
      outputParameters:
      - type: object
        mapping: $.
    - name: okta-refresh-session
      description: Okta Refresh Session
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: okta-session.refreshsession
      with:
        sessionId: tools.sessionId
      outputParameters:
      - type: object
        mapping: $.