BJS NCVS API — NCVS

BJS NCVS API — NCVS. 2 operations. Lead operation: Get NCVS dataset as CSV. Self-contained Naftiko capability covering one Data Analysis Tools Bureau Of Justice Statistics business surface.

Run with Naftiko Data Analysis Tools Bureau Of Justice StatisticsNCVS

What You Can Do

GET
Getncvsdatasetcsv — Get NCVS dataset as CSV
/v1/resource/datasetid-csv
GET
Getncvsdatasetjson — Get NCVS dataset as JSON
/v1/resource/datasetid-json

MCP Tools

get-ncvs-dataset-csv

Get NCVS dataset as CSV

read-only idempotent
get-ncvs-dataset-json

Get NCVS dataset as JSON

read-only idempotent

Capability Spec

bjs-ncvs-ncvs.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: BJS NCVS API — NCVS
  description: 'BJS NCVS API — NCVS. 2 operations. Lead operation: Get NCVS dataset as CSV. Self-contained Naftiko capability
    covering one Data Analysis Tools Bureau Of Justice Statistics business surface.'
  tags:
  - Data Analysis Tools Bureau Of Justice Statistics
  - NCVS
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DATA_ANALYSIS_TOOLS_BUREAU_OF_JUSTICE_STATISTICS_API_KEY: DATA_ANALYSIS_TOOLS_BUREAU_OF_JUSTICE_STATISTICS_API_KEY
capability:
  consumes:
  - type: http
    namespace: bjs-ncvs-ncvs
    baseUri: https://api.ojp.gov/bjsdataset/v1
    description: BJS NCVS API — NCVS business capability. Self-contained, no shared references.
    resources:
    - name: resource-datasetId}.csv
      path: /resource/{datasetId}.csv
      operations:
      - name: getncvsdatasetcsv
        method: GET
        description: Get NCVS dataset as CSV
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: datasetId
          in: path
          type: string
          required: true
        - name: $select
          in: query
          type: string
        - name: $where
          in: query
          type: string
        - name: $limit
          in: query
          type: integer
    - name: resource-datasetId}.json
      path: /resource/{datasetId}.json
      operations:
      - name: getncvsdatasetjson
        method: GET
        description: Get NCVS dataset as JSON
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: datasetId
          in: path
          type: string
          description: The four-character Socrata dataset identifier.
          required: true
        - name: $select
          in: query
          type: string
          description: SoQL select clause; comma-separated list of columns or aggregations.
        - name: $where
          in: query
          type: string
          description: SoQL where clause filtering rows.
        - name: $order
          in: query
          type: string
          description: SoQL order clause.
        - name: $group
          in: query
          type: string
          description: SoQL group clause.
        - name: $limit
          in: query
          type: integer
          description: Maximum rows to return.
        - name: $offset
          in: query
          type: integer
        - name: $q
          in: query
          type: string
          description: Full-text search across all string fields.
    authentication:
      type: apikey
      key: X-App-Token
      value: '{{env.DATA_ANALYSIS_TOOLS_BUREAU_OF_JUSTICE_STATISTICS_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: bjs-ncvs-ncvs-rest
    port: 8080
    description: REST adapter for BJS NCVS API — NCVS. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/resource/datasetid-csv
      name: resource-datasetid-csv
      description: REST surface for resource-datasetId}.csv.
      operations:
      - method: GET
        name: getncvsdatasetcsv
        description: Get NCVS dataset as CSV
        call: bjs-ncvs-ncvs.getncvsdatasetcsv
        with:
          datasetId: rest.datasetId
          $select: rest.$select
          $where: rest.$where
          $limit: rest.$limit
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/resource/datasetid-json
      name: resource-datasetid-json
      description: REST surface for resource-datasetId}.json.
      operations:
      - method: GET
        name: getncvsdatasetjson
        description: Get NCVS dataset as JSON
        call: bjs-ncvs-ncvs.getncvsdatasetjson
        with:
          datasetId: rest.datasetId
          $select: rest.$select
          $where: rest.$where
          $order: rest.$order
          $group: rest.$group
          $limit: rest.$limit
          $offset: rest.$offset
          $q: rest.$q
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: bjs-ncvs-ncvs-mcp
    port: 9090
    transport: http
    description: MCP adapter for BJS NCVS API — NCVS. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-ncvs-dataset-csv
      description: Get NCVS dataset as CSV
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bjs-ncvs-ncvs.getncvsdatasetcsv
      with:
        datasetId: tools.datasetId
        $select: tools.$select
        $where: tools.$where
        $limit: tools.$limit
      outputParameters:
      - type: object
        mapping: $.
    - name: get-ncvs-dataset-json
      description: Get NCVS dataset as JSON
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bjs-ncvs-ncvs.getncvsdatasetjson
      with:
        datasetId: tools.datasetId
        $select: tools.$select
        $where: tools.$where
        $order: tools.$order
        $group: tools.$group
        $limit: tools.$limit
        $offset: tools.$offset
        $q: tools.$q
      outputParameters:
      - type: object
        mapping: $.