Skip to documentation
Weavers Docs

Pages and endpoints

Tab to navigate · Enter to openEsc to close

POST /api/eureka/notebooks/executions/:jobId/strategy-components

Account required · HTTP API reference

All endpoints · Authentication and retries · Download OpenAPI

  • Requires a signed-in account and permission to access this resource. Use identifiers returned by your own account's earlier requests.
  • The manifest must refer to the completed execution and its actual cell/source hash. Registering a component does not execute it.
  • Protected writes require an allowed Origin, the CSRF cookie and matching X-CSRF-Token header.

Request

ParameterLocationType and requirement
jobIdpathstring · required
Originheaderstring · required

An origin allowed by this deployment.

X-CSRF-Tokenheaderstring · required

Must match the CSRF cookie issued to this browser.

Body · application/json

schema required · "weavers.strategy_component.v1"
version required · 1
componentType required · "stage_a" | "stage_b"
componentKey required · string
label required · string
sourceKind required · "notebook_component"
notebookKey required · string
executionJobId required · null | string
View executionJobId model
Variant 1: null

null

Variant 2: string

string

cellId required · string
sourceSha256 required · string
createdAt required · string
interface required · object
View interface model
Variant 1: object
kind required · "stage_a"
input required · "weavers.ohlcv_panel.v1"
output required · "weavers.stage_a_signal_frame.v1"
timestampColumn required · string
symbolColumn required · string
signalColumn required · string
probabilityColumn optional · null | string
View probabilityColumn model
Variant 1: null

null

Variant 2: string

string

horizonBars optional · null | number
View horizonBars model
Variant 1: null

null

Variant 2: number

number

Variant 2: object
kind required · "stage_b"
input required · "weavers.stage_a_signal_frame.v1"
output required · "weavers.execution_policy.v1"
timestampColumn required · string
symbolColumn required · string
signalColumn required · string
policyConfigPath optional · null | string
View policyConfigPath model
Variant 1: null

null

Variant 2: string

string

requiredColumns optional · array of string
View requiredColumns model

Array items:

string

files required · array of object
View files model

Array items:

role required · "source" | "predictor" | "policy" | "metrics" | "plot" | "manifest" | "model" | "other"
path required · string
mediaType optional · string
bytes optional · number
metrics optional · object
View metrics model

Additional fields: number.

notes optional · string

Example

Examples use fictional data. Replace identifiers with resources you can access. For account requests, cookies.txt must contain your own session; set CSRF_TOKEN to the matching CSRF cookie value where required.

Save as request.json
{
  "schema": "weavers.strategy_component.v1",
  "version": 1,
  "componentType": "stage_a",
  "componentKey": "example-signal",
  "label": "Example signal",
  "sourceKind": "notebook_component",
  "notebookKey": "strategy-11111111-1111-4111-8111-111111111111",
  "executionJobId": "notebook-example",
  "cellId": "example-cell",
  "sourceSha256": "51a5983fa1333c582c710ed6131d2bc0d641866150cf23001603a4ae0685b173",
  "createdAt": "2025-01-01T00:00:00.000Z",
  "interface": {
    "kind": "stage_a",
    "input": "weavers.ohlcv_panel.v1",
    "output": "weavers.stage_a_signal_frame.v1",
    "timestampColumn": "timestamp",
    "symbolColumn": "symbol",
    "signalColumn": "signal"
  },
  "files": [
    {
      "role": "source",
      "path": "signal.py",
      "mediaType": "text/x-python",
      "bytes": 26
    }
  ]
}
cURL (POSIX shell)
curl --include \
  --request POST \
  'https://api.weavers.app/api/eureka/notebooks/executions/1/strategy-components' \
  --cookie cookies.txt --cookie-jar cookies.txt \
  --header 'Origin: https://weavers.app' \
  --header "X-CSRF-Token: ${CSRF_TOKEN}" \
  --header 'Content-Type: application/json' \
  --data-binary @request.json

Responses

202 · Work accepted. Poll the returned job or request identifier.

application/json

202 example · synthetic data
{
  "component": {
    "componentType": "stage_a",
    "componentKey": "example",
    "label": "Example research",
    "sourceKind": "weavers_preset",
    "trustStatus": "preset",
    "lifecycleStatus": "rejected",
    "executionJobId": null,
    "sourceSha256": null,
    "artifact": null,
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-01-01T00:00:00.000Z"
  }
}
View response model
component required · object
View component model
componentType required · "stage_a" | "stage_b"
componentKey required · string
label required · string
method optional · object
View method model
strategyLabel required · string
purpose required · string
task required · string
algorithm required · null | object
View algorithm model
Variant 1: null

null

Variant 2: object
id required · string
label required · string
family required · string

Additional fields: JSON values.

componentVersion required · null | string
View componentVersion model
Variant 1: null

null

Variant 2: string

string

Additional fields: JSON values.

sourceKind required · "weavers_preset" | "notebook_component" | "uploaded_component"
trustStatus required · "preset" | "unvalidated" | "optimisation_validated"
lifecycleStatus required · "rejected" | "candidate" | "promoted"
executionJobId required · null | string
View executionJobId model
Variant 1: null

null

Variant 2: string

string

sourceSha256 required · null | string
View sourceSha256 model
Variant 1: null

null

Variant 2: string

string

artifact required · null | object
View artifact model
Variant 1: null

null

Variant 2: object
schema required · "weavers.strategy_component.v1"
version required · 1
componentType required · "stage_a" | "stage_b"
componentKey required · string
label required · string
method optional · object
View method model
strategyLabel required · string
purpose required · string
task required · string
algorithm required · null | object
View algorithm model
Variant 1: null

null

Variant 2: object
id required · string
label required · string
family required · string

Additional fields: JSON values.

componentVersion required · null | string
View componentVersion model
Variant 1: null

null

Variant 2: string

string

Additional fields: JSON values.

sourceKind required · "notebook_component"
notebookKey required · string
executionJobId required · null | string
View executionJobId model
Variant 1: null

null

Variant 2: string

string

cellId required · string
cellIds optional · array of string
View cellIds model

Array items:

string

sourceSha256 required · string
createdAt required · string
interface required · object
View interface model
Variant 1: object
kind required · "stage_a"
input required · "weavers.ohlcv_panel.v1"
output required · "weavers.stage_a_signal_frame.v1"
timestampColumn required · string
symbolColumn required · string
signalColumn required · string
probabilityColumn optional · null | string
View probabilityColumn model
Variant 1: null

null

Variant 2: string

string

horizonBars optional · null | number
View horizonBars model
Variant 1: null

null

Variant 2: number

number

Additional fields: JSON values.

Variant 2: object
kind required · "stage_b"
input required · "weavers.stage_a_signal_frame.v1"
output required · "weavers.execution_policy.v1"
timestampColumn required · string
symbolColumn required · string
signalColumn required · string
policyConfigPath optional · null | string
View policyConfigPath model
Variant 1: null

null

Variant 2: string

string

requiredColumns optional · array of string
View requiredColumns model

Array items:

string

Additional fields: JSON values.

runtime optional · object
View runtime model
kind required · "python_source"
entrypoint required · "weavers_stage_a" | "weavers_stage_b"
source required · string
sourceSha256 required · string
selectedCellIds required · array of string
View selectedCellIds model

Array items:

string

Additional fields: JSON values.

files required · array of object
View files model

Array items:

role required · "source" | "predictor" | "policy" | "metrics" | "plot" | "manifest" | "model" | "other"
path required · string
mediaType optional · string
bytes optional · number

Additional fields: JSON values.

metrics optional · object
View metrics model

Additional fields: number.

notes optional · string

Additional fields: JSON values.

createdAt required · string
updatedAt required · string

Additional fields: JSON values.

Additional fields: JSON values.

400 · Invalid request.

application/json

400 example · synthetic data
{}
View response model

Error envelopes can include resource-specific details. Check the status before reading these fields.

error optional · string
code optional · string
message optional · string

Additional fields: JSON values.

401 · Authentication is missing or invalid.

application/json

401 example · synthetic data
{}
View response model

Error envelopes can include resource-specific details. Check the status before reading these fields.

error optional · string
code optional · string
message optional · string

Additional fields: JSON values.

403 · Permission, origin or CSRF check failed.

application/json

403 example · synthetic data
{}
View response model

Error envelopes can include resource-specific details. Check the status before reading these fields.

error optional · string
code optional · string
message optional · string

Additional fields: JSON values.

429 · Rate limit reached; honor Retry-After when supplied.

application/json

429 example · synthetic data
{}
View response model

Error envelopes can include resource-specific details. Check the status before reading these fields.

error optional · string
code optional · string
message optional · string

Additional fields: JSON values.

500 · Server failure.

application/json

500 example · synthetic data
{}
View response model

Error envelopes can include resource-specific details. Check the status before reading these fields.

error optional · string
code optional · string
message optional · string

Additional fields: JSON values.

default · Operation-specific error. Inspect error/code before deciding whether to retry.

application/json

default example · synthetic data
{
  "error": "example",
  "code": "example"
}
View response model
error required · string
code required · string

Additional fields: JSON values.