osisoft-pi · Capability

OSIsoft PI Web API — Elements

OSIsoft PI Web API — Elements. 1 operations. Lead operation: List AF elements. Self-contained Naftiko capability covering one Osisoft Pi business surface.

Run with Naftiko Osisoft PiElements

What You Can Do

GET
Listelements — List AF elements
/v1/assetdatabases/{webid}/elements

MCP Tools

list-af-elements

List AF elements

read-only idempotent

Capability Spec

web-elements.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: OSIsoft PI Web API — Elements
  description: 'OSIsoft PI Web API — Elements. 1 operations. Lead operation: List AF elements. Self-contained Naftiko capability
    covering one Osisoft Pi business surface.'
  tags:
  - Osisoft Pi
  - Elements
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    OSISOFT_PI_API_KEY: OSISOFT_PI_API_KEY
capability:
  consumes:
  - type: http
    namespace: web-elements
    baseUri: https://{piwebapi_host}/piwebapi
    description: OSIsoft PI Web API — Elements business capability. Self-contained, no shared references.
    resources:
    - name: assetdatabases-webId-elements
      path: /assetdatabases/{webId}/elements
      operations:
      - name: listelements
        method: GET
        description: List AF elements
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        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
    authentication:
      type: basic
      username: '{{env.OSISOFT_PI_USER}}'
      password: '{{env.OSISOFT_PI_PASS}}'
  exposes:
  - type: rest
    namespace: web-elements-rest
    port: 8080
    description: REST adapter for OSIsoft PI Web API — Elements. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/assetdatabases/{webid}/elements
      name: assetdatabases-webid-elements
      description: REST surface for assetdatabases-webId-elements.
      operations:
      - method: GET
        name: listelements
        description: List AF elements
        call: web-elements.listelements
        with:
          nameFilter: rest.nameFilter
          templateName: rest.templateName
          maxCount: rest.maxCount
          selectedFields: rest.selectedFields
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: web-elements-mcp
    port: 9090
    transport: http
    description: MCP adapter for OSIsoft PI Web API — Elements. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-af-elements
      description: List AF elements
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: web-elements.listelements
      with:
        nameFilter: tools.nameFilter
        templateName: tools.templateName
        maxCount: tools.maxCount
        selectedFields: tools.selectedFields
      outputParameters:
      - type: object
        mapping: $.