---
title: "Create module"
method: POST
path: "/api/createModule"
tags: ["module"]
---

# Create module

`POST /api/createModule`

Store module data into SQLite database

## Request body

- HttpCreateModuleReq
  - `ebpf` EbpfProgram
    - `code` string
    - `fmt` 0 | 1
    - `lang` 0 | 1
    - `perf_buffer_name` string
    - `probes` EbpfProbeSpec[]
      - `binary_path` string
      - `entry` string
      - `return` string
      - `sample_period_nanos` integer
      - `target` string
      - `type` 0 | 1 | 2 | 3 | 4 | 5 | 6
  - `id` string
  - `name` string
  - `wasm` WasmProgram
    - `code` integer[]
    - `fmt` 0 | 1
    - `fn_name` string
    - `lang` 0 | 1
    - `output_schema` CommonSchema
      - `fields` CommonDataField[]
        - `name` string
        - `type` 0 | 1 | 2 | 3 | 4 | 5 | 6
      - `name` string

## Response `200`

OK

- HttpCreateModuleResp
  - `code` integer — Semantic and usage follow HTTP statues code convention. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
  - `message` string — A human readable message explain the details of the status.

---

[API](https://skmtc.dev/tricorder-observability/apis/untitled-api.md) · [All operations](https://skmtc.dev/tricorder-observability/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tricorder-observability/untitled-api/revisions/2a0bad9ea452/schema)
