وثائق بوابة القرار

تقييم بوابة حتمي وقابل لإعادة التشغيل مع قرارات قابلة للتدقيق.

وثائق Asset Core

سيناريو_تقديم

قم بتقديم العناصر الخارجية إلى حالة التشغيل للتدقيق والتقييم لاحقًا.

ملاحظات رئيسية

  • يتم تجزئة الحمولة وتخزينها كسجل تقديم.
  • يتم الاحتفاظ بالحمولة في سجلات حالة التشغيل/تفكيك التشغيل؛ لا ترسل الأسرار الخام.
  • لا يحرّك الجري بنفسه.
  • استخدم للنماذج أو المشغلين الذين يزودون بالقطع الأثرية.

مدخلات

  • طلب (مطلوب): حمولة الإرسال والبيانات الوصفية.
  • scenario_id (required): معرف السيناريو.

مخطط الإدخال

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "request": {
      "additionalProperties": false,
      "description": "Submission payload and metadata.",
      "properties": {
        "content_type": {
          "description": "Submission content type.",
          "type": "string"
        },
        "correlation_id": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "description": "Correlation identifier.",
              "type": "string"
            }
          ]
        },
        "namespace_id": {
          "description": "Namespace identifier.",
          "minimum": 1,
          "type": "integer"
        },
        "payload": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "const": "json"
                },
                "value": {
                  "description": "Inline JSON payload.",
                  "type": [
                    "null",
                    "boolean",
                    "number",
                    "string",
                    "array",
                    "object"
                  ]
                }
              },
              "required": [
                "kind",
                "value"
              ],
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "bytes": {
                  "items": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "type": "array"
                },
                "kind": {
                  "const": "bytes"
                }
              },
              "required": [
                "kind",
                "bytes"
              ],
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "content_ref": {
                  "additionalProperties": false,
                  "properties": {
                    "content_hash": {
                      "additionalProperties": false,
                      "properties": {
                        "algorithm": {
                          "enum": [
                            "sha256"
                          ],
                          "type": "string"
                        },
                        "value": {
                          "description": "Lowercase hex digest.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "algorithm",
                        "value"
                      ],
                      "type": "object"
                    },
                    "encryption": {
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "description": "Encryption metadata.",
                          "type": "string"
                        }
                      ]
                    },
                    "uri": {
                      "description": "Content URI.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "uri",
                    "content_hash",
                    "encryption"
                  ],
                  "type": "object"
                },
                "kind": {
                  "const": "external"
                }
              },
              "required": [
                "kind",
                "content_ref"
              ],
              "type": "object"
            }
          ]
        },
        "run_id": {
          "description": "Run identifier.",
          "type": "string"
        },
        "submission_id": {
          "description": "Submission identifier.",
          "type": "string"
        },
        "submitted_at": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "const": "unix_millis"
                },
                "value": {
                  "type": "integer"
                }
              },
              "required": [
                "kind",
                "value"
              ],
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "const": "logical"
                },
                "value": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "required": [
                "kind",
                "value"
              ],
              "type": "object"
            }
          ]
        },
        "tenant_id": {
          "description": "Tenant identifier.",
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "tenant_id",
        "namespace_id",
        "run_id",
        "submission_id",
        "payload",
        "content_type",
        "submitted_at"
      ],
      "type": "object"
    },
    "scenario_id": {
      "description": "Scenario identifier.",
      "type": "string"
    }
  },
  "required": [
    "scenario_id",
    "request"
  ],
  "type": "object"
}

المخرجات

  • سجل (مطلوب): النوع: كائن.

مخطط الإخراج

{
  "additionalProperties": false,
  "properties": {
    "record": {
      "additionalProperties": false,
      "properties": {
        "content_hash": {
          "additionalProperties": false,
          "properties": {
            "algorithm": {
              "enum": [
                "sha256"
              ],
              "type": "string"
            },
            "value": {
              "description": "Lowercase hex digest.",
              "type": "string"
            }
          },
          "required": [
            "algorithm",
            "value"
          ],
          "type": "object"
        },
        "content_type": {
          "description": "Submission content type.",
          "type": "string"
        },
        "correlation_id": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "description": "Correlation identifier.",
              "type": "string"
            }
          ]
        },
        "payload": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "const": "json"
                },
                "value": {
                  "description": "Inline JSON payload.",
                  "type": [
                    "null",
                    "boolean",
                    "number",
                    "string",
                    "array",
                    "object"
                  ]
                }
              },
              "required": [
                "kind",
                "value"
              ],
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "bytes": {
                  "items": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "type": "array"
                },
                "kind": {
                  "const": "bytes"
                }
              },
              "required": [
                "kind",
                "bytes"
              ],
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "content_ref": {
                  "additionalProperties": false,
                  "properties": {
                    "content_hash": {
                      "additionalProperties": false,
                      "properties": {
                        "algorithm": {
                          "enum": [
                            "sha256"
                          ],
                          "type": "string"
                        },
                        "value": {
                          "description": "Lowercase hex digest.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "algorithm",
                        "value"
                      ],
                      "type": "object"
                    },
                    "encryption": {
                      "oneOf": [
                        {
                          "type": "null"
                        },
                        {
                          "description": "Encryption metadata.",
                          "type": "string"
                        }
                      ]
                    },
                    "uri": {
                      "description": "Content URI.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "uri",
                    "content_hash",
                    "encryption"
                  ],
                  "type": "object"
                },
                "kind": {
                  "const": "external"
                }
              },
              "required": [
                "kind",
                "content_ref"
              ],
              "type": "object"
            }
          ]
        },
        "run_id": {
          "description": "Run identifier.",
          "type": "string"
        },
        "submission_id": {
          "description": "Submission identifier.",
          "type": "string"
        },
        "submitted_at": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "const": "unix_millis"
                },
                "value": {
                  "type": "integer"
                }
              },
              "required": [
                "kind",
                "value"
              ],
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "const": "logical"
                },
                "value": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "required": [
                "kind",
                "value"
              ],
              "type": "object"
            }
          ]
        }
      },
      "required": [
        "submission_id",
        "run_id",
        "payload",
        "content_type",
        "content_hash",
        "submitted_at",
        "correlation_id"
      ],
      "type": "object"
    }
  },
  "required": [
    "record"
  ],
  "type": "object"
}

أمثلة

تقديم عنصر خارجي للتدقيق والتقييم لاحقًا.

مدخل:

{
  "request": {
    "content_type": "application/json",
    "correlation_id": null,
    "namespace_id": 1,
    "payload": {
      "kind": "json",
      "value": {
        "artifact": "attestation",
        "status": "approved"
      }
    },
    "run_id": "run-0001",
    "submission_id": "submission-0001",
    "submitted_at": {
      "kind": "unix_millis",
      "value": 1710000000000
    },
    "tenant_id": 1
  },
  "scenario_id": "example-scenario"
}

Output:

{
  "record": {
    "content_hash": {
      "algorithm": "sha256",
      "value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
    },
    "content_type": "application/json",
    "correlation_id": null,
    "payload": {
      "kind": "json",
      "value": {
        "artifact": "attestation",
        "status": "approved"
      }
    },
    "run_id": "run-0001",
    "submission_id": "submission-0001",
    "submitted_at": {
      "kind": "unix_millis",
      "value": 1710000000000
    }
  }
}