SAS Institute · Capability

SAS Viya REST API — Jobs

SAS Viya REST API — Jobs. 3 operations. Lead operation: List Jobs. Self-contained Naftiko capability covering one Sas business surface.

Run with Naftiko SasJobs

What You Can Do

GET
Listjobs — List Jobs
/v1/jobexecution/jobs
POST
Createjob — Create Job
/v1/jobexecution/jobs
GET
Getjob — Get Job
/v1/jobexecution/jobs/{id}

MCP Tools

list-jobs

List Jobs

read-only idempotent
create-job

Create Job

get-job

Get Job

read-only idempotent

Capability Spec

viya-rest-jobs.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: SAS Viya REST API — Jobs
  description: 'SAS Viya REST API — Jobs. 3 operations. Lead operation: List Jobs. Self-contained Naftiko capability covering
    one Sas business surface.'
  tags:
  - Sas
  - Jobs
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SAS_API_KEY: SAS_API_KEY
capability:
  consumes:
  - type: http
    namespace: viya-rest-jobs
    baseUri: https://{viya-host}
    description: SAS Viya REST API — Jobs business capability. Self-contained, no shared references.
    resources:
    - name: jobExecution-jobs
      path: /jobExecution/jobs
      operations:
      - name: listjobs
        method: GET
        description: List Jobs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createjob
        method: POST
        description: Create Job
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: jobExecution-jobs-id
      path: /jobExecution/jobs/{id}
      operations:
      - name: getjob
        method: GET
        description: Get Job
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.SAS_API_KEY}}'
  exposes:
  - type: rest
    namespace: viya-rest-jobs-rest
    port: 8080
    description: REST adapter for SAS Viya REST API — Jobs. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/jobexecution/jobs
      name: jobexecution-jobs
      description: REST surface for jobExecution-jobs.
      operations:
      - method: GET
        name: listjobs
        description: List Jobs
        call: viya-rest-jobs.listjobs
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createjob
        description: Create Job
        call: viya-rest-jobs.createjob
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/jobexecution/jobs/{id}
      name: jobexecution-jobs-id
      description: REST surface for jobExecution-jobs-id.
      operations:
      - method: GET
        name: getjob
        description: Get Job
        call: viya-rest-jobs.getjob
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: viya-rest-jobs-mcp
    port: 9090
    transport: http
    description: MCP adapter for SAS Viya REST API — Jobs. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-jobs
      description: List Jobs
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: viya-rest-jobs.listjobs
      outputParameters:
      - type: object
        mapping: $.
    - name: create-job
      description: Create Job
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: viya-rest-jobs.createjob
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-job
      description: Get Job
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: viya-rest-jobs.getjob
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.