SAP · Capability

SAP Business One Service Layer API — Authentication

SAP Business One Service Layer API — Authentication. 2 operations. Lead operation: Sap Authenticate and Create a Session. Self-contained Naftiko capability covering one Sap business surface.

Run with Naftiko SapAuthentication

What You Can Do

POST
Login — Sap Authenticate and Create a Session
/v1/login
POST
Logout — Sap End the Current Session
/v1/logout

MCP Tools

sap-authenticate-and-create-session

Sap Authenticate and Create a Session

sap-end-current-session

Sap End the Current Session

Capability Spec

business-one-service-layer-authentication.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: SAP Business One Service Layer API — Authentication
  description: 'SAP Business One Service Layer API — Authentication. 2 operations. Lead operation: Sap Authenticate and Create
    a Session. Self-contained Naftiko capability covering one Sap business surface.'
  tags:
  - Sap
  - Authentication
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SAP_API_KEY: SAP_API_KEY
capability:
  consumes:
  - type: http
    namespace: business-one-service-layer-authentication
    baseUri: https://{server}:50000/b1s/v1
    description: SAP Business One Service Layer API — Authentication business capability. Self-contained, no shared references.
    resources:
    - name: Login
      path: /Login
      operations:
      - name: login
        method: POST
        description: Sap Authenticate and Create a Session
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: Logout
      path: /Logout
      operations:
      - name: logout
        method: POST
        description: Sap End the Current Session
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: B1SESSION
      value: '{{env.SAP_API_KEY}}'
      placement: cookie
  exposes:
  - type: rest
    namespace: business-one-service-layer-authentication-rest
    port: 8080
    description: REST adapter for SAP Business One Service Layer API — Authentication. One Spectral-compliant resource per
      consumed operation, prefixed with /v1.
    resources:
    - path: /v1/login
      name: login
      description: REST surface for Login.
      operations:
      - method: POST
        name: login
        description: Sap Authenticate and Create a Session
        call: business-one-service-layer-authentication.login
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/logout
      name: logout
      description: REST surface for Logout.
      operations:
      - method: POST
        name: logout
        description: Sap End the Current Session
        call: business-one-service-layer-authentication.logout
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: business-one-service-layer-authentication-mcp
    port: 9090
    transport: http
    description: MCP adapter for SAP Business One Service Layer API — Authentication. One tool per consumed operation, routed
      inline through this capability's consumes block.
    tools:
    - name: sap-authenticate-and-create-session
      description: Sap Authenticate and Create a Session
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: business-one-service-layer-authentication.login
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: sap-end-current-session
      description: Sap End the Current Session
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: business-one-service-layer-authentication.logout
      outputParameters:
      - type: object
        mapping: $.