Writer · Capability

API — template

API — template. 6 operations. Lead operation: Retrieve a single job. Self-contained Naftiko capability covering one Writer business surface.

Run with Naftiko Writertemplate

What You Can Do

GET
Get — Retrieve a single job
/v1/v1/applications/jobs/{job-id}
POST
Post — Retry job execution
/v1/v1/applications/jobs/{job-id}/retry
GET
Get — Retrieve graphs
/v1/v1/applications/{application-id}/graphs
PUT
Put — Associate graphs
/v1/v1/applications/{application-id}/graphs
GET
Get — Retrieve all jobs
/v1/v1/applications/{application-id}/jobs
POST
Post — Generate from application (async)
/v1/v1/applications/{application-id}/jobs

MCP Tools

retrieve-single-job

Retrieve a single job

read-only idempotent
retry-job-execution

Retry job execution

retrieve-graphs

Retrieve graphs

read-only idempotent
associate-graphs

Associate graphs

idempotent
retrieve-all-jobs

Retrieve all jobs

read-only idempotent
generate-application-async

Generate from application (async)

Capability Spec

writer-template.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: API — template
  description: 'API — template. 6 operations. Lead operation: Retrieve a single job. Self-contained Naftiko capability covering
    one Writer business surface.'
  tags:
  - Writer
  - template
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    WRITER_API_KEY: WRITER_API_KEY
capability:
  consumes:
  - type: http
    namespace: writer-template
    baseUri: https://api.writer.com
    description: API — template business capability. Self-contained, no shared references.
    resources:
    - name: v1-applications-jobs-job_id
      path: /v1/applications/jobs/{job_id}
      operations:
      - name: get
        method: GET
        description: Retrieve a single job
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: job_id
          in: path
          type: string
          description: The ID of the job to retrieve.
          required: true
    - name: v1-applications-jobs-job_id-retry
      path: /v1/applications/jobs/{job_id}/retry
      operations:
      - name: post
        method: POST
        description: Retry job execution
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: job_id
          in: path
          type: string
          description: The ID of the job to retry.
          required: true
    - name: v1-applications-application_id-graphs
      path: /v1/applications/{application_id}/graphs
      operations:
      - name: get
        method: GET
        description: Retrieve graphs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: application_id
          in: path
          type: string
          description: The ID of the no-code agent for which to retrieve Knowledge Graphs.
          required: true
      - name: put
        method: PUT
        description: Associate graphs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: application_id
          in: path
          type: string
          description: The ID of the no-code agent to update.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-applications-application_id-jobs
      path: /v1/applications/{application_id}/jobs
      operations:
      - name: get
        method: GET
        description: Retrieve all jobs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: application_id
          in: path
          type: string
          description: The ID of the no-code app for which to retrieve jobs.
          required: true
        - name: status
          in: query
          type: string
        - name: offset
          in: query
          type: integer
          description: The pagination offset for retrieving the jobs.
        - name: limit
          in: query
          type: integer
          description: The pagination limit for retrieving the jobs.
      - name: post
        method: POST
        description: Generate from application (async)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: application_id
          in: path
          type: string
          description: The ID of the no-code app for which to create a job.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.WRITER_API_KEY}}'
  exposes:
  - type: rest
    namespace: writer-template-rest
    port: 8080
    description: REST adapter for API — template. One Spectral-compliant resource per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/v1/applications/jobs/{job-id}
      name: v1-applications-jobs-job-id
      description: REST surface for v1-applications-jobs-job_id.
      operations:
      - method: GET
        name: get
        description: Retrieve a single job
        call: writer-template.get
        with:
          job_id: rest.job_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/applications/jobs/{job-id}/retry
      name: v1-applications-jobs-job-id-retry
      description: REST surface for v1-applications-jobs-job_id-retry.
      operations:
      - method: POST
        name: post
        description: Retry job execution
        call: writer-template.post
        with:
          job_id: rest.job_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/applications/{application-id}/graphs
      name: v1-applications-application-id-graphs
      description: REST surface for v1-applications-application_id-graphs.
      operations:
      - method: GET
        name: get
        description: Retrieve graphs
        call: writer-template.get
        with:
          application_id: rest.application_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Associate graphs
        call: writer-template.put
        with:
          application_id: rest.application_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/applications/{application-id}/jobs
      name: v1-applications-application-id-jobs
      description: REST surface for v1-applications-application_id-jobs.
      operations:
      - method: GET
        name: get
        description: Retrieve all jobs
        call: writer-template.get
        with:
          application_id: rest.application_id
          status: rest.status
          offset: rest.offset
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Generate from application (async)
        call: writer-template.post
        with:
          application_id: rest.application_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: writer-template-mcp
    port: 9090
    transport: http
    description: MCP adapter for API — template. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: retrieve-single-job
      description: Retrieve a single job
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: writer-template.get
      with:
        job_id: tools.job_id
      outputParameters:
      - type: object
        mapping: $.
    - name: retry-job-execution
      description: Retry job execution
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: writer-template.post
      with:
        job_id: tools.job_id
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-graphs
      description: Retrieve graphs
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: writer-template.get
      with:
        application_id: tools.application_id
      outputParameters:
      - type: object
        mapping: $.
    - name: associate-graphs
      description: Associate graphs
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: writer-template.put
      with:
        application_id: tools.application_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-all-jobs
      description: Retrieve all jobs
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: writer-template.get
      with:
        application_id: tools.application_id
        status: tools.status
        offset: tools.offset
        limit: tools.limit
      outputParameters:
      - type: object
        mapping: $.
    - name: generate-application-async
      description: Generate from application (async)
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: writer-template.post
      with:
        application_id: tools.application_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.