创建处理器预设

OpenAPI 契约

方法
POST
路径
/api/v1/processors
认证
jwtBearer (bearer) OR automationKey (bearer)
响应状态
201 400 401 403 404 409 429 500
请求与响应 Schema
JSON
{
  "requestBody": {
    "application/json": {
      "$ref": "#/components/schemas/CreateProcessorRequest"
    }
  },
  "responses": {
    "201": {
      "description": "Processor preset created",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ProcessorPresetResponse"
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/RequestError"
        }
      }
    },
    "401": {
      "description": "Authentication required or invalid",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "403": {
      "description": "Authenticated but not permitted",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "404": {
      "description": "Requested processor preset was not found",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "409": {
      "description": "Request conflicts with current processor state",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "500": {
      "description": "Unexpected server error",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

POST /api/v1/processors 接受 JWT 或带 processor:write 的 nfy_ 密钥。name 必填、非空白、最多 100 个字符,并且在每位所有者的范围内唯一;description 可选(500 个字符)。steps 必须是非空列表。每步需要受支持的特性 ID(最多 64 个字符,仅限字母/数字/下划线/连字符);可选的 args 经验证后会被存储,但不会解析为 CLI 参数。列表顺序会被存储,却没有执行顺序语义:解析只会连接非空特性 ID。

native-unsafe 与 native-llvm-direct-call 可同时包含在 steps 中:二者是相互独立的 LLVM_CONFIG 编译器特性。该组合已在现有 Java 8 工作负载中验证,但尚未穷尽所有 JVM、平台或输入;发布前请用有代表性的工作负载测试精确配置。

http
POST /api/v1/processors
Authorization: Bearer <access token>
Content-Type: application/json

{"name":"direct calls","steps":[{"feature":"native-llvm-direct-call","args":""}]}