Evaluation segments reference
Method signatures, parameters, responses and examples for evaluation segments.
Use a configured server-side nirmos client from the quickstart. See the evaluations guide for prerequisites and workflows. Example IDs and configured model names are placeholders; replace them with organization-visible resources before executing. Mutating calls change live resources.
HTTP calls reject with APIError subclasses on unsuccessful HTTP responses and may throw NetworkError, TimeoutError or RequestAbortedError. Signatures describe SDK values after response decoding; they are not raw HTTP envelopes. Backend validation, permissions and feature availability remain authoritative.
Some responses use broad recursive domain DTOs. This page omits their unrelated optional fields and provides endpoint-specific views where verified. Optional permits absence; nullable permits explicit null. Validate IDs before reuse. Tightening exported schemas is separate implementation work.
| Method | Transport |
|---|---|
evaluations.segments.create | Control plane |
evaluations.segments.update | Control plane |
evaluations.segments.delete | Control plane |
evaluations.segments.create
Create Segment
Control plane: POST /v1/evaluations/segments.
Credentials: Personal or service API key with the required grants.
Required permission: evaluation:create.
REST endpoint, security and schemas · Related guide
Types: Requests · RequestOptions · Responses
nirmos.evaluations.segments.create(
body: Requests["createSegment"],
options?: RequestOptions | undefined
): Promise<Responses["createSegment"]>| Parameter | Required | Type / default |
|---|---|---|
body | Yes | Requests["createSegment"] |
options | No | RequestOptions | undefined |
Request fields
| Field | Required | Type |
|---|---|---|
name | Yes | string |
description | No | string | undefined |
critical | No | boolean | undefined |
criteria | Yes | Requests["createSegment"]["criteria"] |
suiteId | Yes | string |
Returns: Responses["createSegment"].
Use the linked feature workflow for this response. Unrelated optional fields in the broad SDK declaration are not endpoint guarantees.
Behavior: criteria is a simple {field, operator, value?} or {operator: AND|OR, rules: [...]} group of 1–20 simple rules. field must be a declared bare dataset column key such as topic. Case tags and metadata paths are not exposed consistently by management validation; see evaluation configuration contracts.
Example
const result = await nirmos.evaluations.segments.create({
"suiteId": "suite-id",
"name": "Cities",
"critical": false,
"criteria": {
"field": "topic",
"operator": "equals",
"value": "cities"
}
});evaluations.segments.update
Update Segment
Control plane: PATCH /v1/evaluations/segments/:id.
Credentials: Personal or service API key with the required grants.
Required permission: evaluation:update.
REST endpoint, security and schemas · Related guide
Types: Requests · RequestOptions · Responses
nirmos.evaluations.segments.update(
id: string,
body: Requests["updateSegment"],
options?: RequestOptions | undefined
): Promise<Responses["updateSegment"]>| Parameter | Required | Type / default |
|---|---|---|
id | Yes | string |
body | Yes | Requests["updateSegment"] |
options | No | RequestOptions | undefined |
Request fields
| Field | Required | Type |
|---|---|---|
name | No | string | undefined |
description | No | string | undefined |
critical | No | boolean | undefined |
criteria | No | Requests["updateSegment"]["criteria"] |
Returns: Responses["updateSegment"].
Use the linked feature workflow for this response. Unrelated optional fields in the broad SDK declaration are not endpoint guarantees.
Example
const result = await nirmos.evaluations.segments.update("segment-id", {
"criteria": {
"field": "topic",
"operator": "equals",
"value": "cities"
}
});evaluations.segments.delete
Delete Segment
Control plane: DELETE /v1/evaluations/segments/:id.
Credentials: Personal or service API key with the required grants.
Required permission: evaluation:delete.
REST endpoint, security and schemas · Related guide
Types: RequestOptions · Responses
nirmos.evaluations.segments.delete(
id: string,
options?: RequestOptions | undefined
): Promise<Responses["deleteSegment"]>| Parameter | Required | Type / default |
|---|---|---|
id | Yes | string |
options | No | RequestOptions | undefined |
Returns: Responses["deleteSegment"].
Use the linked feature workflow for this response. Unrelated optional fields in the broad SDK declaration are not endpoint guarantees.
Example
const result = await nirmos.evaluations.segments.delete("resource-id");