Silver AI Data Collection API

This API collects validated Silver Essence action-flow data for AI training.

Documentation and OpenAPI

Authentication

Send the Silver License JWT when submitting data:

Authorization: Bearer YOUR_SILVER_LICENSE_JWT
Content-Type: application/json

The API validates the token by sending it in the body of POST /api/License/validate on the Silver License service.

Submit an action flow

POST /api/action-flows

Example with cURL:

curl -X POST "https://api.example.com/api/action-flows" \
  -H "Authorization: Bearer YOUR_SILVER_LICENSE_JWT" \
  -H "Content-Type: application/json" \
  -d @action-flow.json
{
  "solutionName": "Invoice Processing",
  "version": "1.2.0",
  "actionFlows": {
    "actions": [
      {
        "name": "CreateInvoice",
        "innerActions": ["ValidateCustomer", "ReserveNumber"]
      }
    ]
  },
  "validatedActionYaml": "name: CreateInvoice\nsteps:\n  - ValidateCustomer",
  "isEligibleForLearning": true
}

The API returns 202 Accepted immediately. License validation and database persistence run in the background.

The request is rejected with 400 Bad Request when the JSON, YAML, solution name, or version is invalid. It is rejected with 401 Unauthorized when the bearer token is missing.

Retrieve training data

GET /api/action-flows

Optional filters can be repeated. Action names use case-insensitive partial matching, so an action matches when it contains any supplied value:

GET /api/action-flows?actionName=Create%20Invoice&actionName=Send%20Quotation&actionType=MethodCallerAction&version=1

actionType filters nested JSON action types such as MethodCallerAction, UpdateEntityAction, and RefreshAction.

Filter by action names containing spaces

Use one actionName query parameter for each value. URL-encode spaces as %20:

GET /api/action-flows?actionName=Create%20Invoice&actionName=Send%20Quotation

This matches records where any root or nested action name contains either Create Invoice or Send Quotation.

Filter by nested action type and version

GET /api/action-flows?actionType=MethodCallerAction&actionType=RefreshAction&version=1.2.0

The filters are combined as follows:

The response includes only learning-eligible records and returns the action-flow JSON, validated YAML, and version.

[
  {
    "actionFlowsJson": {
      "actions": []
    },
    "validatedActionYaml": "name: CreateInvoice",
    "version": "1.2.0"
  }
]

Example response containing nested action metadata:

[
  {
    "actionFlowsJson": {
      "Name": "SendQuotation",
      "Action": {
        "$type": "Silver.Models.Actions.MethodCallerAction, Silver.Models",
        "Name": "newMethodCaller1",
        "Action": {
          "$type": "Silver.Models.Actions.RefreshAction, Silver.Models",
          "Name": "newRefresh"
        }
      }
    },
    "validatedActionYaml": "root:\n  name: SendQuotation\n  next:\n    name: CreateInvoice",
    "version": "1.2.0"
  }
]

Validation rules

Versioning guidance

Use a new semantic version whenever an action flow changes. Mark superseded records as ineligible for learning so agents do not train on obsolete behavior.