Secure Code Warrior · Capability

Secure Code Warrior Portal API — Tournaments

Secure Code Warrior Portal API — Tournaments. 2 operations. Lead operation: List Tournaments. Self-contained Naftiko capability covering one Secure Code Warrior business surface.

Run with Naftiko Secure Code WarriorTournaments

What You Can Do

GET
Listtournaments — List Tournaments
/v1/tournaments
GET
Gettournamentleaderboard — Get Tournament Leaderboard
/v1/tournaments/{tournament-id}/leaderboard

MCP Tools

list-tournaments

List Tournaments

read-only idempotent
get-tournament-leaderboard

Get Tournament Leaderboard

read-only idempotent

Capability Spec

portal-tournaments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Secure Code Warrior Portal API — Tournaments
  description: 'Secure Code Warrior Portal API — Tournaments. 2 operations. Lead operation: List Tournaments. Self-contained
    Naftiko capability covering one Secure Code Warrior business surface.'
  tags:
  - Secure Code Warrior
  - Tournaments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SECURE_CODE_WARRIOR_API_KEY: SECURE_CODE_WARRIOR_API_KEY
capability:
  consumes:
  - type: http
    namespace: portal-tournaments
    baseUri: https://portal-api.securecodewarrior.com/api/v2
    description: Secure Code Warrior Portal API — Tournaments business capability. Self-contained, no shared references.
    resources:
    - name: tournaments
      path: /tournaments
      operations:
      - name: listtournaments
        method: GET
        description: List Tournaments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: page
          in: query
          type: integer
        - name: name
          in: query
          type: string
        - name: startdate
          in: query
          type: string
        - name: enddate
          in: query
          type: string
    - name: tournaments-tournament_id-leaderboard
      path: /tournaments/{tournament_id}/leaderboard
      operations:
      - name: gettournamentleaderboard
        method: GET
        description: Get Tournament Leaderboard
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tournament_id
          in: path
          type: string
          required: true
        - name: page
          in: query
          type: integer
    authentication:
      type: apikey
      key: X-API-Key
      value: '{{env.SECURE_CODE_WARRIOR_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: portal-tournaments-rest
    port: 8080
    description: REST adapter for Secure Code Warrior Portal API — Tournaments. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/tournaments
      name: tournaments
      description: REST surface for tournaments.
      operations:
      - method: GET
        name: listtournaments
        description: List Tournaments
        call: portal-tournaments.listtournaments
        with:
          page: rest.page
          name: rest.name
          startdate: rest.startdate
          enddate: rest.enddate
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/tournaments/{tournament-id}/leaderboard
      name: tournaments-tournament-id-leaderboard
      description: REST surface for tournaments-tournament_id-leaderboard.
      operations:
      - method: GET
        name: gettournamentleaderboard
        description: Get Tournament Leaderboard
        call: portal-tournaments.gettournamentleaderboard
        with:
          tournament_id: rest.tournament_id
          page: rest.page
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: portal-tournaments-mcp
    port: 9090
    transport: http
    description: MCP adapter for Secure Code Warrior Portal API — Tournaments. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: list-tournaments
      description: List Tournaments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portal-tournaments.listtournaments
      with:
        page: tools.page
        name: tools.name
        startdate: tools.startdate
        enddate: tools.enddate
      outputParameters:
      - type: object
        mapping: $.
    - name: get-tournament-leaderboard
      description: Get Tournament Leaderboard
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portal-tournaments.gettournamentleaderboard
      with:
        tournament_id: tools.tournament_id
        page: tools.page
      outputParameters:
      - type: object
        mapping: $.