osisoft-pi · Capability

OSIsoft PI Web API

OSIsoft PI Web API (now part of AVEVA) provides a REST interface for accessing the PI System process historian. APIs enable real-time and historical time-series data retrieval, event frame queries, asset framework hierarchy navigation, and calculated data for industrial process monitoring.

Run with Naftiko OsisoftPiAPI

What You Can Do

GET
Listdataservers — List PI Data Archive servers
/dataservers
GET
Listpipoints — List PI points on a server
/dataservers/{webId}/points
GET
Getpipoint — Get a PI point
/points/{webId}
GET
Getstreamvalue — Get current stream value
/streams/{webId}/value
GET
Getstreamrecorded — Get recorded stream values
/streams/{webId}/recorded
GET
Getstreaminterpolated — Get interpolated stream values
/streams/{webId}/interpolated
GET
Getstreamsummary — Get stream summary statistics
/streams/{webId}/summary
GET
Listassetservers — List Asset Framework servers
/assetservers
GET
Listelements — List AF elements
/assetdatabases/{webId}/elements
GET
Listattributes — List element attributes
/elements/{webId}/attributes
GET
Listeventframes — Query event frames
/eventframes
POST
Executebatch — Execute a batch request
/batch

MCP Tools

listdataservers

List PI Data Archive servers

read-only idempotent
listpipoints

List PI points on a server

read-only idempotent
getpipoint

Get a PI point

read-only idempotent
getstreamvalue

Get current stream value

read-only idempotent
getstreamrecorded

Get recorded stream values

read-only idempotent
getstreaminterpolated

Get interpolated stream values

read-only idempotent
getstreamsummary

Get stream summary statistics

read-only idempotent
listassetservers

List Asset Framework servers

read-only idempotent
listelements

List AF elements

read-only idempotent
listattributes

List element attributes

read-only idempotent
listeventframes

Query event frames

read-only idempotent
executebatch

Execute a batch request

Capability Spec

osisoft-pi-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: OSIsoft PI Web API
  description: OSIsoft PI Web API (now part of AVEVA) provides a REST interface for accessing the PI System process historian.
    APIs enable real-time and historical time-series data retrieval, event frame queries, asset framework hierarchy navigation,
    and calculated data for industrial process monitoring.
  tags:
  - Osisoft
  - Pi
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: osisoft-pi
    baseUri: https://piwebapi.example.com/piwebapi
    description: OSIsoft PI Web API HTTP API.
    authentication:
      type: basic
      username: '{{OSISOFT_PI_USERNAME}}'
      password: '{{OSISOFT_PI_PASSWORD}}'
    resources:
    - name: dataservers
      path: /dataservers
      operations:
      - name: listdataservers
        method: GET
        description: List PI Data Archive servers
        inputParameters:
        - name: selectedFields
          in: query
          type: string
          description: Comma-separated list of fields to return
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: dataservers-webid-points
      path: /dataservers/{webId}/points
      operations:
      - name: listpipoints
        method: GET
        description: List PI points on a server
        inputParameters:
        - name: nameFilter
          in: query
          type: string
          description: Wildcard filter for tag names (e.g. *.FLOW)
        - name: type
          in: query
          type: string
          description: Filter by point type
        - name: maxCount
          in: query
          type: integer
        - name: startIndex
          in: query
          type: integer
        - name: selectedFields
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: points-webid
      path: /points/{webId}
      operations:
      - name: getpipoint
        method: GET
        description: Get a PI point
        inputParameters:
        - name: selectedFields
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: streams-webid-value
      path: /streams/{webId}/value
      operations:
      - name: getstreamvalue
        method: GET
        description: Get current stream value
        inputParameters:
        - name: desiredUnits
          in: query
          type: string
          description: Unit of measure for the returned value
        - name: selectedFields
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: streams-webid-recorded
      path: /streams/{webId}/recorded
      operations:
      - name: getstreamrecorded
        method: GET
        description: Get recorded stream values
        inputParameters:
        - name: startTime
          in: query
          type: string
          description: Start time (absolute or relative, e.g. "*-1d" or "2026-03-01T00:00:00Z")
        - name: endTime
          in: query
          type: string
          description: End time
        - name: boundaryType
          in: query
          type: string
        - name: maxCount
          in: query
          type: integer
        - name: desiredUnits
          in: query
          type: string
        - name: selectedFields
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: streams-webid-interpolated
      path: /streams/{webId}/interpolated
      operations:
      - name: getstreaminterpolated
        method: GET
        description: Get interpolated stream values
        inputParameters:
        - name: startTime
          in: query
          type: string
        - name: endTime
          in: query
          type: string
        - name: interval
          in: query
          type: string
          description: Interval between values (e.g. "1h", "5m")
        - name: desiredUnits
          in: query
          type: string
        - name: maxCount
          in: query
          type: integer
        - name: selectedFields
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: streams-webid-summary
      path: /streams/{webId}/summary
      operations:
      - name: getstreamsummary
        method: GET
        description: Get stream summary statistics
        inputParameters:
        - name: startTime
          in: query
          type: string
        - name: endTime
          in: query
          type: string
        - name: summaryType
          in: query
          type: string
          description: Comma-separated summary types
        - name: calculationBasis
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: assetservers
      path: /assetservers
      operations:
      - name: listassetservers
        method: GET
        description: List Asset Framework servers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: assetdatabases-webid-elements
      path: /assetdatabases/{webId}/elements
      operations:
      - name: listelements
        method: GET
        description: List AF elements
        inputParameters:
        - name: nameFilter
          in: query
          type: string
        - name: templateName
          in: query
          type: string
        - name: maxCount
          in: query
          type: integer
        - name: selectedFields
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: elements-webid-attributes
      path: /elements/{webId}/attributes
      operations:
      - name: listattributes
        method: GET
        description: List element attributes
        inputParameters:
        - name: nameFilter
          in: query
          type: string
        - name: selectedFields
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: eventframes
      path: /eventframes
      operations:
      - name: listeventframes
        method: GET
        description: Query event frames
        inputParameters:
        - name: databaseWebId
          in: query
          type: string
          required: true
          description: AF database WebId to search
        - name: startTime
          in: query
          type: string
        - name: endTime
          in: query
          type: string
        - name: nameFilter
          in: query
          type: string
        - name: templateName
          in: query
          type: string
        - name: maxCount
          in: query
          type: integer
        - name: selectedFields
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: batch
      path: /batch
      operations:
      - name: executebatch
        method: POST
        description: Execute a batch request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: osisoft-pi-rest
    description: REST adapter for OSIsoft PI Web API.
    resources:
    - path: /dataservers
      name: listdataservers
      operations:
      - method: GET
        name: listdataservers
        description: List PI Data Archive servers
        call: osisoft-pi.listdataservers
        outputParameters:
        - type: object
          mapping: $.
    - path: /dataservers/{webId}/points
      name: listpipoints
      operations:
      - method: GET
        name: listpipoints
        description: List PI points on a server
        call: osisoft-pi.listpipoints
        outputParameters:
        - type: object
          mapping: $.
    - path: /points/{webId}
      name: getpipoint
      operations:
      - method: GET
        name: getpipoint
        description: Get a PI point
        call: osisoft-pi.getpipoint
        outputParameters:
        - type: object
          mapping: $.
    - path: /streams/{webId}/value
      name: getstreamvalue
      operations:
      - method: GET
        name: getstreamvalue
        description: Get current stream value
        call: osisoft-pi.getstreamvalue
        outputParameters:
        - type: object
          mapping: $.
    - path: /streams/{webId}/recorded
      name: getstreamrecorded
      operations:
      - method: GET
        name: getstreamrecorded
        description: Get recorded stream values
        call: osisoft-pi.getstreamrecorded
        outputParameters:
        - type: object
          mapping: $.
    - path: /streams/{webId}/interpolated
      name: getstreaminterpolated
      operations:
      - method: GET
        name: getstreaminterpolated
        description: Get interpolated stream values
        call: osisoft-pi.getstreaminterpolated
        outputParameters:
        - type: object
          mapping: $.
    - path: /streams/{webId}/summary
      name: getstreamsummary
      operations:
      - method: GET
        name: getstreamsummary
        description: Get stream summary statistics
        call: osisoft-pi.getstreamsummary
        outputParameters:
        - type: object
          mapping: $.
    - path: /assetservers
      name: listassetservers
      operations:
      - method: GET
        name: listassetservers
        description: List Asset Framework servers
        call: osisoft-pi.listassetservers
        outputParameters:
        - type: object
          mapping: $.
    - path: /assetdatabases/{webId}/elements
      name: listelements
      operations:
      - method: GET
        name: listelements
        description: List AF elements
        call: osisoft-pi.listelements
        outputParameters:
        - type: object
          mapping: $.
    - path: /elements/{webId}/attributes
      name: listattributes
      operations:
      - method: GET
        name: listattributes
        description: List element attributes
        call: osisoft-pi.listattributes
        outputParameters:
        - type: object
          mapping: $.
    - path: /eventframes
      name: listeventframes
      operations:
      - method: GET
        name: listeventframes
        description: Query event frames
        call: osisoft-pi.listeventframes
        outputParameters:
        - type: object
          mapping: $.
    - path: /batch
      name: executebatch
      operations:
      - method: POST
        name: executebatch
        description: Execute a batch request
        call: osisoft-pi.executebatch
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: osisoft-pi-mcp
    transport: http
    description: MCP adapter for OSIsoft PI Web API for AI agent use.
    tools:
    - name: listdataservers
      description: List PI Data Archive servers
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.listdataservers
      with:
        selectedFields: tools.selectedFields
      inputParameters:
      - name: selectedFields
        type: string
        description: Comma-separated list of fields to return
      outputParameters:
      - type: object
        mapping: $.
    - name: listpipoints
      description: List PI points on a server
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.listpipoints
      with:
        nameFilter: tools.nameFilter
        type: tools.type
        maxCount: tools.maxCount
        startIndex: tools.startIndex
        selectedFields: tools.selectedFields
      inputParameters:
      - name: nameFilter
        type: string
        description: Wildcard filter for tag names (e.g. *.FLOW)
      - name: type
        type: string
        description: Filter by point type
      - name: maxCount
        type: integer
        description: maxCount
      - name: startIndex
        type: integer
        description: startIndex
      - name: selectedFields
        type: string
        description: selectedFields
      outputParameters:
      - type: object
        mapping: $.
    - name: getpipoint
      description: Get a PI point
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.getpipoint
      with:
        selectedFields: tools.selectedFields
      inputParameters:
      - name: selectedFields
        type: string
        description: selectedFields
      outputParameters:
      - type: object
        mapping: $.
    - name: getstreamvalue
      description: Get current stream value
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.getstreamvalue
      with:
        desiredUnits: tools.desiredUnits
        selectedFields: tools.selectedFields
      inputParameters:
      - name: desiredUnits
        type: string
        description: Unit of measure for the returned value
      - name: selectedFields
        type: string
        description: selectedFields
      outputParameters:
      - type: object
        mapping: $.
    - name: getstreamrecorded
      description: Get recorded stream values
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.getstreamrecorded
      with:
        startTime: tools.startTime
        endTime: tools.endTime
        boundaryType: tools.boundaryType
        maxCount: tools.maxCount
        desiredUnits: tools.desiredUnits
        selectedFields: tools.selectedFields
      inputParameters:
      - name: startTime
        type: string
        description: Start time (absolute or relative, e.g. "*-1d" or "2026-03-01T00:00:00Z")
      - name: endTime
        type: string
        description: End time
      - name: boundaryType
        type: string
        description: boundaryType
      - name: maxCount
        type: integer
        description: maxCount
      - name: desiredUnits
        type: string
        description: desiredUnits
      - name: selectedFields
        type: string
        description: selectedFields
      outputParameters:
      - type: object
        mapping: $.
    - name: getstreaminterpolated
      description: Get interpolated stream values
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.getstreaminterpolated
      with:
        startTime: tools.startTime
        endTime: tools.endTime
        interval: tools.interval
        desiredUnits: tools.desiredUnits
        maxCount: tools.maxCount
        selectedFields: tools.selectedFields
      inputParameters:
      - name: startTime
        type: string
        description: startTime
      - name: endTime
        type: string
        description: endTime
      - name: interval
        type: string
        description: Interval between values (e.g. "1h", "5m")
      - name: desiredUnits
        type: string
        description: desiredUnits
      - name: maxCount
        type: integer
        description: maxCount
      - name: selectedFields
        type: string
        description: selectedFields
      outputParameters:
      - type: object
        mapping: $.
    - name: getstreamsummary
      description: Get stream summary statistics
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.getstreamsummary
      with:
        startTime: tools.startTime
        endTime: tools.endTime
        summaryType: tools.summaryType
        calculationBasis: tools.calculationBasis
      inputParameters:
      - name: startTime
        type: string
        description: startTime
      - name: endTime
        type: string
        description: endTime
      - name: summaryType
        type: string
        description: Comma-separated summary types
      - name: calculationBasis
        type: string
        description: calculationBasis
      outputParameters:
      - type: object
        mapping: $.
    - name: listassetservers
      description: List Asset Framework servers
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.listassetservers
      outputParameters:
      - type: object
        mapping: $.
    - name: listelements
      description: List AF elements
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.listelements
      with:
        nameFilter: tools.nameFilter
        templateName: tools.templateName
        maxCount: tools.maxCount
        selectedFields: tools.selectedFields
      inputParameters:
      - name: nameFilter
        type: string
        description: nameFilter
      - name: templateName
        type: string
        description: templateName
      - name: maxCount
        type: integer
        description: maxCount
      - name: selectedFields
        type: string
        description: selectedFields
      outputParameters:
      - type: object
        mapping: $.
    - name: listattributes
      description: List element attributes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.listattributes
      with:
        nameFilter: tools.nameFilter
        selectedFields: tools.selectedFields
      inputParameters:
      - name: nameFilter
        type: string
        description: nameFilter
      - name: selectedFields
        type: string
        description: selectedFields
      outputParameters:
      - type: object
        mapping: $.
    - name: listeventframes
      description: Query event frames
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: osisoft-pi.listeventframes
      with:
        databaseWebId: tools.databaseWebId
        startTime: tools.startTime
        endTime: tools.endTime
        nameFilter: tools.nameFilter
        templateName: tools.templateName
        maxCount: tools.maxCount
        selectedFields: tools.selectedFields
      inputParameters:
      - name: databaseWebId
        type: string
        description: AF database WebId to search
        required: true
      - name: startTime
        type: string
        description: startTime
      - name: endTime
        type: string
        description: endTime
      - name: nameFilter
        type: string
        description: nameFilter
      - name: templateName
        type: string
        description: templateName
      - name: maxCount
        type: integer
        description: maxCount
      - name: selectedFields
        type: string
        description: selectedFields
      outputParameters:
      - type: object
        mapping: $.
    - name: executebatch
      description: Execute a batch request
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: osisoft-pi.executebatch
      outputParameters:
      - type: object
        mapping: $.
binds:
- namespace: env
  keys:
    OSISOFT_PI_USERNAME: OSISOFT_PI_USERNAME
    OSISOFT_PI_PASSWORD: OSISOFT_PI_PASSWORD