Marketo · Capability

Marketo Engage Rest API — Files

Marketo Engage Rest API — Files. 4 operations. Lead operation: Marketo Get File by Name. Self-contained Naftiko capability covering one Marketo business surface.

Run with Naftiko MarketoFiles

What You Can Do

GET
Getfilebynameusingget — Marketo Get File by Name
/v1/asset/v1/file/byname-json
GET
Getfilebyidusingget — Marketo Get File by Id
/v1/asset/v1/file/id-json
GET
Getfilesusingget — Marketo Get Files
/v1/asset/v1/files-json
POST
Createfileusingpost — Marketo Create File
/v1/asset/v1/files-json

MCP Tools

marketo-get-file-name

Marketo Get File by Name

read-only idempotent
marketo-get-file-id

Marketo Get File by Id

read-only idempotent
marketo-get-files

Marketo Get Files

read-only idempotent
marketo-create-file

Marketo Create File

Capability Spec

engage-rest-files.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Marketo Engage Rest API — Files
  description: 'Marketo Engage Rest API — Files. 4 operations. Lead operation: Marketo Get File by Name. Self-contained Naftiko
    capability covering one Marketo business surface.'
  tags:
  - Marketo
  - Files
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MARKETO_API_KEY: MARKETO_API_KEY
capability:
  consumes:
  - type: http
    namespace: engage-rest-files
    baseUri: https://localhost:8080
    description: Marketo Engage Rest API — Files business capability. Self-contained, no shared references.
    resources:
    - name: rest-asset-v1-file-byName.json
      path: /rest/asset/v1/file/byName.json
      operations:
      - name: getfilebynameusingget
        method: GET
        description: Marketo Get File by Name
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: query
          type: string
          description: Name of the file
          required: true
    - name: rest-asset-v1-file-id}.json
      path: /rest/asset/v1/file/{id}.json
      operations:
      - name: getfilebyidusingget
        method: GET
        description: Marketo Get File by Id
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Id for file in database
          required: true
    - name: rest-asset-v1-files.json
      path: /rest/asset/v1/files.json
      operations:
      - name: getfilesusingget
        method: GET
        description: Marketo Get Files
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: folder
          in: query
          type: string
          description: JSON representation of parent folder, with members 'id', and 'type' which may be 'Folder' or 'Program'
        - name: offset
          in: query
          type: integer
          description: Integer offset for paging. Default 0
        - name: maxReturn
          in: query
          type: integer
          description: Maximum number of files to return. Max 200, default 20
      - name: createfileusingpost
        method: POST
        description: Marketo Create File
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
  exposes:
  - type: rest
    namespace: engage-rest-files-rest
    port: 8080
    description: REST adapter for Marketo Engage Rest API — Files. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/asset/v1/file/byname-json
      name: rest-asset-v1-file-byname-json
      description: REST surface for rest-asset-v1-file-byName.json.
      operations:
      - method: GET
        name: getfilebynameusingget
        description: Marketo Get File by Name
        call: engage-rest-files.getfilebynameusingget
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/asset/v1/file/id-json
      name: rest-asset-v1-file-id-json
      description: REST surface for rest-asset-v1-file-id}.json.
      operations:
      - method: GET
        name: getfilebyidusingget
        description: Marketo Get File by Id
        call: engage-rest-files.getfilebyidusingget
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/asset/v1/files-json
      name: rest-asset-v1-files-json
      description: REST surface for rest-asset-v1-files.json.
      operations:
      - method: GET
        name: getfilesusingget
        description: Marketo Get Files
        call: engage-rest-files.getfilesusingget
        with:
          folder: rest.folder
          offset: rest.offset
          maxReturn: rest.maxReturn
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createfileusingpost
        description: Marketo Create File
        call: engage-rest-files.createfileusingpost
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: engage-rest-files-mcp
    port: 9090
    transport: http
    description: MCP adapter for Marketo Engage Rest API — Files. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: marketo-get-file-name
      description: Marketo Get File by Name
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: engage-rest-files.getfilebynameusingget
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.
    - name: marketo-get-file-id
      description: Marketo Get File by Id
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: engage-rest-files.getfilebyidusingget
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: marketo-get-files
      description: Marketo Get Files
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: engage-rest-files.getfilesusingget
      with:
        folder: tools.folder
        offset: tools.offset
        maxReturn: tools.maxReturn
      outputParameters:
      - type: object
        mapping: $.
    - name: marketo-create-file
      description: Marketo Create File
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: engage-rest-files.createfileusingpost
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.