{
  "openapi": "3.0.2",
  "info": {
    "version": "2.0.0",
    "title": "watsonx.governance v2 API",
    "description": "## Introduction\n\nIBM watsonx.governance is an enterprise-grade environment for AI infused applications that provides enterprises with visibility into how AI is being built, used, and delivering ROI – at the scale of their business.\n\nFor details about using IBM watsonx.governance, see the [docs](https://dataplatform.cloud.ibm.com/docs/content/wsj/model/getting-started.html).\n\n## Authentication\n\nYou authenticate to the API by using IAM. You can pass either a bearer token in an Authorization header or an `apikey`. Tokens support authenticated requests without embedding service credentials in every call. API keys use basic authentication. Learn more about [IAM](https://console.bluemix.net/docs/services/watson/getting-started-iam.html).\n\nIAM authentication. Replace `{token}` with the bearer token returned by the IAM authentication service.\n\n```bash\ncurl -X GET --header \"Authorization: Bearer {Token}\" \"https://api.aiopenscale.cloud.ibm.com/<SERVICE_INSTANCE_ID>/v2/data_marts\"\n```\n\n## Versioning\n\nAPI requests require a version parameter that takes a date in the format `version=YYYY-MM-DD`. When we change the API in a [backwards-incompatible](https://github.com/watson-developer-cloud/api-guidelines/#versioning) way, we release a new version date.\n\nSend the version parameter with every API request. The service uses the API version for the date you specify, or the most recent version before that date. Don't default to the current date. Instead, specify a date that matches a version that is compatible with your app, and don't change it until your app is ready for a later version.\n\nThis documentation describes the current version of IBM watsonx.governance, `2025-09-10`. In some cases, differences in earlier versions are noted in the descriptions of parameters and response models.\n\n## Error handling\n\nThe IBM watsonx.governance service uses standard HTTP response codes to indicate indicate if a method completed successfully.A `200` HTTP response always indicates success. HTTP response codes with the format `4xx` indicate a failure. A `500` HTTP response code usually indicates an internal system error that cannot be resolved by the user.\n\n**ErrorResponse**\n\n| Name                | Description                                             |\n|---------------------|---------------------------------------------------------|\n| code <br/>`integer` | HTTP error code.                                        |\n| error<br/>`string`  | Human-readable error string, like 'Invalid image file'. |\n\n**ErrorAuthentication**\n\n| Name                    | Description                  |\n|-------------------------|------------------------------|\n| status<br/>`string`     | The status of error.         |\n| statusInfo<br/>`string` | Information about the error. |\n\n**ErrorHTML**\n\n| Name               | Description                    |\n|--------------------|--------------------------------|\n| Error<br/>`string` | HTML description of the error. |\n\n**ErrorInfo**\n\nInformation about what might have caused a failure, such as an image that is too large. Not returned when there is no error.\n\n| Name                     | Description                                                                       |\n|--------------------------|-----------------------------------------------------------------------------------|\n| code <br/>`integer`      | HTTP error code.                                                                  |\n| description<br/>`string` | Human-readable error description. For example, `File size limit exceeded`. |\n| error_id<br/>`string`    | Codified error string. For example, `limit_exceeded`.                      |\n\n## Related information\n\n- [IBM OpenScale Python SDK Documentation](https://client-docs.aiopenscale.cloud.ibm.com/html/index.html)\n\n- [Download IBM OpenScale Python SDK](https://pypi.org/project/ibm-watson-openscale)",
    "x-vcap-service-name": "ai_openscale",
    "x-version-dates": [
      "2018-09-17T00:00:00.000Z"
    ],
    "x-watson-host": "api.aiopenscale.cloud.ibm.com",
    "x-alternate-name": "watsonx.governance",
    "x-github": "https://github.ibm.com/cloud-api-docs/ai-openscale",
    "x-github-issues": "https://github.ibm.com/cloud-api-docs/ai-openscale/issues/new",
    "x-last-updated": "2025-01-27"
  },
  "security": [
    {
      "IAM": []
    },
    {
      "ICP4D": []
    }
  ],
  "externalDocs": {
    "description": "For more information about this service, see docs.",
    "url": "https://cloud.ibm.com/docs/services/ai-openscale/index.html"
  },
  "x-doc-properties": [
    "hasCustomEndpoints",
    "hasDataLabels"
  ],
  "servers": [
    {
      "url": "https://aiopenscale.cloud.ibm.com/openscale/{serviceInstanceId}",
      "description": "The production API server",
      "variables": {
        "serviceInstanceId": {
          "default": "{service-instance-id}",
          "description": "GUID of the watsonx.governance service instance on IBM Cloud"
        }
      }
    },
    {
      "url": "https://us-south.ml.cloud.ibm.com",
      "description": "The production API server URL intended only for the '/ml/v1/text/detection' API. Do not use for other API endpoints."
    }
  ],
  "tags": [
    {
      "name": "Data Marts",
      "description": "watsonx.governance data mart API"
    },
    {
      "name": "Service Providers",
      "description": "Associated Machine Learning service providers API"
    },
    {
      "name": "Subscriptions",
      "description": "Subscriptions API"
    },
    {
      "name": "Data Sets",
      "description": "Data Sets API"
    },
    {
      "name": "Records",
      "description": "Data Set Records API"
    },
    {
      "name": "Requests",
      "description": "Data Set Requests API"
    },
    {
      "name": "Distributions",
      "description": "Data Set Distributions API"
    },
    {
      "name": "Monitors",
      "description": "Monitor Definitions API"
    },
    {
      "name": "Instances",
      "description": "Monitor Instances API"
    },
    {
      "name": "Runs",
      "description": "Monitor Runs API"
    },
    {
      "name": "Measurements",
      "description": "Monitor Measurements API"
    },
    {
      "name": "Metrics",
      "description": "Monitor Metrics API"
    },
    {
      "name": "Integrated Systems",
      "description": "Integrated Systems (e.g. OpenPages) API"
    },
    {
      "name": "Operational Spaces",
      "description": "Operational Spaces API"
    },
    {
      "name": "User Preferences",
      "description": "User Preferences API"
    },
    {
      "name": "Explanation Tasks",
      "description": "Explanation Tasks API"
    },
    {
      "name": "Drift v2 Service",
      "description": "Drift v2 service specific APIs."
    },
    {
      "name": "Drift Service",
      "description": "Drift service specific APIs."
    },
    {
      "name": "Explainability Service",
      "description": "Explainability service specific APIs."
    },
    {
      "name": "Schema Utility",
      "description": "Parse a given data and extract the schema in SparkStructType format"
    },
    {
      "name": "Model Risk Management",
      "description": "Model Risk Management APIs"
    },
    {
      "name": "Text Detection",
      "description": "Runs detections on input text"
    },
    {
      "name": "Guardrails Manager",
      "description": "Guardrails Manager APIs for detectors and policies"
    }
  ],
  "paths": {
    "/v2/data_marts": {
      "post": {
        "operationId": "data_marts_add",
        "summary": "Create a new data mart",
        "description": "Create a new data mart with the given database connection",
        "tags": [
          "Data Marts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataMartRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "force",
            "schema": {
              "type": "boolean"
            },
            "required": false,
            "description": "force update of metadata and db credentials (assumption is that the new database is already prepared and populated)"
          }
        ],
        "responses": {
          "202": {
            "description": "response",
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/DataMartLocationHeader"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataMartDatabaseResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Created DataMart successfully",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T12:48:59.189Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T12:48:59.189Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "name": "string",
                        "description": "string",
                        "service_instance_crn": "string",
                        "internal_database": false,
                        "database_configuration": {
                          "database_type": "postgresql",
                          "instance_id": "string",
                          "name": "string",
                          "credentials": {
                            "secret_id": "string"
                          },
                          "location": {
                            "schema_name": "string"
                          }
                        },
                        "database_discovery": "automatic",
                        "status": {
                          "state": "preparing",
                          "deleted_at": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests for internal database. Please try again in a while.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericErrorResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Failed",
                    "description": "Too many requests for internal database. Please try again in a while.",
                    "value": {
                      "trace": "string",
                      "errors": [
                        {
                          "code": "AISUT0002E",
                          "message": "string",
                          "parameters": [
                            "string"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_marts?force=false&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: Bearer {Token}' \\\n-H 'Content-Type: application/json' \\\n-d '{\n\"name\": \"string\",\n\"description\": \"string\",\n\"service_instance_crn\": \"string\",\n\"internal_database\": false,\n\"database_configuration\": {\n  \"database_type\": \"postgresql\",\n  \"name\": \"string\",\n  \"instance_id\": \"string\",\n  \"credentials\": {\n    \"hostname\": \"aaa.bbb.ccc.ddd\",\n    \"username\": \"xxxxxxxx\",\n    \"password\": \"yyyyyyyy\", # pragma: allowlist secret\n    \"db\": \"SAMPLE\",\n    \"port\": 50000,\n    \"ssl\": false\n  },\n  \"location\": {\n    \"schema_name\": \"string\"\n  }\n},\n\"database_discovery\": \"automatic\"\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "operationId": "data_marts_list",
        "summary": "List all data marts",
        "description": "The method returns the data mart configurations as an object.",
        "tags": [
          "Data Marts"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataMartDatabaseResponseCollection"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Listing all the data marts",
                    "value": {
                      "data_marts": [
                        {
                          "metadata": {
                            "id": "string",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "url": "string",
                            "created_at": "2025-02-03T13:00:06.486Z",
                            "created_by": "IBMid-1100011XYZ",
                            "modified_at": "2025-02-03T13:00:06.486Z",
                            "modified_by": "IBMid-1100011XYZ"
                          },
                          "entity": {
                            "name": "string",
                            "description": "string",
                            "service_instance_crn": "string",
                            "internal_database": false,
                            "database_configuration": {
                              "database_type": "postgresql",
                              "instance_id": "string",
                              "name": "string",
                              "credentials": {
                                "secret_id": "string"
                              },
                              "location": {
                                "schema_name": "string"
                              }
                            },
                            "database_discovery": "automatic",
                            "status": {
                              "state": "preparing",
                              "deleted_at": "string",
                              "failure": {
                                "trace": "string",
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_marts?project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: Bearer {Token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/data_marts/{data_mart_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataMartIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "data_marts_get",
        "summary": "Get data mart with the given id",
        "tags": [
          "Data Marts"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataMartDatabaseResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Showing data mart for the given data_mart id",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T13:04:38.489Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T13:04:38.489Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "name": "string",
                        "description": "string",
                        "service_instance_crn": "string",
                        "internal_database": false,
                        "database_configuration": {
                          "database_type": "postgresql",
                          "instance_id": "string",
                          "name": "string",
                          "credentials": {
                            "secret_id": "string"
                          },
                          "location": {
                            "schema_name": "string"
                          }
                        },
                        "database_discovery": "automatic",
                        "status": {
                          "state": "preparing",
                          "deleted_at": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_marts/{data_mart_id}?project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: Bearer {Token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "summary": "Update a data mart",
        "tags": [
          "Data Marts"
        ],
        "operationId": "data_marts_patch",
        "requestBody": {
          "required": true,
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Data Marts updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataMartDatabaseResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Data Marts updated successfully",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T13:07:50.300Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T13:07:50.300Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "name": "string",
                        "description": "string",
                        "service_instance_crn": "string",
                        "internal_database": false,
                        "database_configuration": {
                          "database_type": "postgresql",
                          "instance_id": "string",
                          "name": "string",
                          "credentials": {
                            "secret_id": "string"
                          },
                          "location": {
                            "schema_name": "string"
                          }
                        },
                        "database_discovery": "automatic",
                        "status": {
                          "state": "preparing",
                          "deleted_at": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_marts/{data_mart_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer {Token}' \\\n  -H 'Content-Type: application/json-patch+json' \\\n  -d '[\n  {\n    \"op\": \"add\",\n    \"path\": \"string\",\n    \"value\": {},\n    \"from\": \"string\"\n  }\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "operationId": "data_marts_delete",
        "summary": "Delete a data mart",
        "tags": [
          "Data Marts"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "force",
            "schema": {
              "type": "boolean"
            },
            "required": false,
            "description": "Force hard delete"
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "DataMart Deleted Successfully"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'DELETE' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_marts/{data_mart_id}?force=false&project_id={space_id}&space_id={project_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer {Token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/data_sets": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "data_sets_list",
        "summary": "List all data sets specified by the parameters",
        "tags": [
          "Data Sets"
        ],
        "parameters": [
          {
            "name": "target.target_id",
            "in": "query",
            "description": "ID of the data set target (e.g. subscription ID.. )",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target.target_type",
            "in": "query",
            "description": "type of the target",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TargetType"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "type of the data set",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/DataSetType"
            }
          },
          {
            "name": "managed_by",
            "in": "query",
            "description": "ID of the managing entity (e.g. data mart id)",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSetResponseCollection"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Listing all data sets",
                    "value": {
                      "data_sets": [
                        {
                          "metadata": {
                            "id": "string",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "url": "string",
                            "created_at": "2025-02-03T13:26:27.836Z",
                            "created_by": "IBMid-1100011XYZ",
                            "modified_at": "2025-02-03T13:26:27.836Z",
                            "modified_by": "IBMid-1100011XYZ"
                          },
                          "entity": {
                            "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                            "name": "string",
                            "description": "string",
                            "type": "manual_labeling",
                            "target": {
                              "target_type": "subscription",
                              "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26"
                            },
                            "schema_update_mode": "none",
                            "data_schema": {
                              "type": "struct",
                              "fields": [
                                {
                                  "name": "string",
                                  "type": "string",
                                  "nullable": "true",
                                  "metadata": {
                                    "additionalProp1": null
                                  }
                                },
                                {
                                  "name": "string",
                                  "type": null,
                                  "nullable": "true",
                                  "metadata": {
                                    "additionalProp1": null
                                  }
                                }
                              ],
                              "id": "string",
                              "name": "string"
                            },
                            "location": {
                              "table_name": "string"
                            },
                            "managed_by": "string",
                            "status": {
                              "state": "preparing",
                              "deleted_at": "string",
                              "failure": {
                                "trace": "string",
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets?target.target_id={target_id}&target.target_type={target_type}&type={target_type}&managed_by={managed_by}&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "post": {
        "summary": "Create a new data set",
        "description": "Create a new data set",
        "operationId": "data_sets_add",
        "tags": [
          "Data Sets"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSetObjectRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSetResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Successfully created new data set",
                    "value": {
                      "data_sets": [
                        {
                          "metadata": {
                            "id": "string",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "url": "string",
                            "created_at": "2025-02-03T13:26:27.836Z",
                            "created_by": "IBMid-1100011XYZ",
                            "modified_at": "2025-02-03T13:26:27.836Z",
                            "modified_by": "IBMid-1100011XYZ"
                          },
                          "entity": {
                            "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                            "name": "string",
                            "description": "string",
                            "type": "manual_labeling",
                            "target": {
                              "target_type": "subscription",
                              "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26"
                            },
                            "schema_update_mode": "none",
                            "data_schema": {
                              "type": "struct",
                              "fields": [
                                {
                                  "name": "string",
                                  "type": "string",
                                  "nullable": "true",
                                  "metadata": {
                                    "additionalProp1": null
                                  }
                                },
                                {
                                  "name": "string",
                                  "type": null,
                                  "nullable": "true",
                                  "metadata": {
                                    "additionalProp1": null
                                  }
                                }
                              ],
                              "id": "string",
                              "name": "string"
                            },
                            "location": {
                              "table_name": "string"
                            },
                            "managed_by": "string",
                            "status": {
                              "state": "preparing",
                              "deleted_at": "string",
                              "failure": {
                                "trace": "string",
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/DataSetLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"data_mart_id\": \"dad3ed3f-db8d-4b35-b59e-7acad5348a3a\",\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"type\": \"manual_labeling\",\n  \"target\": {\n    \"target_type\": \"subscription\",\n    \"target_id\": \"4b133ea1-3097-4175-82a1-4fd80759de26\"\n  },\n  \"schema_update_mode\": \"none\",\n  \"data_schema\": {\n    \"type\": \"struct\",\n    \"fields\": [\n      {\n        \"name\": \"string\",\n        \"type\": \"string\",\n        \"nullable\": true,\n        \"metadata\": {\n          \"additionalProp1\": {}\n        }\n      },\n      {\n        \"name\": \"string\",\n        \"type\": {},\n        \"nullable\": true,\n        \"metadata\": {\n          \"additionalProp1\": {}\n        }\n      }\n    ],\n    \"id\": \"string\",\n    \"name\": \"string\"\n  },\n  \"location\": {\n    \"table_name\": \"string\"\n  },\n  \"managed_by\": \"string\"\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/data_sets/{data_set_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataSetIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "data_sets_get",
        "summary": "Get data set with the given id",
        "tags": [
          "Data Sets"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSetResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Listing data set for given id",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T13:34:12.901Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T13:34:12.901Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                        "name": "string",
                        "description": "string",
                        "type": "manual_labeling",
                        "target": {
                          "target_type": "subscription",
                          "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26"
                        },
                        "schema_update_mode": "none",
                        "data_schema": {
                          "type": "struct",
                          "fields": [
                            {
                              "name": "string",
                              "type": "string",
                              "nullable": true,
                              "metadata": {
                                "additionalProp1": {}
                              }
                            },
                            {
                              "name": "string",
                              "type": {},
                              "nullable": true,
                              "metadata": {
                                "additionalProp1": {}
                              }
                            }
                          ],
                          "id": "string",
                          "name": "string"
                        },
                        "location": {
                          "table_name": "string"
                        },
                        "managed_by": "string",
                        "status": {
                          "state": "preparing",
                          "deleted_at": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "operationId": "data_sets_delete",
        "summary": "Delete a data set",
        "tags": [
          "Data Sets"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "force",
            "schema": {
              "type": "boolean"
            },
            "required": false,
            "description": "Force hard delete. Table associated with the data set will be dropped."
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Successfully deleted dataset"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'DELETE' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}?force=false&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "description": "Update the data set",
        "operationId": "data_sets_update",
        "summary": "Update a data set",
        "tags": [
          "Data Sets"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSetResponse"
                },
                "examples": {
                  "response": {
                    "summary": "success",
                    "description": "Dataset updated successfully",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T13:37:21.463Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T13:37:21.463Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                        "name": "string",
                        "description": "string",
                        "type": "manual_labeling",
                        "target": {
                          "target_type": "subscription",
                          "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26"
                        },
                        "schema_update_mode": "none",
                        "data_schema": {
                          "type": "struct",
                          "fields": [
                            {
                              "name": "string",
                              "type": "string",
                              "nullable": true,
                              "metadata": {
                                "additionalProp1": {}
                              }
                            },
                            {
                              "name": "string",
                              "type": {},
                              "nullable": true,
                              "metadata": {
                                "additionalProp1": {}
                              }
                            }
                          ],
                          "id": "string",
                          "name": "string"
                        },
                        "location": {
                          "table_name": "string"
                        },
                        "managed_by": "string",
                        "status": {
                          "state": "preparing",
                          "deleted_at": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/data_sets/19a30eb8-8f5e-4a62-870a-4fbbbabb4bea"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '[\n  {\n    \"op\": \"add\",\n    \"path\": \"string\",\n    \"value\": {},\n    \"from\": \"string\"\n  }\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/data_sets/{data_set_id}/records": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataSetIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "summary": "Add new data set records",
        "description": "Add new data set records",
        "operationId": "records_add",
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "header",
            "in": "query",
            "description": "if not provided service will attempt to automatically detect header in the first line",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "skip",
            "description": "skip number of rows from input",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "limit for number of processed input rows",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "delimiter",
            "in": "query",
            "description": "delimiter character for data provided as csv",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "on_error",
            "in": "query",
            "description": "expected behaviour on error",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "stop",
                "continue"
              ]
            }
          },
          {
            "name": "csv_max_line_length",
            "in": "query",
            "description": "maximum length of single line in bytes (default 10MB)",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "is_historical_data",
            "in": "query",
            "description": "specifies if the uploaded records are part of historical data",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "title": "dataset records payload",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/JsDictElem"
                    },
                    {
                      "$ref": "#/components/schemas/JsList"
                    },
                    {
                      "$ref": "#/components/schemas/ScoringPayloadRequest"
                    }
                  ]
                }
              },
              "examples": {
                "Dict": {
                  "summary": "dict format",
                  "value": [
                    {
                      "GENDER": "M",
                      "PRODUCT_LINE": "Golf Equipment",
                      "AGE": 25,
                      "MARITAL_STATUS": "Unspecified",
                      "PROFESSION": "Sales"
                    },
                    {
                      "GENDER": "M",
                      "PRODUCT_LINE": "Sport shoes",
                      "AGE": 28,
                      "MARITAL_STATUS": "Married",
                      "PROFESSION": "Sales"
                    },
                    {
                      "GENDER": "F",
                      "PRODUCT_LINE": "Sport shoes",
                      "AGE": 25,
                      "MARITAL_STATUS": "Single",
                      "PROFESSION": "Software Developer"
                    }
                  ]
                },
                "List": {
                  "summary": "list format",
                  "value": [
                    {
                      "fields": [
                        "GENDER",
                        "PRODUCT_LINE",
                        "AGE",
                        "MARITAL_STATUS",
                        "PROFESSION"
                      ],
                      "values": [
                        [
                          "M",
                          "Golf Equipment",
                          25,
                          "Unspecified",
                          "Sales"
                        ],
                        [
                          "M",
                          "Sport shoes",
                          28,
                          "Married",
                          "Sales"
                        ],
                        [
                          "F",
                          "Sport shoes",
                          25,
                          "Single",
                          "Software Developer"
                        ]
                      ]
                    }
                  ]
                },
                "Scoring": {
                  "summary": "Native scoring payload format (e.g. WML)",
                  "value": [
                    {
                      "response_time": 121,
                      "request": {
                        "fields": [
                          "name",
                          "age",
                          "position"
                        ],
                        "values": [
                          [
                            "john",
                            33,
                            "engineer"
                          ],
                          [
                            "mike",
                            23,
                            "student"
                          ]
                        ],
                        "meta": {
                          "fields": [
                            "transactionid",
                            "misc1"
                          ],
                          "values": [
                            [
                              "tran1345",
                              "misc value for John"
                            ],
                            [
                              "tran1345",
                              "misc value for Mike"
                            ]
                          ]
                        }
                      },
                      "response": {
                        "fields": [
                          "name",
                          "age",
                          "position",
                          "prediction",
                          "probability"
                        ],
                        "values": [
                          [
                            "john",
                            33,
                            "engineer",
                            "personal",
                            [
                              0.6744664422398081,
                              0.32553355776019194
                            ]
                          ],
                          [
                            "mike",
                            23,
                            "student",
                            "camping",
                            [
                              0.2794765664946941,
                              0.7205234335053059
                            ]
                          ]
                        ]
                      }
                    }
                  ]
                }
              }
            },
            "text/csv": {
              "schema": {
                "type": "string",
                "example": "Personal Accessories,F,20,Single,Other"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "string"
              },
              "examples": {
                "non_binary_data": {
                  "summary": "non binary columns, use 'values' as a part name and application/json content type",
                  "value": {
                    "size": 1662020,
                    "name": "sample-image.jpeg"
                  }
                },
                "binary_data": {
                  "summary": "binary columns, use 'values.binary_field_name' as a part name and data specific content type (e.g. image/jpeg)",
                  "value": "sample-image content"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "New data_set added successfully",
                    "value": {
                      "state": "preparing",
                      "deleted_at": "string",
                      "failure": {
                        "trace": "string",
                        "errors": [
                          {
                            "code": "AISUT0002E",
                            "message": "string",
                            "parameters": [
                              "string"
                            ]
                          }
                        ]
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/DataSetRequestsLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/records?header=false&skip=0&limit=0&delimiter=%2C&on_error=stop&csv_max_line_length=0&project_id={project_id}&space_id={space_id}&is_historical_data=false' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '[\n  {\n    \"fields\": [\n      \"GENDER\",\n      \"PRODUCT_LINE\",\n      \"AGE\",\n      \"MARITAL_STATUS\",\n      \"PROFESSION\"\n    ],\n    \"values\": [\n      [\n        \"M\",\n        \"Golf Equipment\",\n        25,\n        \"Unspecified\",\n        \"Sales\"\n      ],\n      [\n        \"M\",\n        \"Sport shoes\",\n        28,\n        \"Married\",\n        \"Sales\"\n      ],\n      [\n        \"F\",\n        \"Sport shoes\",\n        25,\n        \"Single\",\n        \"Software Developer\"\n      ]\n    ]\n  }\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "operationId": "records_list",
        "summary": "List data set records",
        "description": "List data set records",
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "return records with timestamp greater then or equal to `start` parameter",
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2018-01-01T00:00:00Z"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "description": "return records with timestamp lower then `end` parameter",
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2018-01-31T00:00:00Z"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "limit for number of returned records. If the value is greater than 1000 than it will be truncated.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "offset of returned records",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "includes",
            "in": "query",
            "description": "return records with only specified columns. Parameter must be specified as comma separated string.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "AGE,GENDER"
            }
          },
          {
            "name": "annotations",
            "in": "query",
            "description": "return record annotations with given names",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "example": [
                "annotation1",
                "annotation2"
              ]
            }
          },
          {
            "name": "exclude_annotations",
            "in": "query",
            "description": "If there is no need to fetch annotations at all, set this parameter as true. There should be better performance.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "enum": [
                true,
                false
              ]
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Only return records that match given filters. There are two types of filters, separated by commas:\n  * normal filter (multiple are possible), {field_name}:{op}:{value} —\n      filter records directly\n  * joining filter (only a single one is possible), {data_set_id}.{field_name}:{op}:{value} —\n      join a data set by transaction_id (the user must ensure it's provided!)\n      and filter by this data set's records' field.\n      Will fail if the user hasn't provided transaction_id for both data sets' records.\nFilters of different types can be mixed.\nThey are partly compatible with the ones in POST /v2/data_sets/{data_set_id}/distributions.\n\nAvailable operators:\n  | op   |  meaning                    |     example        |  code equivalent         |\n  |:----:|:---------------------------:|:------------------:|:------------------------:|\n  | eq   |  equality                   | field:eq:value     |  field == value          |\n  | gt   |  greater than               | field:gt:value     |  field > value           |\n  | gte  |  greater or equal           | field:gte:value    |  field >= value          |\n  | lt   |  less than                  | field:lt:value     |  field < value           |\n  | lte  |  less or equal              | field:lte:value    |  field <= value          |\n  | like |  matching a simple pattern* | field:like:pattern |  pattern.match(field)    |\n  | in   |  is contained in list       | field:in:a;b;c     |  [a,b,c].contains(field) |\n  | null |  is null                    | field:null         |  field value == null     |\n  | nonnull |  is not null             | field:nonnull      |  field value != null     |\n\n* - \"%\" means \"one or more character\", \"_\" means \"any single character\", other characters have their usual,\n    literal meaning (e.g. \"|\" means character \"|\")\n",
            "required": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "normal_filters": {
                "value": "age:gte:18,gender:eq:female",
                "description": "Multiple normal filters"
              },
              "joined_filter": {
                "value": "c06d3756-1f43-4ea1-9727-2085ae3ff21d.channel:eq:facebook",
                "description": "A single joined filter"
              },
              "mixed_filters": {
                "value": "age:ge:20,age:ls:30,c06d3756-1f43-4ea1-9727-2085ae3ff21d.channel:eq:facebook,age:gte:20,age:ls:30",
                "description": "A mix of normal filters and a joined filter"
              }
            }
          },
          {
            "name": "include_total_count",
            "in": "query",
            "description": "If total_count should be included. It can have performance impact if total_count is calculated.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "order",
            "in": "query",
            "description": "return records in order specified. There are two patterns. The first is random sampling, the other is sorting per column.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "random": {
                "value": "random",
                "description": "records are randomly picked from given filter. You have to use one of  `start`, `end`, or `filter` param with `order=random`."
              },
              "sort": {
                "value": "AGE:desc,GENDER:asc",
                "description": "`<column>:<desc|asc>` is the syntax per column. If multiple sorts such as `?order=<column-A>:desc,<column-B>:asc` can be specified, result will be sorted in sequences, sorted by column-A in descending at first, then column-B in ascending in case of the value of column-A is identical, and so forth.\n"
              }
            }
          },
          {
            "name": "seed",
            "in": "query",
            "description": "return repeatable result for random sampling. Value must be between 0.0 and 1.0, inclusive. Also you can get sampled records in pagination manner by specifying `limit` and `offset`.",
            "required": false,
            "schema": {
              "type": "number",
              "example": 0.51
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "What JSON format to use on output.",
            "schema": {
              "$ref": "#/components/schemas/JsFormat"
            },
            "required": false
          },
          {
            "$ref": "#/components/parameters/BinaryFormatParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/DataRecordsResponseCollectionDict"
                    },
                    {
                      "$ref": "#/components/schemas/DataRecordsResponseCollectionList"
                    }
                  ]
                },
                "examples": {
                  "Dict": {
                    "summary": "dict format",
                    "value": {
                      "total_count": 2,
                      "records": [
                        {
                          "metadata": {
                            "id": "string",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "url": "string",
                            "created_at": "2019-10-31T15:18:20.629Z",
                            "created_by": "IBMid-1100011XYZ",
                            "modified_at": "2019-10-31T15:18:20.629Z",
                            "modified_by": "IBMid-1100011XYZ"
                          },
                          "entity": {
                            "values": {
                              "GENDER": "M",
                              "PRODUCT_LINE": "Golf Equipment",
                              "AGE": 25,
                              "MARITAL_STATUS": "Unspecified",
                              "PROFESSION": "Sales"
                            },
                            "annotations": {
                              "biased": {
                                "fairness_score": 0.62
                              }
                            }
                          }
                        },
                        {
                          "metadata": {
                            "id": "string",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "url": "string",
                            "created_at": "2019-10-31T15:18:20.630Z",
                            "created_by": "IBMid-1100011XYZ",
                            "modified_at": "2019-10-31T15:18:20.630Z",
                            "modified_by": "IBMid-1100011XYZ"
                          },
                          "entity": {
                            "values": {
                              "GENDER": "M",
                              "PRODUCT_LINE": "Sport shoes",
                              "AGE": 28,
                              "MARITAL_STATUS": "Married",
                              "PROFESSION": "Sales"
                            },
                            "annotations": {
                              "biased": {
                                "fairness_score": 0.72
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "List": {
                    "summary": "list format",
                    "value": {
                      "total_count": 2,
                      "records": [
                        {
                          "fields": [
                            "GENDER",
                            "PRODUCT_LINE",
                            "AGE",
                            "MARITAL_STATUS",
                            "PROFESSION"
                          ],
                          "values": [
                            [
                              "M",
                              "Golf Equipment",
                              25,
                              "Unspecified",
                              "Sales"
                            ],
                            [
                              "M",
                              "Sport shoes",
                              28,
                              "Married",
                              "Sales"
                            ]
                          ],
                          "annotations": [
                            {
                              "biased": {
                                "fairness_score": 0.62
                              }
                            },
                            {
                              "biased": {
                                "fairness_score": 0.72
                              }
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/records?start=2018-01-01T00:00:00Z&end=2018-01-31T00:00:00Z&limit=100&offset=10&includes=AGE,GENDER&annotations=string,string&exclude_annotations=false&filter=age:gte:18,gender:eq:female&include_total_count=true&order=random&seed=0.51&format=dict&binary_format=reference&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "description": "Update data set records",
        "operationId": "records_patch",
        "summary": "Update data set records",
        "tags": [
          "Records"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              },
              "examples": {
                "PatchValue": {
                  "summary": "Patch records values",
                  "value": [
                    {
                      "op": "add",
                      "path": "/records/0039f1ad-4b87-420f-ab24-34943f7b3d41/values/debiased_prediction",
                      "value": "Golf"
                    },
                    {
                      "op": "add",
                      "path": "/records/0039f1ad-4b87-420f-ab24-34943f7b3d41/values/debiased_probability",
                      "value": 0.8
                    }
                  ]
                },
                "AddAnnotation": {
                  "summary": "Add records annotations",
                  "value": [
                    {
                      "op": "add",
                      "path": "/records/0039f1ad-4b87-420f-ab24-34943f7b3d41/annotations/biased",
                      "value": [
                        {
                          "fairness_probability": 0.5,
                          "fairness_prediction": "Age"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Dataset successfully updated",
                    "value": {
                      "state": "preparing",
                      "deleted_at": "string",
                      "failure": {
                        "trace": "string",
                        "errors": [
                          {
                            "code": "AISUT0002E",
                            "message": "string",
                            "parameters": [
                              "string"
                            ]
                          }
                        ]
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/DataSetRequestsLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/records?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '[\n  {\n    \"op\": \"add\",\n    \"path\": \"/records/0039f1ad-4b87-420f-ab24-34943f7b3d41/values/debiased_prediction\",\n    \"value\": \"Golf\"\n  },\n  {\n    \"op\": \"add\",\n    \"path\": \"/records/0039f1ad-4b87-420f-ab24-34943f7b3d41/values/debiased_probability\",\n    \"value\": 0.8\n  }\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/data_sets/{data_set_id}/records/{record_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataSetIdParameter"
        },
        {
          "$ref": "#/components/parameters/RecordIdParameter"
        },
        {
          "$ref": "#/components/parameters/BinaryFormatParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "records_get",
        "summary": "Get a specific data set record with the given id",
        "description": "Get a specific record in a data set",
        "tags": [
          "Records"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataRecordResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Listing the specific record in a data set",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T13:46:41.925Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T13:46:41.925Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "values": {},
                        "annotations": {
                          "biased": {
                            "fairness_score": 0.62
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/records/{record_id}?binary_format=reference&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "operationId": "records_update",
        "summary": "Update a specific record in a data set",
        "description": "Update a specific record in a data set",
        "tags": [
          "Records"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              },
              "examples": {
                "AddAnnotation": {
                  "summary": "Add record(s) annotations",
                  "value": [
                    {
                      "op": "add",
                      "path": "/annotations/biased",
                      "value": {
                        "fairness_score": 0.62
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataRecordResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Successfully updated data set for specific record",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T13:49:18.360Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T13:49:18.360Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "values": {},
                        "annotations": {
                          "biased": {
                            "fairness_score": 0.62
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/records/{record_id}?binary_format=reference&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '[\n  {\n    \"op\": \"add\",\n    \"path\": \"/annotations/biased\",\n    \"value\": {\n      \"fairness_score\": 0.62\n    }\n  }\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/data_sets/{data_set_id}/records/{record_id}/{field_name}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataSetIdParameter"
        },
        {
          "$ref": "#/components/parameters/RecordIdParameter"
        },
        {
          "name": "field_name",
          "in": "path",
          "description": "field_name should map to db column name which value is to be retrieved",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "records_field",
        "summary": "Get value of a field in a given record",
        "description": "Get value of a field in a given record",
        "tags": [
          "Records"
        ],
        "responses": {
          "200": {
            "description": "field_name value. If field_name column is of binary type, its content type is obtained from field_name.metadata column or defaults to application/octet-stream. For other db column types, the result is json in a form: {field_name: field_value}\n",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Displaying value of field for given record."
                  }
                }
              }
            }
          },
          "404": {
            "description": "if either record_id or field_name is invalid",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Failed",
                    "description": "Either record_id or field_name is invalid"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/records/{record_id}/{field_name}?project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/data_set_records": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "summary": "Get data set records using record_id or transaction_id",
        "description": "Get data set records with specific record_id or transaction_id",
        "operationId": "records_query",
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "record_id",
            "description": "one or more record id values that should be matched",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/RecordIdOrMore"
            }
          },
          {
            "name": "transaction_id",
            "description": "one or more transaction id values that should be matched",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TransactionIdOrMore"
            }
          },
          {
            "name": "data_set_type",
            "description": "a (single) data set type",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DataSetType"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "beginning of the time range",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "description": "end of the time range",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "offset of returned explanations",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of elements returned",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSetRecords"
                },
                "example": {
                  "data_set_records": [
                    {
                      "data_set": {
                        "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                        "type": "manual_labelling",
                        "target": {
                          "target_type": "subscription",
                          "target_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a"
                        },
                        "data_schema": {
                          "type": "struct,",
                          "fields": [
                            {
                              "name": "scoring_id",
                              "type": "string",
                              "nullable": false,
                              "metadata": null
                            },
                            {
                              "name": "scoring_timestamp",
                              "type": "string",
                              "nullable": false,
                              "metadata": null
                            },
                            {
                              "name": "AGE,",
                              "type": "double,",
                              "nullable": true,
                              "metadata": null
                            }
                          ]
                        }
                      },
                      "records": [
                        {
                          "metadata": {
                            "id": "string",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "url": "string",
                            "created_at": {},
                            "created_by": "IBMid-1100011XYZ",
                            "modified_at": {},
                            "modified_by": "IBMid-1100011XYZ"
                          },
                          "entity": {
                            "values": {
                              "scoring_id": "d0e1ad2cb925483161b317ed0425eabe-2",
                              "scoring_timestamp": "2018-11-21T09:37:55.523Z",
                              "AGE": 20
                            }
                          }
                        }
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_set_records?record_id={record_id1}&record_id={record_id2}&transaction_id={transaction_id}&transaction_id={transaction_id}&data_set_type={data_set_type}&start={start}&end={end}}&offset={offset}&limit={limit}&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/data_sets/{data_set_id}/requests/{request_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataSetIdParameter"
        },
        {
          "$ref": "#/components/parameters/RequestIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "requests_get",
        "summary": "Get status of a specific request",
        "description": "Get status of a specific request",
        "tags": [
          "Requests"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Status of a specific request",
                    "value": {
                      "state": "preparing",
                      "deleted_at": "string",
                      "failure": {
                        "trace": "string",
                        "errors": [
                          {
                            "code": "AISUT0002E",
                            "message": "string",
                            "parameters": [
                              "string"
                            ]
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/requests/{request_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/data_sets/{data_set_id}/distributions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataSetIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "operationId": "distributions_add",
        "summary": "add new data distributions",
        "description": "add new data distributions",
        "tags": [
          "Distributions"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "nocache",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "force columns data refresh"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataDistributionRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataDistributionResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "New data distributions added",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T14:47:04.892Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T14:47:04.892Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "start": "2019-02-26T10:00:00.000Z",
                        "end": "2019-02-26T10:00:00.000Z",
                        "dataset": "manual_labeling",
                        "limit": "100",
                        "group": [
                          "Age",
                          "Gender"
                        ],
                        "filter": "Age:eq:33,Gender:in:[M,F,T]",
                        "agg": [
                          "count",
                          "Age:min",
                          "Age:stddev"
                        ],
                        "max_bins": "4",
                        "status": {
                          "state": "queued",
                          "queued_at": "2025-02-03T14:47:04.892Z",
                          "started_at": "2025-02-03T14:47:04.892Z",
                          "updated_at": "2025-02-03T14:47:04.892Z",
                          "completed_at": "2025-02-03T14:47:04.892Z",
                          "message": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          },
                          "operators": [
                            {
                              "id": "string",
                              "status": {
                                "state": "queued",
                                "started_at": "2025-02-03T14:47:04.892Z",
                                "completed_at": "2025-02-03T14:47:04.892Z",
                                "failure": {
                                  "trace": "string",
                                  "errors": [
                                    {
                                      "code": "AISUT0002E",
                                      "message": "string",
                                      "parameters": [
                                        "string"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "result": {
                                "additionalProp1": null
                              }
                            }
                          ]
                        },
                        "processed_records": "300",
                        "limited_data": "true",
                        "distribution": {
                          "fields": [
                            "Age",
                            "Gender",
                            "count"
                          ],
                          "values": [
                            null,
                            "33",
                            "M",
                            "4",
                            null,
                            "33",
                            "F",
                            "5"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/data_sets/7a2f3188-d869-4e9e-9573-9e4778042908/data_distributions/69a30eb8-8f5e-4a62-870a-4fbbbabb4beb"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/distributions?nocache=false&project_id={project_id}&space_id={space_id}' \\\n   -H 'accept: application/json' \\\n   -H 'Authorization: {Bearer token}' \\\n   -H 'Content-Type: application/json' \\\n   -d '{\n   \"start\": \"2019-02-26T10:00:00.000Z\",\n   \"end\": \"2019-02-26T10:00:00.000Z\",\n   \"dataset\": \"manual_labeling\",\n   \"limit\": 100,\n   \"group\": [\n     \"Age\",\n     \"Gender\"\n   ],\n   \"filter\": \"Age:eq:33,Gender:in:[M,F,T]\",\n   \"agg\": [\n     \"count\",\n     \"Age:min\",\n     \"Age:stddev\"\n   ],\n   \"max_bins\": 4\n }'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "operationId": "distributions_delete",
        "summary": "Delete data distributions",
        "description": "Delete data distribution",
        "tags": [
          "Distributions"
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Data distributions is deleted subscription."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'DELETE' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/distributions?project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/data_sets/{data_set_id}/distributions/{data_distribution_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataSetIdParameter"
        },
        {
          "$ref": "#/components/parameters/DataDistributionId"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "summary": "Get a specific data distribution",
        "description": "Get a specific data distribution",
        "operationId": "distributions_get",
        "tags": [
          "Distributions"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataDistributionResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Get a specific data distribution",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T15:08:03.926Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T15:08:03.926Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "start": "2019-02-26T10:00:00.000Z",
                        "end": "2019-02-26T10:00:00.000Z",
                        "dataset": "manual_labeling",
                        "limit": 100,
                        "group": [
                          "Age",
                          "Gender"
                        ],
                        "filter": "Age:eq:33,Gender:in:[M,F,T]",
                        "agg": [
                          "count",
                          "Age:min",
                          "Age:stddev"
                        ],
                        "max_bins": 4,
                        "status": {
                          "state": "queued",
                          "queued_at": "2025-02-03T15:08:03.926Z",
                          "started_at": "2025-02-03T15:08:03.926Z",
                          "updated_at": "2025-02-03T15:08:03.926Z",
                          "completed_at": "2025-02-03T15:08:03.926Z",
                          "message": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          },
                          "operators": [
                            {
                              "id": "string",
                              "status": {
                                "state": "queued",
                                "started_at": "2025-02-03T15:08:03.926Z",
                                "completed_at": "2025-02-03T15:08:03.926Z",
                                "failure": {
                                  "trace": "string",
                                  "errors": [
                                    {
                                      "code": "AISUT0002E",
                                      "message": "string",
                                      "parameters": [
                                        "string"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "result": {
                                "additionalProp1": {}
                              }
                            }
                          ]
                        },
                        "processed_records": 300,
                        "limited_data": true,
                        "distribution": {
                          "fields": [
                            "Age",
                            "Gender",
                            "count"
                          ],
                          "values": [
                            [
                              33,
                              "M",
                              4
                            ],
                            [
                              33,
                              "F",
                              5
                            ]
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/distributions/{data_distribution_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitor_definitions": {
      "get": {
        "operationId": "monitors_list",
        "summary": "List available monitors",
        "description": "List available monitors",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "in": "query",
            "description": "comma-separated list of names",
            "name": "name",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Either of `service` or `user` can be specified. `service` is corresponding to monitor definitions managed by IBM, and `user` is corresponding to those of managed by users.",
            "name": "type",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorCollections"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Listing all available monitors",
                    "value": {
                      "monitor_definitions": [
                        {
                          "metadata": {
                            "id": "string",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "url": "string",
                            "created_at": "2025-02-03T15:10:58.942Z",
                            "created_by": "IBMid-1100011XYZ",
                            "modified_at": "2025-02-03T15:10:58.942Z",
                            "modified_by": "IBMid-1100011XYZ"
                          },
                          "entity": {
                            "name": "Quality extended metrics",
                            "description": "string",
                            "metrics": [
                              {
                                "name": "string",
                                "description": "string",
                                "thresholds": [
                                  {
                                    "type": "lower_limit",
                                    "default": 0,
                                    "default_recommendation": "string",
                                    "specific_values": [
                                      {
                                        "id": "string",
                                        "default": 0,
                                        "recommendation": "string",
                                        "applies_to": [
                                          {
                                            "type": "tag",
                                            "key": "string",
                                            "value": "string"
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "required": false,
                                "applies_to": {
                                  "input_data_type": [
                                    "structured"
                                  ],
                                  "problem_type": [
                                    "binary"
                                  ],
                                  "target_type": [
                                    "subscription"
                                  ]
                                },
                                "expected_direction": "increasing",
                                "default_aggregation": "last",
                                "id": "string"
                              }
                            ],
                            "tags": [
                              {
                                "name": "string",
                                "description": "string",
                                "required": false,
                                "id": "string"
                              }
                            ],
                            "parameters_schema": {
                              "additionalProp1": {}
                            },
                            "dictionary": {
                              "additionalProp1": {}
                            },
                            "applies_to": {
                              "input_data_type": [
                                "structured"
                              ],
                              "problem_type": [
                                "binary"
                              ],
                              "target_type": [
                                "subscription"
                              ]
                            },
                            "managed_by": "string",
                            "schedule": {
                              "repeat_interval": 1,
                              "repeat_unit": "hour",
                              "repeat_type": "hour"
                            },
                            "schedules": {
                              "online": {
                                "repeat_interval": 3,
                                "repeat_unit": "hour",
                                "start_time": {
                                  "type": "relative",
                                  "delay_unit": "minute",
                                  "delay": 2
                                },
                                "repeat_type": "hour"
                              },
                              "batch": {
                                "repeat_interval": 1,
                                "repeat_unit": "week",
                                "start_time": {
                                  "type": "relative",
                                  "delay_unit": "hour",
                                  "delay": 1
                                },
                                "repeat_type": "week"
                              }
                            },
                            "monitor_runtime": {
                              "type": "service"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions?name={name}&type={type}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "post": {
        "description": "Add custom monitor",
        "summary": "Add custom monitor",
        "operationId": "monitors_add",
        "tags": [
          "Monitors"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitorRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDisplayForm"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Monitor is created successfully",
                    "value": {
                      "name": "Quality extended metrics",
                      "description": "string",
                      "metrics": [
                        {
                          "name": "string",
                          "description": "string",
                          "thresholds": [
                            {
                              "type": "lower_limit",
                              "default": "0",
                              "default_recommendation": "string",
                              "specific_values": [
                                {
                                  "id": "string",
                                  "default": "0",
                                  "recommendation": "string",
                                  "applies_to": [
                                    {
                                      "type": "tag",
                                      "key": "string",
                                      "value": "string"
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "required": "false",
                          "applies_to": {
                            "input_data_type": [
                              "structured"
                            ],
                            "problem_type": [
                              "binary"
                            ],
                            "target_type": [
                              "subscription"
                            ]
                          },
                          "expected_direction": "increasing",
                          "default_aggregation": "last"
                        }
                      ],
                      "tags": [
                        {
                          "name": "string",
                          "description": "string",
                          "required": "false"
                        }
                      ],
                      "applies_to": {
                        "input_data_type": [
                          "structured"
                        ],
                        "problem_type": [
                          "binary"
                        ],
                        "target_type": [
                          "subscription"
                        ]
                      },
                      "parameters_schema": {
                        "additionalProp1": null
                      },
                      "managed_by": "string",
                      "schedule": {
                        "repeat_interval": "1",
                        "repeat_unit": "hour",
                        "repeat_type": "hour"
                      },
                      "schedules": {
                        "online": {
                          "repeat_interval": "3",
                          "repeat_unit": "hour",
                          "start_time": {
                            "type": "relative",
                            "delay_unit": "minute",
                            "delay": "2"
                          },
                          "repeat_type": "hour"
                        },
                        "batch": {
                          "repeat_interval": "1",
                          "repeat_unit": "week",
                          "start_time": {
                            "type": "relative",
                            "delay_unit": "hour",
                            "delay": "1"
                          },
                          "repeat_type": "week"
                        }
                      },
                      "monitor_runtime": {
                        "type": "service"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDefinitionLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"Quality extended metrics\",\n  \"description\": \"string\",\n  \"metrics\": [\n    {\n      \"name\": \"string\",\n      \"description\": \"string\",\n      \"thresholds\": [\n        {\n          \"type\": \"lower_limit\",\n          \"default\": 0,\n          \"default_recommendation\": \"string\",\n          \"specific_values\": [\n            {\n              \"id\": \"string\",\n              \"default\": 0,\n              \"recommendation\": \"string\",\n              \"applies_to\": [\n                {\n                  \"type\": \"tag\",\n                  \"key\": \"string\",\n                  \"value\": \"string\"\n                }\n              ]\n            }\n          ]\n        }\n      ],\n      \"required\": false,\n      \"applies_to\": {\n        \"input_data_type\": [\n          \"structured\"\n        ],\n        \"problem_type\": [\n          \"binary\"\n        ],\n        \"target_type\": [\n          \"subscription\"\n        ]\n      },\n      \"expected_direction\": \"increasing\",\n      \"default_aggregation\": \"last\"\n    }\n  ],\n  \"tags\": [\n    {\n      \"name\": \"string\",\n      \"description\": \"string\",\n      \"required\": false\n    }\n  ],\n  \"applies_to\": {\n    \"input_data_type\": [\n      \"structured\"\n    ],\n    \"problem_type\": [\n      \"binary\"\n    ],\n    \"target_type\": [\n      \"subscription\"\n    ]\n  },\n  \"parameters_schema\": {\n    \"additionalProp1\": {}\n  },\n  \"managed_by\": \"string\",\n  \"schedule\": {\n    \"repeat_interval\": 1,\n    \"repeat_unit\": \"hour\",\n    \"repeat_type\": \"hour\"\n  },\n  \"schedules\": {\n    \"online\": {\n      \"repeat_interval\": 3,\n      \"repeat_unit\": \"hour\",\n      \"start_time\": {\n        \"type\": \"relative\",\n        \"delay_unit\": \"minute\",\n        \"delay\": 2\n      },\n      \"repeat_type\": \"hour\"\n    },\n    \"batch\": {\n      \"repeat_interval\": 1,\n      \"repeat_unit\": \"week\",\n      \"start_time\": {\n        \"type\": \"relative\",\n        \"delay_unit\": \"hour\",\n        \"delay\": 1\n      },\n      \"repeat_type\": \"week\"\n    }\n  },\n  \"monitor_runtime\": {\n    \"type\": \"service\"\n  }\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitor_definitions/{monitor_definition_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/MonitorDefinitionIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "monitors_get",
        "summary": "Get a specific monitor definition",
        "description": "Get a specific monitor definition",
        "tags": [
          "Monitors"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDisplayForm"
                },
                "examples": {
                  "response": {
                    "summary": "success",
                    "description": "Getting a specific monitor definition successful",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T15:51:09.549Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T15:51:09.549Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "name": "Quality extended metrics",
                        "description": "string",
                        "metrics": [
                          {
                            "name": "string",
                            "description": "string",
                            "thresholds": [
                              {
                                "type": "lower_limit",
                                "default": "0",
                                "default_recommendation": "string",
                                "specific_values": [
                                  {
                                    "id": "string",
                                    "default": "0",
                                    "recommendation": "string",
                                    "applies_to": [
                                      {
                                        "type": "tag",
                                        "key": "string",
                                        "value": "string"
                                      }
                                    ]
                                  }
                                ]
                              }
                            ],
                            "required": "false",
                            "applies_to": {
                              "input_data_type": [
                                "structured"
                              ],
                              "problem_type": [
                                "binary"
                              ],
                              "target_type": [
                                "subscription"
                              ]
                            },
                            "expected_direction": "increasing",
                            "default_aggregation": "last",
                            "id": "string"
                          }
                        ],
                        "tags": [
                          {
                            "name": "string",
                            "description": "string",
                            "required": "false",
                            "id": "string"
                          }
                        ],
                        "parameters_schema": {
                          "additionalProp1": null
                        },
                        "dictionary": {
                          "additionalProp1": null
                        },
                        "applies_to": {
                          "input_data_type": [
                            "structured"
                          ],
                          "problem_type": [
                            "binary"
                          ],
                          "target_type": [
                            "subscription"
                          ]
                        },
                        "managed_by": "string",
                        "schedule": {
                          "repeat_interval": "1",
                          "repeat_unit": "hour",
                          "repeat_type": "hour"
                        },
                        "schedules": {
                          "online": {
                            "repeat_interval": "3",
                            "repeat_unit": "hour",
                            "start_time": {
                              "type": "relative",
                              "delay_unit": "minute",
                              "delay": "2"
                            },
                            "repeat_type": "hour"
                          },
                          "batch": {
                            "repeat_interval": "1",
                            "repeat_unit": "week",
                            "start_time": {
                              "type": "relative",
                              "delay_unit": "hour",
                              "delay": "1"
                            },
                            "repeat_type": "week"
                          }
                        },
                        "monitor_runtime": {
                          "type": "service"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions/{monitor_definition_id}?project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "put": {
        "operationId": "monitors_update",
        "summary": "Update the monitor definition",
        "description": "Update a monitor definition",
        "tags": [
          "Monitors"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitorRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDisplayForm"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Monitor definition is updated successfully",
                    "value": {
                      "name": "Quality extended metrics",
                      "description": "string",
                      "metrics": [
                        {
                          "name": "string",
                          "description": "string",
                          "thresholds": [
                            {
                              "type": "lower_limit",
                              "default": "0",
                              "default_recommendation": "string",
                              "specific_values": [
                                {
                                  "id": "string",
                                  "default": "0",
                                  "recommendation": "string",
                                  "applies_to": [
                                    {
                                      "type": "tag",
                                      "key": "string",
                                      "value": "string"
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "required": "false",
                          "applies_to": {
                            "input_data_type": [
                              "structured"
                            ],
                            "problem_type": [
                              "binary"
                            ],
                            "target_type": [
                              "subscription"
                            ]
                          },
                          "expected_direction": "increasing",
                          "default_aggregation": "last"
                        }
                      ],
                      "tags": [
                        {
                          "name": "string",
                          "description": "string",
                          "required": "false"
                        }
                      ],
                      "applies_to": {
                        "input_data_type": [
                          "structured"
                        ],
                        "problem_type": [
                          "binary"
                        ],
                        "target_type": [
                          "subscription"
                        ]
                      },
                      "parameters_schema": {
                        "additionalProp1": null
                      },
                      "managed_by": "string",
                      "schedule": {
                        "repeat_interval": "1",
                        "repeat_unit": "hour",
                        "repeat_type": "hour"
                      },
                      "schedules": {
                        "online": {
                          "repeat_interval": "3",
                          "repeat_unit": "hour",
                          "start_time": {
                            "type": "relative",
                            "delay_unit": "minute",
                            "delay": "2"
                          },
                          "repeat_type": "hour"
                        },
                        "batch": {
                          "repeat_interval": "1",
                          "repeat_unit": "week",
                          "start_time": {
                            "type": "relative",
                            "delay_unit": "hour",
                            "delay": "1"
                          },
                          "repeat_type": "week"
                        }
                      },
                      "monitor_runtime": {
                        "type": "service"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PUT' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions/{monitor_definition_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"Quality extended metrics\",\n  \"description\": \"string\",\n  \"metrics\": [\n    {\n      \"name\": \"string\",\n      \"description\": \"string\",\n      \"thresholds\": [\n        {\n          \"type\": \"lower_limit\",\n          \"default\": 0,\n          \"default_recommendation\": \"string\",\n          \"specific_values\": [\n            {\n              \"id\": \"string\",\n              \"default\": 0,\n              \"recommendation\": \"string\",\n              \"applies_to\": [\n                {\n                  \"type\": \"tag\",\n                  \"key\": \"string\",\n                  \"value\": \"string\"\n                }\n              ]\n            }\n          ]\n        }\n      ],\n      \"required\": false,\n      \"applies_to\": {\n        \"input_data_type\": [\n          \"structured\"\n        ],\n        \"problem_type\": [\n          \"binary\"\n        ],\n        \"target_type\": [\n          \"subscription\"\n        ]\n      },\n      \"expected_direction\": \"increasing\",\n      \"default_aggregation\": \"last\"\n    }\n  ],\n  \"tags\": [\n    {\n      \"name\": \"string\",\n      \"description\": \"string\",\n      \"required\": false\n    }\n  ],\n  \"applies_to\": {\n    \"input_data_type\": [\n      \"structured\"\n    ],\n    \"problem_type\": [\n      \"binary\"\n    ],\n    \"target_type\": [\n      \"subscription\"\n    ]\n  },\n  \"parameters_schema\": {\n    \"additionalProp1\": {}\n  },\n  \"managed_by\": \"string\",\n  \"schedule\": {\n    \"repeat_interval\": 1,\n    \"repeat_unit\": \"hour\",\n    \"repeat_type\": \"hour\"\n  },\n  \"schedules\": {\n    \"online\": {\n      \"repeat_interval\": 3,\n      \"repeat_unit\": \"hour\",\n      \"start_time\": {\n        \"type\": \"relative\",\n        \"delay_unit\": \"minute\",\n        \"delay\": 2\n      },\n      \"repeat_type\": \"hour\"\n    },\n    \"batch\": {\n      \"repeat_interval\": 1,\n      \"repeat_unit\": \"week\",\n      \"start_time\": {\n        \"type\": \"relative\",\n        \"delay_unit\": \"hour\",\n        \"delay\": 1\n      },\n      \"repeat_type\": \"week\"\n    }\n  },\n  \"monitor_runtime\": {\n    \"type\": \"service\"\n  }\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "operationId": "monitors_patch",
        "summary": "Update a monitor definition",
        "description": "Update a monitor definition",
        "tags": [
          "Monitors"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Monitor updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorDisplayForm"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Monitor updated successfully",
                    "value": [
                      {
                        "op": "replace",
                        "path": "/name",
                        "value": "NewObjectName"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions/{monitor_definition_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json-patch+json' \\\n  -d '[\n  {\n    \"op\": \"add\",\n    \"path\": \"string\",\n    \"value\": {},\n    \"from\": \"string\"\n  }\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "operationId": "monitors_delete",
        "summary": "Delete a monitor definition",
        "description": "Delete a monitor definition, backing up table specific to monitor",
        "tags": [
          "Monitors"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "force",
            "schema": {
              "type": "boolean"
            },
            "required": false,
            "description": "Force hard delete. Table specific to this monitor will be dropped from data mart."
          }
        ],
        "responses": {
          "204": {
            "description": "Removes the Custom Monitor",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Monitor definition is deleted successfully"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'DELETE' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions/{monitor_definition_id}?force=false&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/service_providers": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "service_providers_list",
        "summary": "List service providers",
        "description": "List associated Machine Learning service instances",
        "tags": [
          "Service Providers"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "show_deleted",
            "schema": {
              "type": "boolean"
            },
            "required": false,
            "description": "show also resources pending delete"
          },
          {
            "in": "query",
            "description": "Type of service",
            "name": "service_type",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "instance_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "operational_space_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "deployment_space_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "integrated_project_id",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceProviderResponseCollection"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Listing all service providers.",
                    "value": {
                      "service_providers": [
                        {
                          "metadata": {
                            "id": "string",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "url": "string",
                            "created_at": "2025-02-03T16:21:41.794Z",
                            "created_by": "IBMid-1100011XYZ",
                            "modified_at": "2025-02-03T16:21:41.794Z",
                            "modified_by": "IBMid-1100011XYZ"
                          },
                          "entity": {
                            "name": "wml-production-o09",
                            "service_type": "watson_machine_learning",
                            "instance_id": "f8059a5f-162e-4526-9c3d-9e67af543491",
                            "credentials": {
                              "secret_id": "string"
                            },
                            "request_headers": {
                              "additionalProp1": {}
                            },
                            "operational_space_id": "string",
                            "deployment_space_id": "string",
                            "integrated_project_id": "string",
                            "group_ids": [
                              "10000",
                              "10001"
                            ],
                            "user_ids": [
                              "1000330999",
                              "1000331301"
                            ],
                            "status": {
                              "state": "preparing",
                              "deleted_at": "string",
                              "failure": {
                                "trace": "string",
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/service_providers?show_deleted=false&service_type={service_type}&instance_id={instance_id}&operational_space_id={operational_space_id}&deployment_space_id={deployment_space_id}&integrated_project_id={integrated_project_id}&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: Bearer {Token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "post": {
        "operationId": "service_providers_add",
        "summary": "Add service provider",
        "description": "Associate external Machine Learning service instance with the OpenScale DataMart",
        "tags": [
          "Service Providers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceProviderRequestObjectMk2"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceProviderResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Service provider added successfully",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T16:25:49.269Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T16:25:49.269Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "name": "wml-production-o09",
                        "service_type": "watson_machine_learning",
                        "instance_id": "f8059a5f-162e-4526-9c3d-9e67af543491",
                        "credentials": {
                          "secret_id": "string"
                        },
                        "request_headers": {
                          "additionalProp1": null
                        },
                        "operational_space_id": "string",
                        "deployment_space_id": "string",
                        "integrated_project_id": "string",
                        "group_ids": [
                          "10000",
                          "10001"
                        ],
                        "user_ids": [
                          "1000330999",
                          "1000331301"
                        ],
                        "status": {
                          "state": "preparing",
                          "deleted_at": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceProviderLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/service_providers?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer {Token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"wml-production-o09\",\n  \"description\": \"string\",\n  \"service_type\": \"watson_machine_learning\",\n  \"credentials\": {\n    \"instance_id\": \"<instance_id>\",\n    \"apikey\": \"<API_KEY>\", # pragma: allowlist secret\n    \"username\": \"some_user\",\n    \"password\": \"passwd\", # pragma: allowlist secret\n    \"url\": \"https://us-south.wml.cloud.ibm.com\"\n  },\n  \"request_headers\": {\n    \"additionalProp1\": {}\n  },\n  \"operational_space_id\": \"string\",\n  \"deployment_space_id\": \"string\",\n  \"integrated_project_id\": \"string\",\n  \"group_ids\": [\n    \"10000\",\n    \"10001\"\n  ],\n  \"user_ids\": [\n    \"1000330999\",\n    \"1000331301\"\n  ]\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/service_providers/{service_provider_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ServiceProviderIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "service_providers_get",
        "summary": "Get a specific service provider",
        "description": "Get the associated Machine Learning service provider details",
        "tags": [
          "Service Providers"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceProviderResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Getting specific service provider",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T16:28:32.719Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T16:28:32.719Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "name": "wml-production-o09",
                        "service_type": "watson_machine_learning",
                        "instance_id": "f8059a5f-162e-4526-9c3d-9e67af543491",
                        "credentials": {
                          "secret_id": "string"
                        },
                        "request_headers": {
                          "additionalProp1": {}
                        },
                        "operational_space_id": "string",
                        "deployment_space_id": "string",
                        "integrated_project_id": "string",
                        "group_ids": [
                          "10000",
                          "10001"
                        ],
                        "user_ids": [
                          "1000330999",
                          "1000331301"
                        ],
                        "status": {
                          "state": "preparing",
                          "deleted_at": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/service_providers/{service_provider_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer {Token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "operationId": "service_providers_delete",
        "summary": "Delete a service provider",
        "description": "Detach Machine Learning service provider",
        "tags": [
          "Service Providers"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "force",
            "schema": {
              "type": "boolean"
            },
            "required": false,
            "description": "Force hard delete"
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Service provider is deleted Successfully."
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceProviderLocationHeader"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Service provider is successfully deleted"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'DELETE' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/service_providers/{service_provider_id}?force=false&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: Bearer {Token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "operationId": "service_providers_update",
        "summary": "Update a service provider",
        "description": "Update existing service provider",
        "tags": [
          "Service Providers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceProviderResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "service provider successfully updated",
                    "value": [
                      {
                        "op": "replace",
                        "path": "/name",
                        "value": "NewObjectName"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/service_providers/{service_provider_id}?project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: Bearer {Token}' \\\n-H 'Content-Type: application/json' \\\n-d '[\n{\n  \"op\": \"add\",\n  \"path\": \"string\",\n  \"value\": {},\n  \"from\": \"string\"\n}\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/subscriptions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "subscriptions_list",
        "summary": "List subscriptions",
        "description": "List subscriptions",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "data_mart_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "service_provider_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "asset.asset_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of types",
            "name": "asset.asset_type",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "asset.foundational_model_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "deployment.deployment_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of types",
            "name": "deployment.deployment_type",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "integration_reference.integrated_system_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "integration_reference.external_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of states",
            "name": "risk_evaluation_status.state",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of operational space ids (property of service provider object)",
            "name": "service_provider.operational_space_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of deployment space ids (property of service provider object)",
            "name": "service_provider.deployment_space_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of integrated project ids (property of service provider object)",
            "name": "service_provider.integrated_project_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "pre_production_reference_id",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponseCollection"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Listing all subscriptions",
                    "value": {
                      "subscriptions": [
                        {
                          "metadata": {
                            "id": "string",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "url": "string",
                            "created_at": "2025-02-03T16:37:00.156Z",
                            "created_by": "IBMid-1100011XYZ",
                            "modified_at": "2025-02-03T16:37:00.156Z",
                            "modified_by": "IBMid-1100011XYZ"
                          },
                          "entity": {
                            "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                            "service_provider_id": "fc9a952d-6ef7-40c1-907a-0e1a4270f424",
                            "asset": {
                              "asset_id": "string",
                              "url": "string",
                              "name": "string",
                              "asset_type": "model",
                              "asset_rn": "string",
                              "created_at": "string",
                              "problem_type": "binary",
                              "model_type": "string",
                              "runtime_environment": "string",
                              "input_data_type": "structured",
                              "foundational_model_id": "ibm-granite/granite-3.0-8b-instruct",
                              "locale": {
                                "input": [
                                  "en"
                                ],
                                "output": [
                                  "en"
                                ]
                              }
                            },
                            "asset_properties": {
                              "training_data_reference": {
                                "secret_id": "string"
                              },
                              "training_data_schema": {
                                "type": "struct",
                                "fields": [
                                  {
                                    "name": "string",
                                    "type": "string",
                                    "nullable": true,
                                    "metadata": {
                                      "additionalProp1": {}
                                    }
                                  },
                                  {
                                    "name": "string",
                                    "type": {},
                                    "nullable": true,
                                    "metadata": {
                                      "additionalProp1": {}
                                    }
                                  }
                                ],
                                "id": "string",
                                "name": "string"
                              },
                              "input_data_schema": {
                                "type": "struct",
                                "fields": [
                                  {
                                    "name": "string",
                                    "type": "string",
                                    "nullable": true,
                                    "metadata": {
                                      "additionalProp1": {}
                                    }
                                  },
                                  {
                                    "name": "string",
                                    "type": {},
                                    "nullable": true,
                                    "metadata": {
                                      "additionalProp1": {}
                                    }
                                  }
                                ],
                                "id": "string",
                                "name": "string"
                              },
                              "output_data_schema": {
                                "type": "struct",
                                "fields": [
                                  {
                                    "name": "string",
                                    "type": "string",
                                    "nullable": true,
                                    "metadata": {
                                      "additionalProp1": {}
                                    }
                                  },
                                  {
                                    "name": "string",
                                    "type": {},
                                    "nullable": true,
                                    "metadata": {
                                      "additionalProp1": {}
                                    }
                                  }
                                ],
                                "id": "string",
                                "name": "string"
                              },
                              "input_token_count_field": "string",
                              "output_token_count_field": "string",
                              "label_column": "string",
                              "labels": [
                                "string"
                              ],
                              "dashboard_configuration": {
                                "additionalProp1": {}
                              },
                              "predicted_target_field": "string",
                              "prediction_field": "string",
                              "transaction_id_field": "string",
                              "feature_fields": [
                                "string"
                              ],
                              "categorical_fields": [
                                "string"
                              ],
                              "context_fields": [
                                "string"
                              ],
                              "question_field": "string",
                              "probability_fields": [
                                "string"
                              ],
                              "prediction_names": [
                                "string"
                              ]
                            },
                            "deployment": {
                              "name": "Azure scoring endpoint",
                              "deployment_id": "ae62976ad690472eaf4f9797075ed831",
                              "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831",
                              "created_at": "2018-01-11T10:02:00",
                              "deployment_type": "online",
                              "scoring_endpoint": {
                                "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831/execute?api-version=2.0&format=swagger",
                                "credentials": {
                                  "id": "c9ced591-1856-4a8e-b330-e166e0d6babd"
                                }
                              }
                            },
                            "integration_reference": {
                              "integrated_system_id": "string",
                              "external_id": "string",
                              "parameters": {
                                "external_type": "model"
                              }
                            },
                            "risk_evaluation_status": {
                              "state": "pending_evaluation",
                              "comment": "string",
                              "evaluated_by": "string",
                              "evaluated_at": "string"
                            },
                            "analytics_engine": {
                              "type": "string",
                              "integrated_system_id": "string",
                              "credentials": {},
                              "parameters": {}
                            },
                            "data_sources": [
                              {
                                "type": "string",
                                "connection": {
                                  "type": "string",
                                  "integrated_system_id": "string",
                                  "parameters": {}
                                },
                                "database_name": "string",
                                "schema_name": "string",
                                "table_name": "string",
                                "endpoint": {
                                  "url": "string",
                                  "credentials": {}
                                },
                                "parameters": {},
                                "auto_create": true,
                                "status": {
                                  "state": "new",
                                  "failure": {
                                    "trace": "string",
                                    "errors": [
                                      {
                                        "code": "AISUT0002E",
                                        "message": "string",
                                        "parameters": [
                                          "string"
                                        ]
                                      }
                                    ]
                                  }
                                }
                              }
                            ],
                            "embeddings_providers": [
                              {
                                "integrated_system_id": "c5b95e10-d422-42f9-ba14-566fecfd550c"
                              }
                            ],
                            "status": {
                              "state": "preparing",
                              "deleted_at": "string",
                              "failure": {
                                "trace": "string",
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions?data_mart_id={data_mart_id}&service_provider_id={service_provider_id}&asset.asset_id={asset.asset_id}&asset.asset_type={asset.asset_type}&asset.foundational_model_id={asset.foundational_model_id}&deployment.deployment_id={deployment.deployment_id}&deployment.deployment_type={deployment.deployment_id}&integration_reference.integrated_system_id={deployment.deployment_id}&integration_reference.external_id={integration_reference.external_id}&risk_evaluation_status.state={risk_evaluation_status.state}&service_provider.operational_space_id={service_provider.operational_space_id}&pre_production_reference_id={pre_production_reference_id}&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: Bearer {Token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "post": {
        "operationId": "subscriptions_add",
        "summary": "Add a new subscription",
        "description": "Add a new subscription to the model deployment",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Successfully added a new subscription",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T16:40:24.501Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T16:40:24.501Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                        "service_provider_id": "fc9a952d-6ef7-40c1-907a-0e1a4270f424",
                        "asset": {
                          "asset_id": "string",
                          "url": "string",
                          "name": "string",
                          "asset_type": "model",
                          "asset_rn": "string",
                          "created_at": "string",
                          "problem_type": "binary",
                          "model_type": "string",
                          "runtime_environment": "string",
                          "input_data_type": "structured",
                          "foundational_model_id": "ibm-granite/granite-3.0-8b-instruct",
                          "locale": {
                            "input": [
                              "en"
                            ],
                            "output": [
                              "en"
                            ]
                          }
                        },
                        "asset_properties": {
                          "training_data_reference": {
                            "secret_id": "string"
                          },
                          "training_data_schema": {
                            "type": "struct",
                            "fields": [
                              {
                                "name": "string",
                                "type": "string",
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              },
                              {
                                "name": "string",
                                "type": {},
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              }
                            ],
                            "id": "string",
                            "name": "string"
                          },
                          "input_data_schema": {
                            "type": "struct",
                            "fields": [
                              {
                                "name": "string",
                                "type": "string",
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              },
                              {
                                "name": "string",
                                "type": {},
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              }
                            ],
                            "id": "string",
                            "name": "string"
                          },
                          "output_data_schema": {
                            "type": "struct",
                            "fields": [
                              {
                                "name": "string",
                                "type": "string",
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              },
                              {
                                "name": "string",
                                "type": {},
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              }
                            ],
                            "id": "string",
                            "name": "string"
                          },
                          "input_token_count_field": "string",
                          "output_token_count_field": "string",
                          "label_column": "string",
                          "labels": [
                            "string"
                          ],
                          "dashboard_configuration": {
                            "additionalProp1": {}
                          },
                          "predicted_target_field": "string",
                          "prediction_field": "string",
                          "transaction_id_field": "string",
                          "feature_fields": [
                            "string"
                          ],
                          "categorical_fields": [
                            "string"
                          ],
                          "context_fields": [
                            "string"
                          ],
                          "question_field": "string",
                          "probability_fields": [
                            "string"
                          ],
                          "prediction_names": [
                            "string"
                          ]
                        },
                        "deployment": {
                          "name": "Azure scoring endpoint",
                          "deployment_id": "ae62976ad690472eaf4f9797075ed831",
                          "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831",
                          "created_at": "2018-01-11T10:02:00",
                          "deployment_type": "online",
                          "scoring_endpoint": {
                            "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831/execute?api-version=2.0&format=swagger",
                            "credentials": {
                              "id": "c9ced591-1856-4a8e-b330-e166e0d6babd"
                            }
                          }
                        },
                        "integration_reference": {
                          "integrated_system_id": "string",
                          "external_id": "string",
                          "parameters": {
                            "external_type": "model"
                          }
                        },
                        "risk_evaluation_status": {
                          "state": "pending_evaluation",
                          "comment": "string",
                          "evaluated_by": "string",
                          "evaluated_at": "string"
                        },
                        "analytics_engine": {
                          "type": "string",
                          "integrated_system_id": "string",
                          "credentials": {},
                          "parameters": {}
                        },
                        "data_sources": [
                          {
                            "type": "string",
                            "connection": {
                              "type": "string",
                              "integrated_system_id": "string",
                              "parameters": {}
                            },
                            "database_name": "string",
                            "schema_name": "string",
                            "table_name": "string",
                            "endpoint": {
                              "url": "string",
                              "credentials": {}
                            },
                            "parameters": {},
                            "auto_create": true,
                            "status": {
                              "state": "new",
                              "failure": {
                                "trace": "string",
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        ],
                        "embeddings_providers": [
                          {
                            "integrated_system_id": "c5b95e10-d422-42f9-ba14-566fecfd550c"
                          }
                        ],
                        "status": {
                          "state": "preparing",
                          "deleted_at": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer {Token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"data_mart_id\": \"dad3ed3f-db8d-4b35-b59e-7acad5348a3a\",\n  \"service_provider_id\": \"fc9a952d-6ef7-40c1-907a-0e1a4270f424\",\n  \"asset\": {\n    \"asset_id\": \"string\",\n    \"url\": \"string\",\n    \"name\": \"string\",\n    \"asset_type\": \"model\",\n    \"asset_rn\": \"string\",\n    \"created_at\": \"string\",\n    \"problem_type\": \"binary\",\n    \"model_type\": \"string\",\n    \"runtime_environment\": \"string\",\n    \"input_data_type\": \"structured\",\n    \"foundational_model_id\": \"ibm-granite/granite-3.0-8b-instruct\"\n  },\n  \"asset_properties\": {\n    \"training_data_reference\": {\n      \"type\": \"file_asset\"\n    },\n    \"training_data_schema\": {\n      \"type\": \"struct\",\n      \"fields\": [\n        {\n          \"name\": \"string\",\n          \"type\": \"string\",\n          \"nullable\": true,\n          \"metadata\": {\n            \"additionalProp1\": {}\n          }\n        },\n        {\n          \"name\": \"string\",\n          \"type\": {},\n          \"nullable\": true,\n          \"metadata\": {\n            \"additionalProp1\": {}\n          }\n        }\n      ],\n      \"id\": \"string\",\n      \"name\": \"string\"\n    },\n    \"input_data_schema\": {\n      \"type\": \"struct\",\n      \"fields\": [\n        {\n          \"name\": \"string\",\n          \"type\": \"string\",\n          \"nullable\": true,\n          \"metadata\": {\n            \"additionalProp1\": {}\n          }\n        },\n        {\n          \"name\": \"string\",\n          \"type\": {},\n          \"nullable\": true,\n          \"metadata\": {\n            \"additionalProp1\": {}\n          }\n        }\n      ],\n      \"id\": \"string\",\n      \"name\": \"string\"\n    },\n    \"output_data_schema\": {\n      \"type\": \"struct\",\n      \"fields\": [\n        {\n          \"name\": \"string\",\n          \"type\": \"string\",\n          \"nullable\": true,\n          \"metadata\": {\n            \"additionalProp1\": {}\n          }\n        },\n        {\n          \"name\": \"string\",\n          \"type\": {},\n          \"nullable\": true,\n          \"metadata\": {\n            \"additionalProp1\": {}\n          }\n        }\n      ],\n      \"id\": \"string\",\n      \"name\": \"string\"\n    },\n    \"input_token_count_field\": \"string\",\n    \"output_token_count_field\": \"string\",\n    \"label_column\": \"string\",\n    \"labels\": [\n      \"string\"\n    ],\n    \"dashboard_configuration\": {\n      \"additionalProp1\": {}\n    },\n    \"predicted_target_field\": \"string\",\n    \"prediction_field\": \"string\",\n    \"transaction_id_field\": \"string\",\n    \"feature_fields\": [\n      \"string\"\n    ],\n    \"categorical_fields\": [\n      \"string\"\n    ],\n    \"context_fields\": [\n      \"string\"\n    ],\n    \"question_field\": \"string\",\n    \"probability_fields\": [\n      \"string\"\n    ],\n    \"prediction_names\": [\n      \"string\"\n    ]\n  },\n  \"deployment\": {\n    \"name\": \"Azure scoring endpoint\",\n    \"deployment_id\": \"ae62976ad690472eaf4f9797075ed831\", # pragma: allowlist secret\n    \"url\": \"https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831\",\n    \"created_at\": \"2018-01-11T10:02:00\",\n    \"deployment_type\": \"online\",\n    \"scoring_endpoint\": {\n      \"url\": \"https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831/execute?api-version=2.0&format=swagger\",\n      \"credentials\": {\n        \"token\": \"dhgsfg3uy46rteyfugwerfygueq6wetfguyewf\"\n      }\n    }\n  },\n  \"risk_evaluation_status\": {\n    \"state\": \"pending_evaluation\",\n    \"comment\": \"string\",\n    \"evaluated_by\": \"string\",\n    \"evaluated_at\": \"string\"\n  },\n  \"analytics_engine\": {\n    \"type\": \"string\",\n    \"integrated_system_id\": \"string\",\n    \"credentials\": {}, # pragma: allowlist secret\n    \"parameters\": {}\n  },\n  \"data_sources\": [\n    {\n      \"type\": \"string\",\n      \"connection\": {\n        \"type\": \"string\",\n        \"integrated_system_id\": \"string\",\n        \"parameters\": {}\n      },\n      \"database_name\": \"string\",\n      \"schema_name\": \"string\",\n      \"table_name\": \"string\",\n      \"endpoint\": {\n        \"url\": \"string\",\n        \"credentials\": {}\n      },\n      \"parameters\": {},\n      \"auto_create\": true,\n      \"status\": {\n        \"state\": \"new\",\n        \"failure\": {\n          \"trace\": \"string\",\n          \"errors\": [\n            {\n              \"code\": \"AISUT0002E\",\n              \"message\": \"string\",\n              \"parameters\": [\n                \"string\"\n              ]\n            }\n          ]\n        }\n      }\n    }\n  ]\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/subscriptions/{subscription_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SubscriptionIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "subscriptions_get",
        "summary": "Get a specific subscription",
        "description": "Get a specific subscription",
        "tags": [
          "Subscriptions"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Getting a specific subscription details",
                    "value": {
                      "metadata": {
                        "id": "string",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "url": "string",
                        "created_at": "2025-02-03T16:42:02.899Z",
                        "created_by": "IBMid-1100011XYZ",
                        "modified_at": "2025-02-03T16:42:02.899Z",
                        "modified_by": "IBMid-1100011XYZ"
                      },
                      "entity": {
                        "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                        "service_provider_id": "fc9a952d-6ef7-40c1-907a-0e1a4270f424",
                        "asset": {
                          "asset_id": "string",
                          "url": "string",
                          "name": "string",
                          "asset_type": "model",
                          "asset_rn": "string",
                          "created_at": "string",
                          "problem_type": "binary",
                          "model_type": "string",
                          "runtime_environment": "string",
                          "input_data_type": "structured",
                          "foundational_model_id": "ibm-granite/granite-3.0-8b-instruct",
                          "locale": {
                            "input": [
                              "en"
                            ],
                            "output": [
                              "en"
                            ]
                          }
                        },
                        "asset_properties": {
                          "training_data_reference": {
                            "secret_id": "string"
                          },
                          "training_data_schema": {
                            "type": "struct",
                            "fields": [
                              {
                                "name": "string",
                                "type": "string",
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              },
                              {
                                "name": "string",
                                "type": {},
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              }
                            ],
                            "id": "string",
                            "name": "string"
                          },
                          "input_data_schema": {
                            "type": "struct",
                            "fields": [
                              {
                                "name": "string",
                                "type": "string",
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              },
                              {
                                "name": "string",
                                "type": {},
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              }
                            ],
                            "id": "string",
                            "name": "string"
                          },
                          "output_data_schema": {
                            "type": "struct",
                            "fields": [
                              {
                                "name": "string",
                                "type": "string",
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              },
                              {
                                "name": "string",
                                "type": {},
                                "nullable": true,
                                "metadata": {
                                  "additionalProp1": {}
                                }
                              }
                            ],
                            "id": "string",
                            "name": "string"
                          },
                          "input_token_count_field": "string",
                          "output_token_count_field": "string",
                          "label_column": "string",
                          "labels": [
                            "string"
                          ],
                          "dashboard_configuration": {
                            "additionalProp1": {}
                          },
                          "predicted_target_field": "string",
                          "prediction_field": "string",
                          "transaction_id_field": "string",
                          "feature_fields": [
                            "string"
                          ],
                          "categorical_fields": [
                            "string"
                          ],
                          "context_fields": [
                            "string"
                          ],
                          "question_field": "string",
                          "probability_fields": [
                            "string"
                          ],
                          "prediction_names": [
                            "string"
                          ]
                        },
                        "deployment": {
                          "name": "Azure scoring endpoint",
                          "deployment_id": "ae62976ad690472eaf4f9797075ed831",
                          "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831",
                          "created_at": "2018-01-11T10:02:00",
                          "deployment_type": "online",
                          "scoring_endpoint": {
                            "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831/execute?api-version=2.0&format=swagger",
                            "credentials": {
                              "id": "c9ced591-1856-4a8e-b330-e166e0d6babd"
                            }
                          }
                        },
                        "integration_reference": {
                          "integrated_system_id": "string",
                          "external_id": "string",
                          "parameters": {
                            "external_type": "model"
                          }
                        },
                        "risk_evaluation_status": {
                          "state": "pending_evaluation",
                          "comment": "string",
                          "evaluated_by": "string",
                          "evaluated_at": "string"
                        },
                        "analytics_engine": {
                          "type": "string",
                          "integrated_system_id": "string",
                          "credentials": {},
                          "parameters": {}
                        },
                        "data_sources": [
                          {
                            "type": "string",
                            "connection": {
                              "type": "string",
                              "integrated_system_id": "string",
                              "parameters": {}
                            },
                            "database_name": "string",
                            "schema_name": "string",
                            "table_name": "string",
                            "endpoint": {
                              "url": "string",
                              "credentials": {}
                            },
                            "parameters": {},
                            "auto_create": true,
                            "status": {
                              "state": "new",
                              "failure": {
                                "trace": "string",
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        ],
                        "embeddings_providers": [
                          {
                            "integrated_system_id": "c5b95e10-d422-42f9-ba14-566fecfd550c"
                          }
                        ],
                        "status": {
                          "state": "preparing",
                          "deleted_at": "string",
                          "failure": {
                            "trace": "string",
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}?project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: Bearer {Token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "operationId": "subscriptions_update",
        "summary": "Update a subscription",
        "description": "Update existing asset (from ML service instance) subscription",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "subscription is updated successfully",
                    "value": [
                      {
                        "op": "replace",
                        "path": "/name",
                        "value": "NewObjectName"
                      }
                    ]
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/subscriptions/19a30eb8-8f5e-4a62-870a-4fbbbabb4bea"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer {Token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '[\n  {\n    \"op\": \"add\",\n    \"path\": \"string\",\n    \"value\": {},\n    \"from\": \"string\"\n  }\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "operationId": "subscriptions_delete",
        "summary": "Delete a subscription",
        "description": "Delete a subscription",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "force",
            "schema": {
              "type": "boolean"
            },
            "required": false,
            "description": "Force hard delete. All data for records and metrics associated to the subscription will be deleted."
          }
        ],
        "responses": {
          "202": {
            "description": "Stops monitoring of an asset and deletes all collected observations",
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionLocationHeader"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Subscription is deleted successfully"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'DELETE' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}?force=false&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json' \\\n-H 'Authorization: Bearer {Token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/subscriptions/{subscription_id}/schemas": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SubscriptionIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "operationId": "subscriptions_schemas",
        "summary": "Derive model schemas from the training data.",
        "description": "Derive model schemas from the training data. Only \"structured\" input data type is supported. If the input_data_type field in the subscription (subscription -> entity -> asset -> input_data_type) is not \"structured\", an error will be returned.",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaInferenceRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Schemas created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaInferenceResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Schemas created successfully",
                    "value": {
                      "file_asset_metadata": {
                        "project_id": "3442bfa5-8fd0-432c-9944-ad2423742227",
                        "project_name": "Machine learning test project",
                        "asset_id": "b3335fa5-8fd0-432c-9944-ad24237cd123",
                        "asset_name": "Credit Risk csv file",
                        "asset_href": "/v2/assets/b3335fa5-8fd0-432c-9944-ad24237cd123?project_id=3442bfa5-8fd0-432c-9944-ad2423742227",
                        "meta": {
                          "file_name": "CreditRiskTrainingData.csv",
                          "file_format": "csv"
                        }
                      },
                      "subscription": {
                        "metadata": {
                          "id": "string",
                          "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                          "url": "string",
                          "created_at": "2025-02-03T17:02:30.588Z",
                          "created_by": "IBMid-1100011XYZ",
                          "modified_at": "2025-02-03T17:02:30.588Z",
                          "modified_by": "IBMid-1100011XYZ"
                        },
                        "entity": {
                          "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                          "service_provider_id": "fc9a952d-6ef7-40c1-907a-0e1a4270f424",
                          "asset": {
                            "asset_id": "string",
                            "url": "string",
                            "name": "string",
                            "asset_type": "model",
                            "asset_rn": "string",
                            "created_at": "string",
                            "problem_type": "binary",
                            "model_type": "string",
                            "runtime_environment": "string",
                            "input_data_type": "structured",
                            "foundational_model_id": "ibm-granite/granite-3.0-8b-instruct",
                            "locale": {
                              "input": [
                                "en"
                              ],
                              "output": [
                                "en"
                              ]
                            }
                          },
                          "asset_properties": {
                            "training_data_reference": {
                              "secret_id": "string"
                            },
                            "training_data_schema": {
                              "type": "struct",
                              "fields": [
                                {
                                  "name": "string",
                                  "type": "string",
                                  "nullable": true,
                                  "metadata": {
                                    "additionalProp1": {}
                                  }
                                },
                                {
                                  "name": "string",
                                  "type": {},
                                  "nullable": true,
                                  "metadata": {
                                    "additionalProp1": {}
                                  }
                                }
                              ],
                              "id": "string",
                              "name": "string"
                            },
                            "input_data_schema": {
                              "type": "struct",
                              "fields": [
                                {
                                  "name": "string",
                                  "type": "string",
                                  "nullable": true,
                                  "metadata": {
                                    "additionalProp1": {}
                                  }
                                },
                                {
                                  "name": "string",
                                  "type": {},
                                  "nullable": true,
                                  "metadata": {
                                    "additionalProp1": {}
                                  }
                                }
                              ],
                              "id": "string",
                              "name": "string"
                            },
                            "output_data_schema": {
                              "type": "struct",
                              "fields": [
                                {
                                  "name": "string",
                                  "type": "string",
                                  "nullable": true,
                                  "metadata": {
                                    "additionalProp1": {}
                                  }
                                },
                                {
                                  "name": "string",
                                  "type": {},
                                  "nullable": true,
                                  "metadata": {
                                    "additionalProp1": {}
                                  }
                                }
                              ],
                              "id": "string",
                              "name": "string"
                            },
                            "input_token_count_field": "string",
                            "output_token_count_field": "string",
                            "label_column": "string",
                            "labels": [
                              "string"
                            ],
                            "dashboard_configuration": {
                              "additionalProp1": {}
                            },
                            "predicted_target_field": "string",
                            "prediction_field": "string",
                            "transaction_id_field": "string",
                            "feature_fields": [
                              "string"
                            ],
                            "categorical_fields": [
                              "string"
                            ],
                            "context_fields": [
                              "string"
                            ],
                            "question_field": "string",
                            "probability_fields": [
                              "string"
                            ],
                            "prediction_names": [
                              "string"
                            ]
                          },
                          "deployment": {
                            "name": "Azure scoring endpoint",
                            "deployment_id": "ae62976ad690472eaf4f9797075ed831",
                            "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831",
                            "created_at": "2018-01-11T10:02:00",
                            "deployment_type": "online",
                            "scoring_endpoint": {
                              "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831/execute?api-version=2.0&format=swagger",
                              "credentials": {
                                "id": "c9ced591-1856-4a8e-b330-e166e0d6babd"
                              }
                            }
                          },
                          "integration_reference": {
                            "integrated_system_id": "string",
                            "external_id": "string",
                            "parameters": {
                              "external_type": "model"
                            }
                          },
                          "risk_evaluation_status": {
                            "state": "pending_evaluation",
                            "comment": "string",
                            "evaluated_by": "string",
                            "evaluated_at": "string"
                          },
                          "analytics_engine": {
                            "type": "string",
                            "integrated_system_id": "string",
                            "credentials": {},
                            "parameters": {}
                          },
                          "data_sources": [
                            {
                              "type": "string",
                              "connection": {
                                "type": "string",
                                "integrated_system_id": "string",
                                "parameters": {}
                              },
                              "database_name": "string",
                              "schema_name": "string",
                              "table_name": "string",
                              "endpoint": {
                                "url": "string",
                                "credentials": {}
                              },
                              "parameters": {},
                              "auto_create": true,
                              "status": {
                                "state": "new",
                                "failure": {
                                  "trace": "string",
                                  "errors": [
                                    {
                                      "code": "AISUT0002E",
                                      "message": "string",
                                      "parameters": [
                                        "string"
                                      ]
                                    }
                                  ]
                                }
                              }
                            }
                          ],
                          "embeddings_providers": [
                            {
                              "integrated_system_id": "c5b95e10-d422-42f9-ba14-566fecfd550c"
                            }
                          ],
                          "status": {
                            "state": "preparing",
                            "deleted_at": "string",
                            "failure": {
                              "trace": "string",
                              "errors": [
                                {
                                  "code": "AISUT0002E",
                                  "message": "string",
                                  "parameters": [
                                    "string"
                                  ]
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/schemas?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer {Token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"input_data\": [\n    {\n      \"fields\": [\n        \"age\",\n        \"profession\"\n      ],\n      \"values\": [\n        [\n          \"28\",\n          \"engineer\"\n        ],\n        [\n          \"33\",\n          \"teacher\"\n        ]\n      ]\n    }\n  ],\n  \"training_data_reference\": {\n    \"type\": \"file_asset\"\n  }\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/subscriptions/{subscription_id}/tables/{dataset_type}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "operationId": "subscriptions_tables",
        "summary": "Create a table for specified data set type",
        "description": "Current supported dataset_type is feedback. The body of request should be json object (an empty object `{}` is fine).",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/components/parameters/SubscriptionTablesDataSetTypeParameter"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {}
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Creating dataset table is posted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSetResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Creating dataset table is posted successfully.",
                    "value": {
                      "entity": {
                        "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                        "data_schema": {
                          "fields": [
                            {
                              "metadata": {
                                "additionalProp1": {}
                              },
                              "name": "string",
                              "nullable": true,
                              "type": "string"
                            },
                            {
                              "metadata": {
                                "additionalProp1": {}
                              },
                              "name": "string",
                              "nullable": true,
                              "type": {}
                            }
                          ],
                          "id": "string",
                          "name": "string",
                          "type": "struct"
                        },
                        "description": "string",
                        "location": {
                          "table_name": "string"
                        },
                        "managed_by": "string",
                        "name": "string",
                        "schema_update_mode": "none",
                        "status": {
                          "deleted_at": "string",
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "state": "preparing"
                        },
                        "target": {
                          "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26",
                          "target_type": "subscription"
                        },
                        "type": "manual_labeling"
                      },
                      "metadata": {
                        "created_at": "2025-02-12T10:54:03.423Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-12T10:54:03.423Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/tables/feedback?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer {Token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/subscriptions/{subscription_id}/configuration_synchronization": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SubscriptionIdParameter"
        }
      ],
      "get": {
        "operationId": "getConfigurationSynchrozation",
        "description": "Get status of triggered configuration synchronization",
        "tags": [
          "Subscriptions"
        ],
        "responses": {
          "200": {
            "description": "Get current status of config synchronization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigurationSynchronization"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Get current status of config synchronization",
                    "value": {
                      "configurations": [
                        {
                          "monitor_definition_id": "N/A",
                          "monitor_instance_id": "648135c1-d77f-4f91-a139-6cf25f3728f8",
                          "monitor_instance_status": "active",
                          "source_properties": {
                            "id": "439c3309-c678-4f24-93af-56134140b28a",
                            "properties": {
                              "resource_type": "data_set",
                              "rev": "67028956",
                              "status": "active",
                              "target.target_id": "e242a4c9-7a5f-418d-aeb4-6fcbe50e5158",
                              "target.target_type": "subscription",
                              "touched_at": "2024-04-04T06:42:27.517Z",
                              "type": "payload_logging"
                            }
                          },
                          "status": "exists",
                          "target_properties": {
                            "id": "648135c1-d77f-4f91-a139-6cf25f3728f8",
                            "properties": {
                              "resource_type": "data_set",
                              "rev": "67080940",
                              "status": "active",
                              "target.target_id": "99d0eca8-33bc-4bd4-8fb9-33248bcc2a45",
                              "target.target_type": "subscription",
                              "touched_at": "2024-04-05T02:12:57.314Z",
                              "type": "payload_logging"
                            }
                          }
                        },
                        {
                          "monitor_definition_id": "fairness",
                          "monitor_instance_id": "83ba7bb5-d344-4da7-a653-f0aa1b5492d9",
                          "monitor_instance_status": "error",
                          "source_properties": {
                            "id": "5aa308b4-3823-4db6-b5d3-2ce1e8ab70fe",
                            "properties": {
                              "data_mart_id": "c7335e14-e3ba-491e-b7f3-e5fd9037e67e",
                              "monitor_definition_id": "fairness",
                              "resource_type": "monitor_instance",
                              "rev": "67029078",
                              "status": "active",
                              "target.target_id": "e242a4c9-7a5f-418d-aeb4-6fcbe50e5158",
                              "target.target_type": "subscription",
                              "touched_at": "2024-04-04T06:44:33.485Z"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/configuration_synchronization' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer {Token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "put": {
        "operationId": "triggerConfigurationSynchrozation",
        "summary": "Trigger configuration synchronization from pre-production to production model",
        "description": "Trigger configuration synchronization based on `pre_production_reference_id` in `subscription`.",
        "parameters": [
          {
            "in": "query",
            "name": "force",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false,
            "description": "a flag to synchronize forcely"
          }
        ],
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": false,
          "description": "monitor definition id to be excluded from configuration synchronization should be passed as array",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "exclude_monitors": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "monitor_definition_id"
                    },
                    "uniqueItems": true
                  }
                },
                "example": {
                  "exclude_monitors": [
                    "fairness",
                    "quality"
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Triggered to synchronize configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigurationSynchronization"
                },
                "examples": {
                  "request": {
                    "summary": "Success",
                    "description": "Triggered to synchronize configuration Successful.",
                    "value": {
                      "configurations": [
                        {
                          "monitor_definition_id": "N/A",
                          "monitor_instance_id": "648135c1-d77f-4f91-a139-6cf25f3728f8",
                          "monitor_instance_status": "active",
                          "source_properties": {
                            "id": "439c3309-c678-4f24-93af-56134140b28a",
                            "properties": {
                              "resource_type": "data_set",
                              "rev": "67028956",
                              "status": "active",
                              "target.target_id": "e242a4c9-7a5f-418d-aeb4-6fcbe50e5158",
                              "target.target_type": "subscription",
                              "touched_at": "2024-04-04T06:42:27.517Z",
                              "type": "payload_logging"
                            }
                          },
                          "status": "exists",
                          "target_properties": {
                            "id": "648135c1-d77f-4f91-a139-6cf25f3728f8",
                            "properties": {
                              "resource_type": "data_set",
                              "rev": "67080940",
                              "status": "active",
                              "target.target_id": "99d0eca8-33bc-4bd4-8fb9-33248bcc2a45",
                              "target.target_type": "subscription",
                              "touched_at": "2024-04-05T02:12:57.314Z",
                              "type": "payload_logging"
                            }
                          }
                        },
                        {
                          "monitor_definition_id": "fairness",
                          "monitor_instance_id": "83ba7bb5-d344-4da7-a653-f0aa1b5492d9",
                          "monitor_instance_status": "error",
                          "source_properties": {
                            "id": "5aa308b4-3823-4db6-b5d3-2ce1e8ab70fe",
                            "properties": {
                              "data_mart_id": "c7335e14-e3ba-491e-b7f3-e5fd9037e67e",
                              "monitor_definition_id": "fairness",
                              "resource_type": "monitor_instance",
                              "rev": "67029078",
                              "status": "active",
                              "target.target_id": "e242a4c9-7a5f-418d-aeb4-6fcbe50e5158",
                              "target.target_type": "subscription",
                              "touched_at": "2024-04-04T06:44:33.485Z"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PUT' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/configuration_synchronization?force=false' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer {Token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"exclude_monitors\": [\n    \"fairness\",\n    \"quality\"\n  ]\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/subscriptions/{subscription_id}/predictions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SubscriptionIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "operationId": "subscriptions_score",
        "summary": "Computes the bias mitigation/remediation for the specified model",
        "description": "Computes the bias mitigation/remediation for the specified model. The fairness monitoring debias request payload details must be valid.",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FairnessMonitoringRemediationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FairnessMonitoringRemediation"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Accepted",
                    "value": {
                      "fields": [
                        "name",
                        "age",
                        "position",
                        "prediction",
                        "probability",
                        "debiased_prediction",
                        "debiased_probability",
                        "debiased_decoded_target"
                      ],
                      "values": [
                        [
                          "john",
                          35,
                          "engineer",
                          0.3,
                          [
                            0.754601226993865,
                            0.24539877300613497
                          ],
                          0.4,
                          [
                            0.754601226993865,
                            0.24539877300613497
                          ],
                          "good"
                        ]
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n    'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/predictions?project_id={project_id}&space_id={space_id}' \\\n    -H 'accept: application/json' \\\n    -H 'Authorization: Bearer {Token}' \\\n    -H 'Content-Type: application/json' \\\n    -d '{\n    \"fields\": [\n      \"name\",\n      \"age\",\n      \"position\"\n    ],\n    \"values\": [\n      [\n        \"john\",\n        33,\n        \"engineer\"\n      ]\n    ]\n  }'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitor_instances": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "instances_list",
        "summary": "List monitor instances",
        "description": "List monitor instances",
        "tags": [
          "Instances"
        ],
        "parameters": [
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "data_mart_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "monitor_definition_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of IDs",
            "name": "target.target_id",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "comma-separated list of types",
            "name": "target.target_type",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Monitor instances listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorInstanceCollection"
                },
                "examples": {
                  "response": {
                    "summary": "success",
                    "description": "Monitor instances listed successfully",
                    "value": {
                      "monitor_instances": [
                        {
                          "entity": {
                            "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                            "managed_by": "string",
                            "monitor_definition_id": "quality",
                            "parameters": {
                              "monitorParam1": "value1",
                              "monitorParam2": 2,
                              "monitorParam3": {
                                "field1": "fieldvalue1"
                              },
                              "monitorParam4": [
                                "elem1",
                                "elem2"
                              ]
                            },
                            "schedule": {
                              "repeat_interval": 1,
                              "repeat_type": "hour",
                              "repeat_unit": "hour"
                            },
                            "schedule_id": "string",
                            "status": {
                              "activity_status": {
                                "id": "c37c3c7c-67ae-48be-84bd-86cd2b25e618",
                                "url": "/v2/activity_statuses/c37c3c7c-67ae-48be-84bd-86cd2b25e618"
                              },
                              "failure": {
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ],
                                "trace": "string"
                              },
                              "state": "preparing"
                            },
                            "target": {
                              "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26",
                              "target_type": "subscription"
                            },
                            "thresholds": [
                              {
                                "metric_id": "string",
                                "specific_values": [
                                  {
                                    "applies_to": [
                                      {
                                        "key": "string",
                                        "type": "tag",
                                        "value": "string"
                                      }
                                    ],
                                    "value": 0
                                  }
                                ],
                                "type": "lower_limit",
                                "value": 0
                              }
                            ],
                            "total_records": {
                              "count": 0,
                              "failure": {
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ],
                                "trace": "string"
                              },
                              "timestamp": "2025-02-12T11:18:41.569Z",
                              "type": "payload_logging",
                              "value": "string"
                            },
                            "unprocessed_records": {
                              "count": 0,
                              "failure": {
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ],
                                "trace": "string"
                              },
                              "timestamp": "2025-02-12T11:18:41.569Z",
                              "type": "payload_logging"
                            }
                          },
                          "metadata": {
                            "created_at": "2025-02-12T11:18:41.569Z",
                            "created_by": "IBMid-1100011XYZ",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "id": "string",
                            "modified_at": "2025-02-12T11:18:41.569Z",
                            "modified_by": "IBMid-1100011XYZ",
                            "url": "string"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances?data_mart_id={data_mart_id}&monitor_definition_id={monitor_definition_id}&target.target_id={target.target_id}&target.target_type={target.target_type}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "post": {
        "operationId": "instances_add",
        "summary": "Create a new monitor instance",
        "description": "Create a new monitor instance",
        "tags": [
          "Instances"
        ],
        "parameters": [
          {
            "in": "query",
            "description": "prevent schedule creation for this monitor instance",
            "name": "skip_scheduler",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitorInstance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Monitoring enabled successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorInstanceResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Monitoring configuration started",
                    "value": {
                      "entity": {
                        "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                        "managed_by": "string",
                        "monitor_definition_id": "quality",
                        "parameters": {
                          "monitorParam1": "value1",
                          "monitorParam2": 2,
                          "monitorParam3": {
                            "field1": "fieldvalue1"
                          },
                          "monitorParam4": [
                            "elem1",
                            "elem2"
                          ]
                        },
                        "schedule": {
                          "repeat_interval": 1,
                          "repeat_type": "hour",
                          "repeat_unit": "hour"
                        },
                        "schedule_id": "string",
                        "status": {
                          "activity_status": {
                            "id": "c37c3c7c-67ae-48be-84bd-86cd2b25e618",
                            "url": "/v2/activity_statuses/c37c3c7c-67ae-48be-84bd-86cd2b25e618"
                          },
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "state": "preparing"
                        },
                        "target": {
                          "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26",
                          "target_type": "subscription"
                        },
                        "thresholds": [
                          {
                            "metric_id": "string",
                            "specific_values": [
                              {
                                "applies_to": [
                                  {
                                    "key": "string",
                                    "type": "tag",
                                    "value": "string"
                                  }
                                ],
                                "value": 0
                              }
                            ],
                            "type": "lower_limit",
                            "value": 0
                          }
                        ],
                        "total_records": {
                          "count": 0,
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "timestamp": "2025-02-12T11:18:41.574Z",
                          "type": "payload_logging",
                          "value": "string"
                        },
                        "unprocessed_records": {
                          "count": 0,
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "timestamp": "2025-02-12T11:18:41.574Z",
                          "type": "payload_logging"
                        }
                      },
                      "metadata": {
                        "created_at": "2025-02-12T11:18:41.574Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-12T11:18:41.574Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Monitoring configuration started",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Monitoring configuration started"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorInstanceLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances?skip_scheduler=false&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: ' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"data_mart_id\": \"dad3ed3f-db8d-4b35-b59e-7acad5348a3a\",\n  \"monitor_definition_id\": \"quality\",\n  \"target\": {\n    \"target_type\": \"subscription\",\n    \"target_id\": \"4b133ea1-3097-4175-82a1-4fd80759de26\"\n  },\n  \"parameters\": {\n    \"monitorParam1\": \"value1\",\n    \"monitorParam2\": 2,\n    \"monitorParam3\": {\n      \"field1\": \"fieldvalue1\"\n    },\n    \"monitorParam4\": [\n      \"elem1\",\n      \"elem2\"\n    ]\n  },\n  \"thresholds\": [\n    {\n      \"metric_id\": \"string\",\n      \"type\": \"lower_limit\",\n      \"value\": 0,\n      \"specific_values\": [\n        {\n          \"value\": 0,\n          \"applies_to\": [\n            {\n              \"type\": \"tag\",\n              \"key\": \"string\",\n              \"value\": \"string\"\n            }\n          ]\n        }\n      ]\n    }\n  ],\n  \"schedule\": {\n    \"repeat_interval\": 1,\n    \"repeat_unit\": \"hour\",\n    \"repeat_type\": \"hour\"\n  },\n  \"schedule_id\": \"string\",\n  \"managed_by\": \"string\",\n  \"unprocessed_records\": {\n    \"count\": 0,\n    \"type\": \"payload_logging\",\n    \"timestamp\": \"2025-01-13T15:15:12.799Z\",\n    \"failure\": {\n      \"trace\": \"string\",\n      \"errors\": [\n        {\n          \"code\": \"AISUT0002E\",\n          \"message\": \"string\",\n          \"parameters\": [\n            \"string\"\n          ]\n        }\n      ]\n    }\n  },\n  \"total_records\": {\n    \"count\": 0,\n    \"type\": \"payload_logging\",\n    \"timestamp\": \"2025-01-13T15:15:12.799Z\",\n    \"failure\": {\n      \"trace\": \"string\",\n      \"errors\": [\n        {\n          \"code\": \"AISUT0002E\",\n          \"message\": \"string\",\n          \"parameters\": [\n            \"string\"\n          ]\n        }\n      ]\n    },\n    \"value\": \"string\"\n  }\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitor_instances/{monitor_instance_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/MonitorInstanceIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "instances_get",
        "summary": "Get monitor instance details",
        "description": "Get monitor instance details",
        "tags": [
          "Instances"
        ],
        "parameters": [
          {
            "name": "expand",
            "in": "query",
            "description": "comma-separated list of fields (supported fields are unprocessed_records and total_records)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monitoring details retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorInstanceResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Monitoring details retrieved successfully",
                    "value": {
                      "entity": {
                        "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                        "managed_by": "string",
                        "monitor_definition_id": "quality",
                        "parameters": {
                          "monitorParam1": "value1",
                          "monitorParam2": 2,
                          "monitorParam3": {
                            "field1": "fieldvalue1"
                          },
                          "monitorParam4": [
                            "elem1",
                            "elem2"
                          ]
                        },
                        "schedule": {
                          "repeat_interval": 1,
                          "repeat_type": "hour",
                          "repeat_unit": "hour"
                        },
                        "schedule_id": "string",
                        "status": {
                          "activity_status": {
                            "id": "c37c3c7c-67ae-48be-84bd-86cd2b25e618",
                            "url": "/v2/activity_statuses/c37c3c7c-67ae-48be-84bd-86cd2b25e618"
                          },
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "state": "preparing"
                        },
                        "target": {
                          "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26",
                          "target_type": "subscription"
                        },
                        "thresholds": [
                          {
                            "metric_id": "string",
                            "specific_values": [
                              {
                                "applies_to": [
                                  {
                                    "key": "string",
                                    "type": "tag",
                                    "value": "string"
                                  }
                                ],
                                "value": 0
                              }
                            ],
                            "type": "lower_limit",
                            "value": 0
                          }
                        ],
                        "total_records": {
                          "count": 0,
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "timestamp": "2025-02-12T11:25:46.891Z",
                          "type": "payload_logging",
                          "value": "string"
                        },
                        "unprocessed_records": {
                          "count": 0,
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "timestamp": "2025-02-12T11:25:46.891Z",
                          "type": "payload_logging"
                        }
                      },
                      "metadata": {
                        "created_at": "2025-02-12T11:25:46.891Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-12T11:25:46.891Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}?expand={expand}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "operationId": "instances_update",
        "summary": "Update a monitor instance",
        "description": "Update a monitor instance",
        "tags": [
          "Instances"
        ],
        "parameters": [
          {
            "name": "update_metadata_only",
            "in": "query",
            "description": "Flag that allows to control if the underlying actions related to the monitor reconfiguration should be triggered",
            "schema": {
              "type": "boolean",
              "default": false,
              "example": false
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Monitoring updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorInstanceResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Monitoring updated successfully",
                    "value": {
                      "entity": {
                        "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
                        "managed_by": "string",
                        "monitor_definition_id": "quality",
                        "parameters": {
                          "monitorParam1": "value1",
                          "monitorParam2": 2,
                          "monitorParam3": {
                            "field1": "fieldvalue1"
                          },
                          "monitorParam4": [
                            "elem1",
                            "elem2"
                          ]
                        },
                        "schedule": {
                          "repeat_interval": 1,
                          "repeat_type": "hour",
                          "repeat_unit": "hour"
                        },
                        "schedule_id": "string",
                        "status": {
                          "activity_status": {
                            "id": "c37c3c7c-67ae-48be-84bd-86cd2b25e618",
                            "url": "/v2/activity_statuses/c37c3c7c-67ae-48be-84bd-86cd2b25e618"
                          },
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "state": "preparing"
                        },
                        "target": {
                          "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26",
                          "target_type": "subscription"
                        },
                        "thresholds": [
                          {
                            "metric_id": "string",
                            "specific_values": [
                              {
                                "applies_to": [
                                  {
                                    "key": "string",
                                    "type": "tag",
                                    "value": "string"
                                  }
                                ],
                                "value": 0
                              }
                            ],
                            "type": "lower_limit",
                            "value": 0
                          }
                        ],
                        "total_records": {
                          "count": 0,
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "timestamp": "2025-02-13T06:04:56.668Z",
                          "type": "payload_logging",
                          "value": "string"
                        },
                        "unprocessed_records": {
                          "count": 0,
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "timestamp": "2025-02-13T06:04:56.668Z",
                          "type": "payload_logging"
                        }
                      },
                      "metadata": {
                        "created_at": "2025-02-13T06:04:56.668Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-13T06:04:56.668Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Monitoring update started",
            "content": {
              "application/json": {
                "examples": {
                  "request": {
                    "summary": "Success",
                    "description": "Monitoring update started",
                    "value": [
                      {
                        "op": "replace",
                        "path": "/name",
                        "value": "NewObjectName"
                      }
                    ]
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorInstanceLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n    'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}?update_metadata_only=false&project_id={project_id}&space_id={space_id}' \\\n    -H 'accept: application/json' \\\n    -H 'Content-Type: application/json' \\\n    -d '[\n    {\n      \"op\": \"add\",\n      \"path\": \"string\",\n      \"value\": {},\n      \"from\": \"string\"\n    }\n  ]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "operationId": "instances_delete",
        "summary": "Delete a monitor instance",
        "description": "Delete a monitor instance",
        "tags": [
          "Instances"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "force",
            "schema": {
              "type": "boolean"
            },
            "required": false,
            "description": "Force hard delete. All metrics for this monitor instance will be deleted from the data mart"
          }
        ],
        "responses": {
          "202": {
            "description": "Monitoring disabled successfully",
            "content": {
              "application/json": {
                "examples": {
                  "request": {
                    "summary": "Success",
                    "description": "Monitoring disabled successfully"
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorInstanceLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'DELETE' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}?force=false&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitor_instances/{monitor_instance_id}/runs": {
      "parameters": [
        {
          "$ref": "#/components/parameters/MonitorInstanceIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "operationId": "runs_add",
        "summary": "Trigger monitoring run",
        "description": "Trigger monitoring run",
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitoringRunRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Monitoring run triggered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringRun"
                },
                "examples": {
                  "request": {
                    "summary": "Success",
                    "description": "Monitoring run triggered",
                    "value": {
                      "entity": {
                        "parameters": {
                          "monitorParam1": "value1",
                          "monitorParam2": 2,
                          "monitorParam3": {
                            "field1": "fieldvalue1"
                          },
                          "monitorParam4": [
                            "elem1",
                            "elem2"
                          ]
                        },
                        "status": {
                          "completed_at": "2025-02-12T13:39:43.064Z",
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "message": "string",
                          "operators": [
                            {
                              "id": "string",
                              "result": {
                                "additionalProp1": {}
                              },
                              "status": {
                                "completed_at": "2025-02-12T13:39:43.064Z",
                                "failure": {
                                  "errors": [
                                    {
                                      "code": "AISUT0002E",
                                      "message": "string",
                                      "parameters": [
                                        "string"
                                      ]
                                    }
                                  ],
                                  "trace": "string"
                                },
                                "started_at": "2025-02-12T13:39:43.064Z",
                                "state": "queued"
                              }
                            }
                          ],
                          "queued_at": "2025-02-12T13:39:43.064Z",
                          "started_at": "2025-02-12T13:39:43.064Z",
                          "state": "queued",
                          "updated_at": "2025-02-12T13:39:43.064Z"
                        },
                        "triggered_by": "event"
                      },
                      "metadata": {
                        "created_at": "2025-02-12T13:39:43.064Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-12T13:39:43.064Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/monitor_instances/7b7e5237-b374-4da4-b1f3-07d0e6b97c22/runs/777cc61c-5dab-495b-97de-ec5315cd4ef5"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}/runs?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"triggered_by\": \"event\",\n  \"parameters\": {\n    \"monitorParam1\": \"value1\",\n    \"monitorParam2\": 2,\n    \"monitorParam3\": {\n      \"field1\": \"fieldvalue1\"\n    },\n    \"monitorParam4\": [\n      \"elem1\",\n      \"elem2\"\n    ]\n  },\n  \"expiration_date\": \"2025-01-14T10:01:45.180Z\"\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "operationId": "runs_list",
        "summary": "List monitoring runs",
        "description": "List monitoring runs",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PagingStartParameter"
          },
          {
            "$ref": "#/components/parameters/PagingLimitParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Got history of monitoring runs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringRunCollection"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Got history of monitoring runs",
                    "value": {
                      "runs": [
                        {
                          "entity": {
                            "parameters": {
                              "monitorParam1": "value1",
                              "monitorParam2": 2,
                              "monitorParam3": {
                                "field1": "fieldvalue1"
                              },
                              "monitorParam4": [
                                "elem1",
                                "elem2"
                              ]
                            },
                            "status": {
                              "completed_at": "2025-02-12T13:45:25.768Z",
                              "failure": {
                                "errors": [
                                  {
                                    "code": "AISUT0002E",
                                    "message": "string",
                                    "parameters": [
                                      "string"
                                    ]
                                  }
                                ],
                                "trace": "string"
                              },
                              "message": "string",
                              "operators": [
                                {
                                  "id": "string",
                                  "result": {
                                    "additionalProp1": {}
                                  },
                                  "status": {
                                    "completed_at": "2025-02-12T13:45:25.768Z",
                                    "failure": {
                                      "errors": [
                                        {
                                          "code": "AISUT0002E",
                                          "message": "string",
                                          "parameters": [
                                            "string"
                                          ]
                                        }
                                      ],
                                      "trace": "string"
                                    },
                                    "started_at": "2025-02-12T13:45:25.768Z",
                                    "state": "queued"
                                  }
                                }
                              ],
                              "queued_at": "2025-02-12T13:45:25.768Z",
                              "started_at": "2025-02-12T13:45:25.768Z",
                              "state": "queued",
                              "updated_at": "2025-02-12T13:45:25.768Z"
                            },
                            "triggered_by": "event"
                          },
                          "metadata": {
                            "created_at": "2025-02-12T13:45:25.768Z",
                            "created_by": "IBMid-1100011XYZ",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "id": "string",
                            "modified_at": "2025-02-12T13:45:25.768Z",
                            "modified_by": "IBMid-1100011XYZ",
                            "url": "string"
                          }
                        }
                      ],
                      "total_count": 0
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}/runs?start={start}&limit={limit}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitor_instances/{monitor_instance_id}/runs/{monitoring_run_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/MonitorInstanceIdParameter"
        },
        {
          "$ref": "#/components/parameters/MonitoringRunIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "runs_get",
        "summary": "Get monitoring run details",
        "description": "Get monitoring run details",
        "tags": [
          "Runs"
        ],
        "responses": {
          "200": {
            "description": "Got monitoring run details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringRun"
                },
                "examples": {
                  "request": {
                    "summary": "Success",
                    "description": "Got monitoring run details",
                    "value": {
                      "entity": {
                        "parameters": {
                          "monitorParam1": "value1",
                          "monitorParam2": 2,
                          "monitorParam3": {
                            "field1": "fieldvalue1"
                          },
                          "monitorParam4": [
                            "elem1",
                            "elem2"
                          ]
                        },
                        "status": {
                          "completed_at": "2025-02-12T13:53:09.333Z",
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "message": "string",
                          "operators": [
                            {
                              "id": "string",
                              "result": {
                                "additionalProp1": {}
                              },
                              "status": {
                                "completed_at": "2025-02-12T13:53:09.333Z",
                                "failure": {
                                  "errors": [
                                    {
                                      "code": "AISUT0002E",
                                      "message": "string",
                                      "parameters": [
                                        "string"
                                      ]
                                    }
                                  ],
                                  "trace": "string"
                                },
                                "started_at": "2025-02-12T13:53:09.333Z",
                                "state": "queued"
                              }
                            }
                          ],
                          "queued_at": "2025-02-12T13:53:09.333Z",
                          "started_at": "2025-02-12T13:53:09.333Z",
                          "state": "queued",
                          "updated_at": "2025-02-12T13:53:09.333Z"
                        },
                        "triggered_by": "event"
                      },
                      "metadata": {
                        "created_at": "2025-02-12T13:53:09.333Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-12T13:53:09.333Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions/{monitor_definition_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "operationId": "runs_update",
        "summary": "Update existing monitoring run details",
        "description": "Update existing monitoring run details",
        "tags": [
          "Runs"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Monitoring run updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitoringRun"
                },
                "examples": {
                  "response": {
                    "description": "Monitoring run updated successfully",
                    "summary": "Success",
                    "value": {
                      "entity": {
                        "parameters": {
                          "monitorParam1": "value1",
                          "monitorParam2": 2,
                          "monitorParam3": {
                            "field1": "fieldvalue1"
                          },
                          "monitorParam4": [
                            "elem1",
                            "elem2"
                          ]
                        },
                        "status": {
                          "completed_at": "2025-02-12T13:54:42.841Z",
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "message": "string",
                          "operators": [
                            {
                              "id": "string",
                              "result": {
                                "additionalProp1": {}
                              },
                              "status": {
                                "completed_at": "2025-02-12T13:54:42.841Z",
                                "failure": {
                                  "errors": [
                                    {
                                      "code": "AISUT0002E",
                                      "message": "string",
                                      "parameters": [
                                        "string"
                                      ]
                                    }
                                  ],
                                  "trace": "string"
                                },
                                "started_at": "2025-02-12T13:54:42.841Z",
                                "state": "queued"
                              }
                            }
                          ],
                          "queued_at": "2025-02-12T13:54:42.841Z",
                          "started_at": "2025-02-12T13:54:42.841Z",
                          "state": "queued",
                          "updated_at": "2025-02-12T13:54:42.841Z"
                        },
                        "triggered_by": "event"
                      },
                      "metadata": {
                        "created_at": "2025-02-12T13:54:42.841Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-12T13:54:42.841Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}/runs/{monitoring_run_id}?project_id={project_id}&space_id={space_id}' \\\n   -H 'accept: application/json' \\\n   -H 'Content-Type: application/json-patch+json' \\\n   -d '[\n   {\n     \"op\": \"add\",\n     \"path\": \"string\",\n     \"value\": {},\n     \"from\": \"string\"\n   }\n ]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitor_instances/{monitor_instance_id}/measurements": {
      "parameters": [
        {
          "$ref": "#/components/parameters/MonitorInstanceIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "operationId": "measurements_add",
        "summary": "Publish measurement data to OpenScale",
        "description": "Publish measurement data to OpenScale",
        "tags": [
          "Measurements"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitorMeasurementRequestCollection"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Asset observation registered successfully",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "description": "Asset observation registered successfully",
                    "summary": "Success"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}/measurements?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '[\n  {\n    \"timestamp\": \"2018-11-21T09:37:55.523Z\",\n    \"run_id\": \"string\",\n    \"metrics\": [\n      {\n        \"quality\": 0.89\n      }\n    ],\n    \"sources\": [\n      {\n        \"id\": \"confusion_matrix_1\",\n        \"type\": \"confusion_matrix\",\n        \"metric_ids\": [\n          [\n            \"area_under_roc\",\n            \"area_under_pr\"\n          ]\n        ],\n        \"data\": {\n          \"labels\": [\n            \"NoRisk\",\n            \"Risk\"\n          ],\n          \"values\": [\n            [\n              0.97,\n              0.01\n            ],\n            [\n              0.03,\n              0.96\n            ]\n          ]\n        }\n      }\n    ],\n    \"asset_revision\": \"string\"\n  }\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "operationId": "measurements_list",
        "summary": "Query measurements from OpenScale DataMart.",
        "description": "Query measurements from OpenScale DataMart. It is required to either provide a `start end` or `run_id` parameter.",
        "tags": [
          "Measurements"
        ],
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "description": "Beginning of the time range",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "description": "End of the time range",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "$ref": "#/components/parameters/MonitoringRunIdsParameters"
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter expression can consist of any metric tag or a common column of string type followed by filter name and optionally a value, all delimited by colon.\nSupported filters are: `in`, `eq`, `null` and `exists`. Sample filters are: `filter=region:in:[us,pl],segment:eq:sales` or `filter=region:null,segment:exists`.\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of measurements returned",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Offset of measurements returned",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Measurements data queried successfully. For measurement POSTed with **v1**, value of `issue_count` and `run_id` property will be `null`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorMeasurementResponseCollection"
                },
                "examples": {
                  "response": {
                    "description": "Measurements data queried successfully. For measurement POSTed with **v1**, value of `issue_count` and `run_id` property will be `null`.",
                    "summary": "Success",
                    "value": {
                      "end": "2025-02-12T14:51:59.052Z",
                      "limit": 10,
                      "measurements": [
                        {
                          "entity": {
                            "asset_revision": "string",
                            "issue_count": 2,
                            "monitor_definition_id": "quality",
                            "monitor_instance_id": "string",
                            "run_id": "string",
                            "target": {
                              "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26",
                              "target_type": "subscription"
                            },
                            "timestamp": "2025-02-12T14:51:59.052Z",
                            "values": [
                              {
                                "metrics": [
                                  {
                                    "id": "area_under_roc",
                                    "lower_limit": 0.8,
                                    "value": 0.88
                                  },
                                  {
                                    "id": "area_under_pr",
                                    "lower_limit": 0.73,
                                    "value": 0.71
                                  }
                                ],
                                "tags": [
                                  {
                                    "id": "model_type",
                                    "value": "original"
                                  }
                                ]
                              }
                            ]
                          },
                          "metadata": {
                            "created_at": "2025-02-12T14:51:59.052Z",
                            "created_by": "IBMid-1100011XYZ",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "id": "string",
                            "modified_at": "2025-02-12T14:51:59.052Z",
                            "modified_by": "IBMid-1100011XYZ",
                            "url": "string"
                          }
                        }
                      ],
                      "offset": 0,
                      "start": "2025-02-12T14:51:59.052Z"
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}/measurements?start={start}&end={end}&run_id={run_id}&filter={filter}&limit={limit}&offset={offset}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitor_instances/{monitor_instance_id}/measurements/{measurement_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/MonitorInstanceIdParameter"
        },
        {
          "$ref": "#/components/parameters/MeasurementIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "measurements_get",
        "summary": "Get measurement data from OpenScale DataMart.",
        "description": "Get measurement data from OpenScale DataMart. If metric_id is specified, sources associated with given metric id are filtered.",
        "tags": [
          "Measurements"
        ],
        "parameters": [
          {
            "name": "metric_id",
            "in": "query",
            "required": false,
            "description": "Comma delimited list of metric_id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Measurement data retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorMeasurementResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Measurement data retrieved successfully",
                    "value": {
                      "entity": {
                        "asset_revision": "string",
                        "issue_count": 2,
                        "monitor_definition_id": "quality",
                        "monitor_instance_id": "string",
                        "run_id": "string",
                        "sources": [
                          {
                            "data": {
                              "labels": [
                                "NoRisk",
                                "Risk"
                              ],
                              "values": [
                                [
                                  0.97,
                                  0.01
                                ],
                                [
                                  0.03,
                                  0.96
                                ]
                              ]
                            },
                            "id": "confusion_matrix_1",
                            "metric_ids": [
                              [
                                "area_under_roc",
                                "area_under_pr"
                              ]
                            ],
                            "type": "confusion_matrix"
                          }
                        ],
                        "target": {
                          "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26",
                          "target_type": "subscription"
                        },
                        "timestamp": "2025-02-12T14:53:43.724Z",
                        "values": [
                          {
                            "metrics": [
                              {
                                "id": "area_under_roc",
                                "lower_limit": 0.8,
                                "value": 0.88
                              },
                              {
                                "id": "area_under_pr",
                                "lower_limit": 0.73,
                                "value": 0.71
                              }
                            ],
                            "tags": [
                              {
                                "id": "model_type",
                                "value": "original"
                              }
                            ]
                          }
                        ]
                      },
                      "metadata": {
                        "created_at": "2025-02-12T14:53:43.724Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-12T14:53:43.724Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}/measurements/{measurement_id}?metric_id={metric_id}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/measurements": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "measurements_query",
        "summary": "Query for the recent measurement",
        "description": "Query for the recent measurement grouped by the monitoring target (subscription).",
        "tags": [
          "Measurements"
        ],
        "parameters": [
          {
            "name": "target_id",
            "in": "query",
            "required": false,
            "description": "Comma separated ID of the monitoring target (subscription)",
            "schema": {
              "$ref": "#/components/schemas/TargetId"
            }
          },
          {
            "name": "target_type",
            "in": "query",
            "required": false,
            "description": "Type of the monitoring target (subscription)",
            "schema": {
              "$ref": "#/components/schemas/TargetType"
            }
          },
          {
            "name": "monitor_definition_id",
            "in": "query",
            "required": false,
            "description": "Comma separated ID of the monitor definition",
            "schema": {
              "$ref": "#/components/schemas/MonitorDefinitionId"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter expression can consist of any metric tag or a common column of string type followed by filter name and optionally a value, all delimited by colon and prepended with `monitor_definition_id.` string.\nSupported filters are: `in`, `eq`, `null` and `exists`. Sample filters are: `monitor_definition_id.filter=region:in:[us,pl],monitor_definition_id.segment:eq:sales` or `filter=monitor_definition_id.region:null,monitor_definition_id.segment:exists`.\nEvery monitor_definition_id can have own set of filters.\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recent_count",
            "in": "query",
            "required": false,
            "description": "Number of measurements (per target) to be returned",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 1
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Format of the returned data. `full` format compared to `compact` is additive and contains `sources` part.",
            "schema": {
              "type": "string",
              "default": "compact",
              "enum": [
                "compact",
                "full"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Measurements data queried successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeasurementsResponseCollection"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Measurements data queried successfully",
                    "value": {
                      "measurements": [
                        {
                          "entity": {
                            "asset_revision": "string",
                            "issue_count": 2,
                            "monitor_definition_id": "quality",
                            "monitor_instance_id": "string",
                            "run_id": "string",
                            "target": {
                              "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26",
                              "target_type": "subscription"
                            },
                            "timestamp": "2025-02-12T14:55:13.428Z",
                            "values": [
                              {
                                "metrics": [
                                  {
                                    "id": "area_under_roc",
                                    "lower_limit": 0.8,
                                    "value": 0.88
                                  },
                                  {
                                    "id": "area_under_pr",
                                    "lower_limit": 0.73,
                                    "value": 0.71
                                  }
                                ],
                                "tags": [
                                  {
                                    "id": "model_type",
                                    "value": "original"
                                  }
                                ]
                              }
                            ]
                          },
                          "metadata": {
                            "created_at": "2025-02-12T14:55:13.428Z",
                            "created_by": "IBMid-1100011XYZ",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "id": "string",
                            "modified_at": "2025-02-12T14:55:13.428Z",
                            "modified_by": "IBMid-1100011XYZ",
                            "url": "string"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/measurements?target_id={target_id}&target_type={target_type}&monitor_definition_id={monitor_definition_id}&filter={filter}&recent_count={recent_count}&format={format}&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitor_instances/{monitor_instance_id}/metrics": {
      "parameters": [
        {
          "$ref": "#/components/parameters/MonitorInstanceIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "metrics_list",
        "summary": "Query monitor instance metrics from OpenScale DataMart.",
        "description": "Query monitor instance metrics from OpenScale DataMart. See <a href=\"https://github.ibm.com/aiopenscale/aios-datamart-service-api/wiki/1.3.-Metrics-Query-Language\">Metrics Query Language documentation</a>.",
        "tags": [
          "Metrics"
        ],
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "description": "Calculations **inclusive**, internally floored to achieve full interval. If interval is vulnerable to time zone, the calculated value\ndepends on a backend db engine: PostgreSQL respects time zone and DB2 use UTC time. Calculated value is returned in response.\n",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "description": "Calculations **exclusive**, internally ceiled to achieve full interval. If interval is vulnerable to time zone, the calculated value\ndepends on a backend db engine: PostgreSQL respects time zone and DB2 use UTC time. Calculated value is returned in response.\n",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "description": "Time unit in which metrics are grouped and aggregated, interval by interval",
            "schema": {
              "type": "string",
              "enum": [
                "minute",
                "hour",
                "day",
                "week",
                "month",
                "year"
              ],
              "default": "hour"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Filter expression can consist of any metric tag or a common column of string type followed by filter name and optionally a value, all delimited by colon.\nSupported filters are: `in`, `eq`, `null` and `exists`. Sample filters are: `filter=region:in:[us,pl],segment:eq:sales` or `filter=region:null,segment:exists`.\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group",
            "in": "query",
            "required": false,
            "description": "Comma delimited list constructed from metric tags, e.g. `group=region,segment` to group metrics before aggregations",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agg",
            "in": "query",
            "required": true,
            "description": "Comma delimited function list constructed from metric name and function, e.g. `agg=metric_name:count,:last` that defines aggregations",
            "schema": {
              "type": "string",
              "enum": [
                "last",
                "first",
                "max",
                "min",
                "sum",
                "avg",
                "count",
                "stddev",
                "median"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metric data queried successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataMartGetMonitorInstanceMetrics"
                },
                "examples": {
                  "response": {
                    "description": "Metric data queried successfully",
                    "summary": "Success",
                    "value": {
                      "end": "2019-02-15T14:00:00Z",
                      "groups": [
                        {
                          "metrics": [
                            {
                              "id": "fairness_value",
                              "lower_limit": [
                                0.8,
                                null,
                                0.85,
                                0.85
                              ],
                              "max": {
                                "measurement_id": [
                                  "a4f33501-bbae-4e76-bf5a-15339e3c5022",
                                  null,
                                  "ac750aef-e6c5-4904-b9c9-da900824c25e",
                                  "a2a33371-a25c-4384-b307-d1046cc7b602"
                                ],
                                "value": [
                                  0.74,
                                  null,
                                  0.79,
                                  0.88
                                ]
                              },
                              "min": {
                                "measurement_id": [
                                  "e4f33501-bbae-4e76-bf5a-15339e3c5022",
                                  null,
                                  "6c750aef-e6c5-4904-b9c9-da900824c25e",
                                  "f2a33371-a25c-4384-b307-d1046cc7b602"
                                ],
                                "value": [
                                  0.71,
                                  null,
                                  0.77,
                                  0.83
                                ]
                              }
                            }
                          ],
                          "tags": [
                            {
                              "id": "feature",
                              "value": "age"
                            },
                            {
                              "id": "feature_value",
                              "value": "18-44"
                            }
                          ]
                        }
                      ],
                      "interval": "hour",
                      "monitor_definition_id": "fairness",
                      "start": "2019-02-15T10:00:00Z",
                      "target_id": "0571522b-9908-43a9-a8c4-8deec4b224ae",
                      "target_type": "subscription"
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}/metrics?start={start}&end={end}&interval={interval}&filter={filter}&group={group}&agg={agg}&project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/user_preferences": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "user_preferences_list",
        "summary": "Get User Preferences",
        "description": "Get User Preferences",
        "tags": [
          "User Preferences"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Got User Preferences",
                    "value": "{}"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/user_preferences?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "operationId": "user_preferences_patch",
        "summary": "Update User Preferences",
        "description": "Update User Preferences",
        "tags": [
          "User Preferences"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User Preferences updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "User Preferences updated successfully",
                    "value": "{}"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n    'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/user_preferences?project_id={project_id}&space_id={space_id}' \\\n    -H 'accept: application/json' \\\n    -H 'Authorization: {Bearer token}' \\\n    -H 'Content-Type: application/json-patch+json' \\\n    -d '[\n    {\n      \"op\": \"add\",\n      \"path\": \"string\",\n      \"value\": {},\n      \"from\": \"string\"\n    }\n  ]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/user_preferences/{user_preference_key}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/UserPreferenceKeyParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "user_preferences_get",
        "summary": "Get a specific user preference",
        "description": "Get a specific user preference",
        "tags": [
          "User Preferences"
        ],
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UserPreferenceValueObject"
                    },
                    {
                      "$ref": "#/components/schemas/UserPreferenceValueString"
                    }
                  ]
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Got a specific user preference",
                    "value": "{no example available}"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/user_preferences/{user_preference_key}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "put": {
        "operationId": "user_preferences_update",
        "summary": "Update the user preference",
        "description": "Update the user preference",
        "tags": [
          "User Preferences"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/UserPreferenceValueObject"
                  },
                  {
                    "$ref": "#/components/schemas/UserPreferenceValueString"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "key in User Preferences updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "key in User Preferences updated successfully",
                    "value": "{}"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PUT' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/user_preferences/{user_preference_key}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "operationId": "user_preferences_delete",
        "summary": "Delete the user preference",
        "description": "Delete the user preference",
        "tags": [
          "User Preferences"
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Delete the user preference",
                    "value": "(no example available)"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'DELETE' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/user_preferences/{user_preference_key%20}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/integrated_systems": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "integrated_systems_list",
        "summary": "List integrated systems",
        "description": "List integrated systems",
        "tags": [
          "Integrated Systems"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "comma-separated list of type for the integrated system",
            "schema": {
              "$ref": "#/components/schemas/IntegratedSystemType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Integrated Systems returned successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegratedSystemCollection"
                },
                "examples": {
                  "response": {
                    "description": "Integrated Systems returned successfully",
                    "summary": "Success",
                    "value": {
                      "integrated_systems": [
                        {
                          "entity": {
                            "connection": {},
                            "credentials": {
                              "additionalProp1": {}
                            },
                            "description": "string",
                            "group_ids": [
                              "10000",
                              "10001"
                            ],
                            "name": "string",
                            "parameters": {},
                            "type": "open_pages",
                            "user_ids": [
                              "1000330999",
                              "1000331301"
                            ]
                          },
                          "metadata": {
                            "created_at": "2025-02-13T01:21:40.731Z",
                            "created_by": "IBMid-1100011XYZ",
                            "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                            "id": "string",
                            "modified_at": "2025-02-13T01:21:40.731Z",
                            "modified_by": "IBMid-1100011XYZ",
                            "url": "string"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/integrated_systems?type=slack&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "post": {
        "operationId": "integrated_systems_add",
        "summary": "Create a new integrated system",
        "description": "Create a new integrated system",
        "tags": [
          "Integrated Systems"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegratedSystem"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Integrated System successfully created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegratedSystemResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Integrated System successfully created.",
                    "value": {
                      "entity": {
                        "connection": {},
                        "credentials": {
                          "additionalProp1": {}
                        },
                        "description": "string",
                        "group_ids": [
                          "10000",
                          "10001"
                        ],
                        "name": "string",
                        "parameters": {},
                        "type": "open_pages",
                        "user_ids": [
                          "1000330999",
                          "1000331301"
                        ]
                      },
                      "metadata": {
                        "created_at": "2025-02-13T01:24:22.223Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-13T01:24:22.223Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/IntegratedSystemLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n    'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/integrated_systems?project_id={project_id}&space_id={space_id}' \\\n    -H 'accept: application/json' \\\n    -H 'Authorization: {Bearer token}' \\\n    -H 'Content-Type: application/json' \\\n    -d '{\n    \"name\": \"string\",\n    \"type\": \"open_pages\",\n    \"description\": \"string\",\n    \"credentials\": {\n      \"additionalProp1\": {}\n    },\n    \"connection\": {},\n    \"group_ids\": [\n      \"10000\",\n      \"10001\"\n    ],\n    \"user_ids\": [\n      \"1000330999\",\n      \"1000331301\"\n    ],\n    \"parameters\": {}\n  }'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/integrated_systems/{integrated_system_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/IntegratedSystemIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "integrated_systems_get",
        "summary": "Get a specific integrated system",
        "description": "Get a specific integrated system",
        "tags": [
          "Integrated Systems"
        ],
        "responses": {
          "200": {
            "description": "Integrated System details retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegratedSystemResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Integrated System details retrieved successfully",
                    "value": {
                      "entity": {
                        "connection": {},
                        "credentials": {
                          "additionalProp1": {}
                        },
                        "description": "string",
                        "group_ids": [
                          "10000",
                          "10001"
                        ],
                        "name": "string",
                        "parameters": {},
                        "type": "open_pages",
                        "user_ids": [
                          "1000330999",
                          "1000331301"
                        ]
                      },
                      "metadata": {
                        "created_at": "2025-02-13T01:26:10.476Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-13T01:26:10.476Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/integrated_systems/{integrated_system_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "operationId": "integrated_systems_update",
        "summary": "Update an integrated system",
        "description": "Update an integrated system",
        "tags": [
          "Integrated Systems"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Integrated System updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegratedSystemResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Integrated System updated successfully",
                    "value": {
                      "entity": {
                        "connection": {},
                        "credentials": {
                          "additionalProp1": {}
                        },
                        "description": "string",
                        "group_ids": [
                          "10000",
                          "10001"
                        ],
                        "name": "string",
                        "parameters": {},
                        "type": "open_pages",
                        "user_ids": [
                          "1000330999",
                          "1000331301"
                        ]
                      },
                      "metadata": {
                        "created_at": "2025-02-13T01:27:58.847Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-13T01:27:58.847Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/integrated_systems/{integrated_system_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json-patch+json' \\\n  -d '[\n  {\n    \"op\": \"add\",\n    \"path\": \"string\",\n    \"value\": {},\n    \"from\": \"string\"\n  }\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "operationId": "integrated_systems_delete",
        "summary": "Delete an integrated system",
        "description": "Delete an integrated system",
        "tags": [
          "Integrated Systems"
        ],
        "responses": {
          "204": {
            "description": "Integrated System deleted successfully.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Integrated System deleted successfully.",
                    "value": "(no example available)"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'DELETE' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/integrated_systems/{integrated_system_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/operational_spaces": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "operational_spaces_list",
        "summary": "List Operational Spaces",
        "description": "List Operational Spaces",
        "tags": [
          "Operational Spaces"
        ],
        "responses": {
          "200": {
            "description": "Operational Spaces returned successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationalSpaceCollection"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Operational Spaces returned successfully",
                    "value": {
                      "operational_spaces": [
                        {
                          "description": "string",
                          "name": "string"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/operational_spaces?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "post": {
        "operationId": "operational_spaces_add",
        "summary": "Create an operational space",
        "description": "Create an operational space",
        "tags": [
          "Operational Spaces"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperationalSpace"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Operational Space successfully created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationalSpaceResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Operational Space successfully created.",
                    "value": {
                      "entity": {
                        "description": "string",
                        "name": "string"
                      },
                      "metadata": {
                        "created_at": "2025-02-13T01:34:31.182Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-13T01:34:31.182Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "$ref": "#/components/schemas/OperationalSpaceLocationHeader"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/operational_spaces?project_id={project_id}&space_id={project_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"string\",\n  \"description\": \"string\"\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/operational_spaces/{operational_space_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/OperationalSpaceIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "operational_spaces_get",
        "summary": "Get an operational space",
        "description": "Get an operational space",
        "tags": [
          "Operational Spaces"
        ],
        "responses": {
          "200": {
            "description": "Operational Space details retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationalSpaceResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Operational Space details retrieved successfully",
                    "value": {
                      "entity": {
                        "description": "string",
                        "name": "string"
                      },
                      "metadata": {
                        "created_at": "2025-02-13T01:35:53.427Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-13T01:35:53.427Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/operational_spaces/{operational_space_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "patch": {
        "operationId": "operational_spaces_update",
        "summary": "Update an operational space",
        "description": "Update an operational space",
        "tags": [
          "Operational Spaces"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operational Space updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationalSpaceResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Operational Space updated successfully",
                    "value": {
                      "entity": {
                        "description": "string",
                        "name": "string"
                      },
                      "metadata": {
                        "created_at": "2025-02-13T01:37:14.838Z",
                        "created_by": "IBMid-1100011XYZ",
                        "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
                        "id": "string",
                        "modified_at": "2025-02-13T01:37:14.838Z",
                        "modified_by": "IBMid-1100011XYZ",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PATCH' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/operational_spaces/{operational_space_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json-patch+json' \\\n  -d '[\n  {\n    \"op\": \"add\",\n    \"path\": \"string\",\n    \"value\": {},\n    \"from\": \"string\"\n  }\n]'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "operationId": "operational_spaces_delete",
        "summary": "Delete an operational space",
        "description": "Delete an operational space",
        "tags": [
          "Operational Spaces"
        ],
        "responses": {
          "204": {
            "description": "Operational Space deleted successfully.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Operational Space deleted successfully.",
                    "value": "(no example available)"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'DELETE' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/operational_spaces/{operational_space_id}?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/explanation_tasks": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "description": "Submit tasks for computing explanation of predictions",
        "summary": "Compute explanations",
        "operationId": "explanation_tasks_add",
        "tags": [
          "Explanation Tasks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplanationTaskRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Explanation request submitted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostExplanationTaskResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Explanation request submitted successfully",
                    "value": {
                      "metadata": {
                        "created_at": "2018-11-01 09:16:45.783596",
                        "created_by": "IBMid-123456",
                        "explanation_task_ids": [
                          "explanation_task_id1",
                          "explanation_task_id2"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/explanation_tasks?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"scoring_ids\": [\n    \"scoring_id1\",\n    \"scoring_id2\"\n  ],\n  \"input_rows\": [\n    {\n      \"feature1\": \"value1\",\n      \"probability\": [\n        0.4,\n        0.6\n      ],\n      \"prediction\": \"classA\",\n      \"scoring_id\": \"scoring_id1\",\n      \"subscription_id\": \"c37c3c7c-67ae-48be-84bd-86cd2b25e618\",\n      \"service_provider_id\": \"c37c3c7c-67ae-48be-84bd-86cd2b25e619\",\n      \"deployment_id\": \"c37c3c7c-67ae-48be-84bd-86cd2b25e620\"\n    }\n  ],\n  \"explanation_types\": [\n    \"lime\"\n  ],\n  \"subscription_id\": \"c37c3c7c-67ae-48be-84bd-86cd2b25e618\"\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "operationId": "explanation_tasks_list",
        "summary": "List all explanations",
        "description": "List of all the computed explanations",
        "tags": [
          "Explanation Tasks"
        ],
        "parameters": [
          {
            "name": "subscription_id",
            "in": "query",
            "description": "Unique subscription ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionId"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "offset of the explanations to return",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of explanations to return",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "scoring_id",
            "in": "query",
            "description": "ID of the scoring transaction",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Status of the explanation task",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "in_progress",
                "finished",
                "error"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Explanations successfully retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetExplanationTasksResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Explanations successfully retrieved",
                    "value": {
                      "explanation_fields": [
                        "explanation_task_id",
                        "scoring_id",
                        "created_at",
                        "finished_at",
                        "status",
                        "prediction",
                        "subscription_id",
                        "deployment_id",
                        "asset_name",
                        "deployment_name"
                      ],
                      "explanation_values": [
                        [
                          "explanation_task_id1",
                          "scoring_id1",
                          "2020-05-18T10:01:38.207844Z",
                          "2020-05-18T10:18:56.863283Z",
                          "finished",
                          "prediction1",
                          "subscription_id1",
                          "deployment_id1",
                          "Asset name1",
                          "Deployment name1"
                        ],
                        [
                          "explanation_task_id2",
                          "scoring_id2",
                          "2020-05-18T06:04:44.915682Z",
                          "2020-05-18T06:04:56.521611Z",
                          "error",
                          "prediction2",
                          "subscription_id2",
                          "deployment_id2",
                          "Asset name2",
                          "Deployment name2"
                        ]
                      ],
                      "limit": 5,
                      "offset": 2,
                      "total_count": 10
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/explanation_tasks?subscription_id={subscription_id}&offset={offset}&limit={limit}&scoring_id={scoring_id}&status={status}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/explanation_tasks/{explanation_task_id}": {
      "parameters": [
        {
          "in": "path",
          "name": "explanation_task_id",
          "schema": {
            "type": "string"
          },
          "description": "ID of the explanation task",
          "required": true,
          "example": "9fdaa46c-c124-4700-b794-6d6a5262c3aa"
        },
        {
          "in": "query",
          "name": "subscription_id",
          "schema": {
            "$ref": "#/components/schemas/SubscriptionId"
          },
          "description": "Unique subscription ID",
          "required": false
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "explanation_tasks_get",
        "summary": "Get explanation",
        "description": "Get explanation for the given explanation task id",
        "tags": [
          "Explanation Tasks"
        ],
        "responses": {
          "200": {
            "description": "Explanation successfully retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetExplanationTaskResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Explanation successfully retrieved",
                    "value": {
                      "entity": {
                        "asset": {
                          "deployment": {
                            "id": "deployment_id",
                            "name": "deployment_name"
                          },
                          "id": "asset_id",
                          "input_data_type": "structured",
                          "name": "asset_name",
                          "problem_type": "binary"
                        },
                        "errors": [
                          {
                            "error": {
                              "code": "AIQES1001E",
                              "message": "There was an error while computing the explanation."
                            },
                            "explanation_type": "lime",
                            "trace_id": "cddd239ec9df40108170ea7ce6dfca43"
                          }
                        ],
                        "explanations": [
                          {
                            "explanation_type": "lime",
                            "predictions": [
                              {
                                "explanation_features": [
                                  {
                                    "feature_name": "feature_name",
                                    "feature_range": {
                                      "max": "100",
                                      "max_inclusive": false,
                                      "min": "10",
                                      "min_inclusive": true
                                    },
                                    "feature_value": "feature_value",
                                    "importance": 1,
                                    "weight": 0.18
                                  }
                                ],
                                "probability": 0.8,
                                "value": "class1"
                              }
                            ]
                          },
                          {
                            "explanation_type": "contrastive",
                            "pertinent_negative": {
                              "features": [
                                {
                                  "feature_name": "feature_name",
                                  "feature_range": {
                                    "max": "100",
                                    "max_inclusive": false,
                                    "min": "10",
                                    "min_inclusive": true
                                  },
                                  "feature_value": "feature_value",
                                  "importance": 1,
                                  "weight": 0.18
                                }
                              ],
                              "prediction": "class2",
                              "probability": 0.6
                            },
                            "pertinent_positive": {
                              "features": [
                                {
                                  "feature_name": "feature_name",
                                  "feature_range": {
                                    "max": "100",
                                    "max_inclusive": false,
                                    "min": "10",
                                    "min_inclusive": true
                                  },
                                  "feature_value": "feature_value",
                                  "importance": 1,
                                  "weight": 0.18
                                }
                              ]
                            }
                          }
                        ],
                        "input_features": [
                          {
                            "feature_type": "numerical",
                            "name": "feature_name",
                            "value": "feature_value"
                          }
                        ],
                        "perturbed": false,
                        "scoring_id": "scoring_id1",
                        "status": {
                          "state": "in_progress"
                        }
                      },
                      "metadata": {
                        "created_at": "2018-11-01 09:16:45.783596",
                        "created_by": "IBMid-123456",
                        "explanation_task_id": "explanation_task_id1",
                        "updated_at": "2018-11-01 09:16:45.783596"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/explanation_tasks/{explanation_task_id}?subscription_id={subscription_id}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitoring_services/drift_v2/archives": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "put": {
        "operationId": "upload_drift_v2_archive",
        "summary": "Upload drift_v2 archive for a given subscription",
        "description": "This API is used to upload the drift_v2 archive necessary to configure the Drift v2 monitor.",
        "parameters": [
          {
            "in": "query",
            "name": "subscription_id",
            "description": "The id of the subscription.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "86131af1-8e7f-4c9e-811b-437730ece50"
          },
          {
            "in": "query",
            "name": "archive_name",
            "description": "The name of the archive being uploaded.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "user_drift.tar.gz"
          }
        ],
        "tags": [
          "Drift v2 Service"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The archive was uploaded successfully.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "description": "The archive was uploaded successfully.",
                    "summary": "Success"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform the action.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "description": "The user is not authorized to perform the action.",
                    "summary": "Invalid"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "description": "Internal server error.",
                    "summary": "Error"
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              "curl -X \\\nPUT \"https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/drift_v2/archives?subscription_id={subscription_id}&archive_name=user_drift.tar.gz&project_id={project_id}&space_id={space_id}\" \\\n-H \"accept: */*\" \\\n-H \"Content-Type: application/octet-stream\" \\\n-d {}"
            ]
          }
        }
      },
      "get": {
        "operationId": "download_drift_v2_archive",
        "summary": "Get drift v2 archive for a given subscription",
        "description": "This API is used to download the drift_v2 Archives.",
        "parameters": [
          {
            "in": "query",
            "name": "subscription_id",
            "description": "The id of the subscription.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "86131af1-8e7f-4c9e-811b-437730ece50"
          },
          {
            "in": "query",
            "name": "archive_id",
            "description": "The id of the archive to be downloaded. It will download the latest baseline archive by default.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "baseline"
          }
        ],
        "tags": [
          "Drift v2 Service"
        ],
        "responses": {
          "200": {
            "description": "The archive was retrieved successfully.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "The archive was retrieved successfully.",
                    "value": "{}"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform the action.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Invalid",
                    "description": "The user is not authorized to perform the action."
                  }
                }
              }
            }
          },
          "404": {
            "description": "The archive was not found.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Data error",
                    "description": "The archive was not found."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal server error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/drift_v2/archives?subscription_id={subscription_id}&archive_id={archive_id}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/octet-stream' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "head": {
        "operationId": "download_drift_v2_archive_metadata",
        "summary": "Get drift archive metadata for a given subscription",
        "parameters": [
          {
            "in": "query",
            "name": "subscription_id",
            "description": "The id of the subscription.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "86131af1-8e7f-4c9e-811b-437730ece50"
          },
          {
            "in": "query",
            "name": "archive_id",
            "description": "The id of the archive to be downloaded. It will download the latest baseline archive by default.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "baseline"
          }
        ],
        "tags": [
          "Drift v2 Service"
        ],
        "responses": {
          "200": {
            "description": "The archive was retrieved successfully.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "The archive was retrieved successfully."
                  }
                }
              }
            },
            "headers": {
              "X-Object-Meta-archive-name": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Object-Meta-drift-data-set-id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Object-Meta-drift-data-set-type": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform the action.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access Error",
                    "description": "The user is not authorized to perform the action."
                  }
                }
              }
            }
          },
          "404": {
            "description": "The archive was not found.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Data error",
                    "description": "The archive was not found."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Server Error",
                    "description": "Internal server error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'HEAD' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/drift_v2/archives?subscription_id={subscription_id}&archive_id={archive_id}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitoring_services/drift/data_marts/{data_mart_id}/subscriptions/{subscription_id}/archives": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataMartIdParameter"
        },
        {
          "$ref": "#/components/parameters/SubscriptionIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "operationId": "drift_archive_post",
        "summary": "Upload Drift archives.",
        "description": "API to upload drift archive such as the Drift Detection Model.",
        "parameters": [
          {
            "in": "query",
            "name": "archive_name",
            "schema": {
              "type": "string",
              "default": "user_drift.tar.gz"
            },
            "description": "The name of the archive being uploaded.",
            "required": false
          },
          {
            "in": "query",
            "name": "enable_data_drift",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "description": "Flag to enable/disable data drift.",
            "required": false
          },
          {
            "in": "query",
            "name": "enable_model_drift",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "description": "Flag to enable/disable model drift.",
            "required": false
          }
        ],
        "tags": [
          "Drift Service"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The archive was uploaded successfully.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "The archive was uploaded successfully."
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform the action.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "The user is not authorized to perform the action."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal server error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              "curl -X POST \\\n\"https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/drift/data_marts/{data_mart_id}/subscriptions/{subscription_id}/archives?archive_name=user_drift.tar.gz&enable_data_drift=true&enable_model_drift=true&project_id={project_id}&space_id={space_id}\" \\\n-H \"accept: */*\" \\\n-H \"Content-Type: application/octet-stream\" \n-d {}"
            ]
          }
        }
      }
    },
    "/v2/monitoring_services/drift/monitor_instances/{monitor_instance_id}/archives": {
      "parameters": [
        {
          "$ref": "#/components/parameters/MonitorInstanceIdParameter"
        },
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "drift_archive_get",
        "summary": "Retrieves the Drift archives.",
        "description": "API to retrieve the Drift archives.",
        "tags": [
          "Drift Service"
        ],
        "responses": {
          "200": {
            "description": "The archive was retrieved successfully.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "The archive was retrieved successfully.",
                    "value": "{}"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform the action.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "The user is not authorized to perform the action."
                  }
                }
              }
            }
          },
          "404": {
            "description": "The archive was not found.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Data error",
                    "description": "The archive was not found."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal server error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/drift/monitor_instances/{monitor_instance_id}/archives?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/octet-stream' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "head": {
        "operationId": "drift_archive_head",
        "summary": "Retrieves the Drift archive metadata.",
        "description": "API to retrieve the Drift archive metadata.",
        "tags": [
          "Drift Service"
        ],
        "responses": {
          "200": {
            "description": "The archive metadata was retrieved successfully.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "The archive metadata was retrieved successfully."
                  }
                }
              }
            },
            "headers": {
              "Content-Type": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "number",
                  "format": "double"
                }
              },
              "X-Object-Meta-name": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform the action.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "The user is not authorized to perform the action."
                  }
                }
              }
            }
          },
          "404": {
            "description": "The archive metadata was not found.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Data error",
                    "description": "The archive metadata was not found."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal server error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'HEAD' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/drift/monitor_instances/{monitor_instance_id}/archives?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: */*' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitoring_services/explainability/archives": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "put": {
        "operationId": "explainability_archive_put",
        "summary": "Upload explainability configuration archive.",
        "description": "API to upload explainability configuration archive containing the explainability artifacts. The api can also be used to update the archive.",
        "parameters": [
          {
            "name": "subscription_id",
            "in": "query",
            "description": "Unique subscription ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionId"
            }
          }
        ],
        "tags": [
          "Explainability Service"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The archive was uploaded successfully.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "The archive was uploaded successfully."
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform the action.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "The user is not authorized to perform the action."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal server error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X \\\nPUT \"https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/explainability/archives?subscription_id={subscription_id}&project_id={project_id}&space_id={space_id}\" \\\n-H \"accept: */*\" \\\n-H \"Content-Type: application/octet-stream\" \\\n-d {}"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "post": {
        "operationId": "explainability_archive_post",
        "summary": "Upload explainability configuration archive.",
        "description": "API to upload explainability configuration archive containing the explainability artifacts. The api can also be used to update the archive.",
        "parameters": [
          {
            "name": "subscription_id",
            "in": "query",
            "description": "Unique subscription ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionId"
            }
          }
        ],
        "tags": [
          "Explainability Service"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The archive was uploaded successfully.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "The archive was uploaded successfully."
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform the action.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "The user is not authorized to perform the action."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/octet-stream": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal server error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X \\\nPOST \"https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/explainability/archives?subscription_id={subscription_id}&project_id={project_id}&space_id={space_id}\" \\\n-H \"accept: */*\" \\\n-H \"Content-Type: application/octet-stream\" \\\n-d {}"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "operationId": "explainability_archive_get",
        "summary": "Download the Explainability configuration archive.",
        "description": "API to download the Explainability archive.",
        "parameters": [
          {
            "name": "subscription_id",
            "in": "query",
            "description": "Unique subscription ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/SubscriptionId"
            }
          }
        ],
        "tags": [
          "Explainability Service"
        ],
        "responses": {
          "200": {
            "description": "The archive was retrieved successfully.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "The archive was retrieved successfully."
                  }
                }
              }
            }
          },
          "401": {
            "description": "The user is not authorized to perform the action.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "The user is not authorized to perform the action."
                  }
                }
              }
            }
          },
          "404": {
            "description": "The archive was not found.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Data error",
                    "description": "The archive was not found."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal server error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/explainability/archives?subscription_id={subscription_id%20}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/octet-stream' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/spark_schemas": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "operationId": "spark_schemas_post",
        "summary": "Parse a given file and extract the schema in Spark StructType format.",
        "description": "API to consume a file such as CSV and returns the schema in Spark StructType format.",
        "tags": [
          "Schema Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "text/csv": {
              "schema": {
                "type": "string"
              },
              "example": "GENDER,AGE,IS_TENT,PURCHASE_AMOUNT,prediction,probability,string_array\nF,34,true,121.60,false,\"[0.9,0.1]\",\"[\\\"a\\\",\\\"b\\\"]\"\nM,35,false,121.61,false,\"[0.8,0.2]\",\"[\\\"a\\\",\\\"b\\\"]\"\n"
            }
          }
        },
        "responses": {
          "200": {
            "description": "The given file was successfully parsed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SparkStruct"
                },
                "example": "{\n  \"fields\": [\n    {\"metadata\": {},\"name\": \"GENDER\",\"nullable\": true,\"type\": \"string\"},\n    {\"metadata\": {},\"name\": \"AGE\",\"nullable\": true,\"type\": \"integer\"},\n    {\"metadata\": {},\"name\": \"IS_TENT\",\"nullable\": true,\"type\": \"boolean\"},\n    {\"metadata\": {},\"name\": \"PURCHASE_AMOUNT\",\"nullable\": true,\"type\": \"double\"},\n    {\"metadata\": {},\"name\": \"prediction\",\"nullable\": true,\"type\": \"boolean\"},\n    {\"metadata\": {},\"name\": \"probability\",\"nullable\": true,\n      \"type\": {\n        \"containsNull\": true,\n        \"elementType\": \"double\",\n        \"type\": \"array\"\n      }\n    },\n    {\"metadata\": {},\"name\": \"string_array\",\"nullable\": true,\n      \"type\": {\n        \"containsNull\": true,\n        \"elementType\": \"string\",\n        \"type\": \"array\"\n      }\n    }\n  ],\n  \"type\": \"struct\"\n}\n"
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n    'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/spark_schemas?project_id={project_id}&space_id={space_id}' \\\n    -H 'accept: application/json' \\\n    -H 'Authorization: {Bearer token}' \\\n    -H 'Content-Type: text/csv' \\\n    -d 'GENDER,AGE,IS_TENT,PURCHASE_AMOUNT,prediction,probability,string_array\n  F,34,true,121.60,false,\"[0.9,0.1]\",\"[\\\"a\\\",\\\"b\\\"]\"\n  M,35,false,121.61,false,\"[0.8,0.2]\",\"[\\\"a\\\",\\\"b\\\"]\"'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_evaluations": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "operationId": "mrm_risk_evaluations",
        "summary": "Uploads the test data and triggers a monitor run for risk evaluation.",
        "description": "Uploads the test data and triggers a monitor run for risk evaluation.",
        "tags": [
          "Model Risk Management"
        ],
        "requestBody": {
          "content": {
            "text/csv": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/json": {
              "schema": {
                "type": "object"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "string",
                    "format": "binary"
                  },
                  "body": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "monitor_instance_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The monitor instance ID."
          },
          {
            "in": "query",
            "name": "test_data_set_name",
            "schema": {
              "type": "string"
            },
            "description": "The name of the test CSV file being uploaded."
          },
          {
            "in": "query",
            "name": "publish_metrics",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Flag to decide whether to send evaluated metrics to OpenPages."
          },
          {
            "in": "query",
            "name": "publish_lineage",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Flag to decide whether a lineage event should be published to an integrated system."
          },
          {
            "in": "query",
            "name": "publish_fact",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Flag to decide whether Fact metadata should be published to an integrated system."
          },
          {
            "in": "query",
            "name": "includes_model_output",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Boolean flag to indicate whether the data being uploaded contains scored output or not."
          },
          {
            "in": "query",
            "name": "delimiter",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "The delimiter to be used for CSV/Dynamic CSV files."
          },
          {
            "in": "query",
            "name": "evaluation_tests",
            "schema": {
              "type": "string",
              "enum": [
                "drift",
                "fairness",
                "quality",
                "explainability"
              ]
            },
            "required": false,
            "description": "Comma separated list of monitor tests to run"
          }
        ],
        "responses": {
          "202": {
            "description": "Request accepted for risk evaluations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostRiskEvaluationsResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Request accepted for risk evaluations.",
                    "value": {
                      "evaluation_date": "string",
                      "evaluation_id": "string",
                      "evaluation_start_time": "string",
                      "evaluation_tests": "string",
                      "publish_metrics": "string",
                      "status": {
                        "state": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n    'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_evaluations?test_data_set_name={test_data_set_name}&publish_metrics={publish_metrics}&publish_lineage={publish_lineage}&publish_fact={publish_fact}&includes_model_output={ncludes_model_output}&delimiter={delimiter}&evaluation_tests={evaluation_tests}&project_id={project_id}&space_id={space_id}' \\\n    -H 'accept: application/json' \\\n    -H 'Authorization: {Bearer token}' \\\n    -H 'Content-Type: application/json' \\\n    -d '{}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "put": {
        "operationId": "mrm_put_risk_evaluation",
        "summary": "Cancels the risk evaluations run.",
        "description": "Cancels the risk evaluations run.",
        "tags": [
          "Model Risk Management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutRiskEvaluation"
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "monitor_instance_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The monitor instance ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Risk evaluation run canceled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskEvaluationResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Risk evaluation run canceled successfully.",
                    "value": {
                      "entity": {
                        "parameters": {
                          "monitorParam1": "value1",
                          "monitorParam2": 2,
                          "monitorParam3": {
                            "field1": "fieldvalue1"
                          },
                          "monitorParam4": [
                            "elem1",
                            "elem2"
                          ]
                        },
                        "status": {
                          "completed_at": "2025-02-13T09:14:58.048Z",
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "message": "string",
                          "operators": [
                            {
                              "id": "string",
                              "result": {
                                "additionalProp1": {}
                              },
                              "status": {
                                "completed_at": "2025-02-13T09:14:58.048Z",
                                "failure": {
                                  "errors": [
                                    {
                                      "code": "AISUT0002E",
                                      "message": "string",
                                      "parameters": [
                                        "string"
                                      ]
                                    }
                                  ],
                                  "trace": "string"
                                },
                                "started_at": "2025-02-13T09:14:58.048Z",
                                "state": "queued"
                              }
                            }
                          ],
                          "queued_at": "2025-02-13T09:14:58.048Z",
                          "started_at": "2025-02-13T09:14:58.048Z",
                          "state": "queued",
                          "updated_at": "2025-02-13T09:14:58.048Z"
                        },
                        "triggered_by": "event"
                      },
                      "metadata": {
                        "created_at": "string",
                        "created_by": "string",
                        "id": "string",
                        "modified_by": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PUT' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_evaluations?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"cancel_run\": \"string\"\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "operationId": "mrm_get_risk_evaluation",
        "summary": "Returns the status of the risk evaluation.",
        "description": "Returns the status of the risk evaluation.",
        "tags": [
          "Model Risk Management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "monitor_instance_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The monitor instance ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Gets the latest risk evaluations runs detail.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskEvaluationResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Gets the latest risk evaluations runs detail.",
                    "value": {
                      "entity": {
                        "parameters": {
                          "monitorParam1": "value1",
                          "monitorParam2": 2,
                          "monitorParam3": {
                            "field1": "fieldvalue1"
                          },
                          "monitorParam4": [
                            "elem1",
                            "elem2"
                          ]
                        },
                        "status": {
                          "completed_at": "2025-02-13T09:35:25.779Z",
                          "failure": {
                            "errors": [
                              {
                                "code": "AISUT0002E",
                                "message": "string",
                                "parameters": [
                                  "string"
                                ]
                              }
                            ],
                            "trace": "string"
                          },
                          "message": "string",
                          "operators": [
                            {
                              "id": "string",
                              "result": {
                                "additionalProp1": {}
                              },
                              "status": {
                                "completed_at": "2025-02-13T09:35:25.779Z",
                                "failure": {
                                  "errors": [
                                    {
                                      "code": "AISUT0002E",
                                      "message": "string",
                                      "parameters": [
                                        "string"
                                      ]
                                    }
                                  ],
                                  "trace": "string"
                                },
                                "started_at": "2025-02-13T09:35:25.779Z",
                                "state": "queued"
                              }
                            }
                          ],
                          "queued_at": "2025-02-13T09:35:25.779Z",
                          "started_at": "2025-02-13T09:35:25.779Z",
                          "state": "queued",
                          "updated_at": "2025-02-13T09:35:25.779Z"
                        },
                        "triggered_by": "event"
                      },
                      "metadata": {
                        "created_at": "string",
                        "created_by": "string",
                        "id": "string",
                        "modified_by": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_evaluations?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/runs/{monitoring_run_id}/integrated_system_metrics": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "put": {
        "operationId": "mrm_publish_metrics",
        "summary": "Publishes the chosen metrics to the integrated system reference.",
        "description": "Publishes the chosen metrics to the integrated system reference.",
        "tags": [
          "Model Risk Management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegratedSystemMetrics"
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "monitor_instance_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The monitor instance ID."
          },
          {
            "in": "path",
            "name": "monitoring_run_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The monitoring run ID."
          }
        ],
        "responses": {
          "202": {
            "description": "Request to publish the chosen metrics to the integrated system reference accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Request to publish the chosen metrics to the integrated system reference accepted."
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access Error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PUT' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/runs/{monitoring_run_id}/integrated_system_metrics?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"metrics\": [\n    {\n      \"type\": \"string\",\n      \"measures\": [\n        {}\n      ],\n      \"integrated_metrics\": [\n        {\n          \"integrated_system_type\": \"string\",\n          \"mapped_metrics\": \"string\"\n        }\n      ]\n    }\n  ],\n  \"send_report\": true\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/runs/{monitoring_run_id}/risk_evaluation_report": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "mrm_download_report",
        "summary": "Returns the risk evaluation report in a PDF format.",
        "description": "Returns the risk evaluation report in a PDF format.",
        "tags": [
          "Model Risk Management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "monitor_instance_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The monitor instance ID."
          },
          {
            "in": "path",
            "name": "monitoring_run_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The monitoring run ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully returned the risk evaluation report in a PDF format.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Successfully returned the risk evaluation report in a PDF format."
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/pdf": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/pdf": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/pdf": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/runs/{monitoring_run_id}/risk_evaluation_report?project_id={project_id}&space_id={space_id}' \\\n-H 'accept: application/pdf' \\\n-H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/subscriptions/risk_evaluation_status": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "get": {
        "operationId": "mrm_get_all_sub_risk_evaluation_status",
        "summary": "Returns the risk evaluation status of all subscriptions in a given service instance.",
        "description": "Returns the risk evaluation status of all subscriptions in a given service instance.",
        "tags": [
          "Model Risk Management"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "data_mart_id",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "The data mart ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully fetched the risk evaluation status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MrmGetRiskEvaluationStatusEntity"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Successfully fetched the risk evaluation status.",
                    "value": {
                      "risk_evaluation_status": [
                        {
                          "localized_status": "string",
                          "status": "string",
                          "subscription_id": "string"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/risk_evaluation_status?data_mart_id={data_mart_id}&project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/subscriptions/{subscription_id}/risk_evaluation_status": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "put": {
        "operationId": "mrm_update_risk_evaluation_status",
        "summary": "Updates the risk evaluation status for the given subscription.",
        "description": "Updates the risk evaluation status for the given subscription.",
        "tags": [
          "Model Risk Management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MrmUpdateRiskEvaluationStatusEntity"
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The subscription ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Updated risk evaluation status of the subscription successfully.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Updated risk evaluation status of the subscription successfully."
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PUT' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/risk_evaluation_status?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: */*' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"state\": \"string\"\n}'\n  "
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "operationId": "mrm_get_risk_evaluation_status",
        "summary": "Gets risk evaluation status for the given subscription.",
        "description": "Gets risk evaluation status for the given subscription.",
        "tags": [
          "Model Risk Management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The subscription ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Fetched risk evaluation status of the subscription successfully.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Fetched risk evaluation status of the subscription successfully."
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/risk_evaluation_status?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: */*' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/prompt_setup": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "post": {
        "operationId": "mrm_start_prompt_setup",
        "summary": "Performs the setup activities in Openscale for a given prompt template asset.",
        "description": "Performs the service provider creation, subscription creation and monitors configuration for the given prompt template asset.",
        "tags": [
          "Model Risk Management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptSetupRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "format": "binary"
                  },
                  "drift_archive": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/PromptTemplateAssetIdParameter"
          },
          {
            "$ref": "#/components/parameters/ProjectIdParameter"
          },
          {
            "$ref": "#/components/parameters/SpaceIdParameter"
          },
          {
            "$ref": "#/components/parameters/DeploymentIdParameter"
          }
        ],
        "responses": {
          "202": {
            "description": "Prompt setup request accepted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptSetupResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Prompt setup request accepted successfully.",
                    "value": {
                      "deployment_id": "075ef77c-3211-4098-bc7f-9ae783df6306",
                      "end_time": "string",
                      "mrm_monitor_instance_id": "string",
                      "project_id": "c5b95e10-d422-42f9-ba14-566fecfd550c",
                      "prompt_template_asset_id": "1c133af3-5115-4f31-8376-6975434288c8",
                      "service_provider_id": "348845a2-0099-45d1-a050-5960bb563249",
                      "space_id": "fa883e36-1bdf-445c-b66e-431b3fa49f10",
                      "start_time": "string",
                      "status": {
                        "failure": {
                          "errors": [
                            {
                              "code": "AISUT0002E",
                              "message": "string",
                              "parameters": [
                                "string"
                              ]
                            }
                          ],
                          "trace": "string"
                        },
                        "state": "RUNNING"
                      },
                      "subscription_id": "c37c3c7c-67ae-48be-84bd-86cd2b25e618"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/prompt_setup?prompt_template_asset_id={prompt_template_asset_id}&project_id={project_id}&space_id={space_id}&deployment_id={deployment_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"label_column\": \"string\",\n  \"operational_space_id\": \"string\",\n  \"problem_type\": \"string\",\n  \"classification_type\": \"string\",\n  \"input_data_type\": \"string\",\n  \"context_fields\": [\n    \"string\"\n  ],\n  \"question_field\": \"string\",\n  \"meta_fields\": [\n    {\n      \"name\": \"string\",\n      \"data_type\": [\n        \"string\",\n        \"double\",\n        \"boolean\",\n        \"integer\"\n      ]\n    }\n  ],\n  \"monitors\": {\n    \"monitor_definition_id\": {\n      \"parameters\": {},\n      \"thresholds\": [\n        {}\n      ]\n    }\n  }\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "operationId": "mrm_get_prompt_setup",
        "summary": "Gets the status of the prompt setup for the given prompt template asset.",
        "description": "Gets the status of the prompt setup for the given prompt template asset.",
        "tags": [
          "Model Risk Management"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PromptTemplateAssetIdParameter"
          },
          {
            "$ref": "#/components/parameters/ProjectIdParameter"
          },
          {
            "$ref": "#/components/parameters/SpaceIdParameter"
          },
          {
            "$ref": "#/components/parameters/DeploymentIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "The status of the prompt setup returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptSetupResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "The status of the prompt setup returned successfully.",
                    "value": {
                      "deployment_id": "075ef77c-3211-4098-bc7f-9ae783df6306",
                      "end_time": "string",
                      "mrm_monitor_instance_id": "string",
                      "project_id": "c5b95e10-d422-42f9-ba14-566fecfd550c",
                      "prompt_template_asset_id": "1c133af3-5115-4f31-8376-6975434288c8",
                      "service_provider_id": "348845a2-0099-45d1-a050-5960bb563249",
                      "space_id": "fa883e36-1bdf-445c-b66e-431b3fa49f10",
                      "start_time": "string",
                      "status": {
                        "failure": {
                          "errors": [
                            {
                              "code": "AISUT0002E",
                              "message": "string",
                              "parameters": [
                                "string"
                              ]
                            }
                          ],
                          "trace": "string"
                        },
                        "state": "RUNNING"
                      },
                      "subscription_id": "c37c3c7c-67ae-48be-84bd-86cd2b25e618"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/prompt_setup?prompt_template_asset_id={prompt_template_asset_id}&project_id={project_id}&space_id={space_id}&deployment_id={deployment_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_notifications": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdParameter"
        },
        {
          "$ref": "#/components/parameters/SpaceIdParameter"
        }
      ],
      "put": {
        "operationId": "mrm_update_notification_preferences",
        "summary": "Sets the users email notification preference in the MRM monitor instance of a given model subscription.",
        "description": "Sets the users email notification preference in the MRM monitor instance of a given model subscription.",
        "tags": [
          "Model Risk Management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RiskNotificationPreferencesRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "monitor_instance_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The monitor instance ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Notification preferences updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskNotificationPreferencesResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Notification preferences updated successfully.",
                    "value": {
                      "entity": {
                        "notification_emails": [
                          "string"
                        ],
                        "notification_enabled": true,
                        "notification_frequency": "string"
                      },
                      "metadata": {
                        "created_at": "string",
                        "created_by": "string",
                        "id": "string",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'PUT' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_notifications?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"notification_enabled\": true,\n  \"notification_frequency\": \"string\",\n  \"notification_emails\": [\n    \"string\"\n  ]\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "get": {
        "operationId": "mrm_get_notification_preferences",
        "summary": "Gets the users email notification preferences for a given model subscription.",
        "description": "Gets the users email notification preferences for a given model subscription.",
        "tags": [
          "Model Risk Management"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "monitor_instance_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The monitor instance ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Notification preferences returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskNotificationPreferencesResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Notification preferences returned successfully.",
                    "value": {
                      "entity": {
                        "notification_emails": [
                          "string"
                        ],
                        "notification_enabled": true,
                        "notification_frequency": "string"
                      },
                      "metadata": {
                        "created_at": "string",
                        "created_by": "string",
                        "id": "string",
                        "url": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Error",
                    "description": "Bad Request."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Access error",
                    "description": "Unauthorized."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "summary": "Internal error",
                    "description": "Internal Server Error."
                  }
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'GET' \\\n  'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_notifications?project_id={project_id}&space_id={space_id}' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}'\n  "
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/ml/v1/text/detection": {
      "post": {
        "operationId": "TextDetection",
        "summary": "Runs detections on a given input text.",
        "description": "Text Detection endpoint. Supports natural language inputs and returns the result of enabled detectors. You can specify any combination of HAP, PII, Prompt Safety Risk, topic relevance, Granite Guardian, Keyword and Regex detectors. Each detector is configurable independantly and atleast one detector is mandatory in the request.",
        "tags": [
          "Text Detection"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextDetectionContentRequest"
              },
              "examples": {
                "detect_pii": {
                  "summary": "text PII detection",
                  "description": "A PII text detection example.\n",
                  "value": {
                    "input": "my text to check",
                    "detectors": {
                      "pii": {}
                    }
                  }
                },
                "detect_hap": {
                  "summary": "A HAP text detection example.",
                  "description": "A HAP text detection example.\n",
                  "value": {
                    "input": "my text to check",
                    "detectors": {
                      "hap": {
                        "threshold": 0.5
                      }
                    }
                  }
                },
                "detect_granite_guardian": {
                  "summary": "A text detection example using granite guardian model.",
                  "description": "A text detection example using granite guardian model.\n",
                  "value": {
                    "input": "my text to check",
                    "detectors": {
                      "granite_guardian": {
                        "threshold": 0.5,
                        "risk_name": "jailbreak"
                      }
                    }
                  }
                },
                "detect_topic_relevance": {
                  "summary": "A topic relevance text detection example.",
                  "description": "A topic relevance text detection example.\n",
                  "value": {
                    "input": "my text to check",
                    "detectors": {
                      "topic_relevance": {
                        "threshold": 0.5,
                        "system_prompt": "my system prompt"
                      }
                    }
                  }
                },
                "detect_prompt_safety_risk": {
                  "summary": "A prompt safety risk text detection example.",
                  "description": "A prompt safety risk text detection example.\n",
                  "value": {
                    "input": "my text to check",
                    "detectors": {
                      "prompt_safety_risk": {
                        "threshold": 0.9,
                        "system_prompt": "my system prompt",
                        "enable_two_level_detection": false
                      }
                    }
                  }
                },
                "detect_keyword": {
                  "summary": "A keyword text detection example.",
                  "description": "A keyword text detection example.\n",
                  "value": {
                    "input": "my text to check",
                    "detectors": {
                      "keyword": {
                        "case_sensitive": false,
                        "keywords": [
                          "my_keyword_1",
                          "my_keyword_2"
                        ]
                      }
                    }
                  }
                },
                "detect_regex": {
                  "summary": "A regex pattern text detection example.",
                  "description": "A regex text detection example.\n",
                  "value": {
                    "input": "my text to check",
                    "detectors": {
                      "regex": {
                        "regex_patterns": [
                          "my_regex_pattern_1",
                          "my_regex_pattern_2"
                        ]
                      }
                    }
                  }
                },
                "detect_multiple": {
                  "summary": "text detection with multiple detectors",
                  "description": "A text detection with multiple detectors.\n",
                  "value": {
                    "input": "my text to check",
                    "detectors": {
                      "pii": {},
                      "hap": {
                        "threshold": 0.6
                      },
                      "granite_guardian": {
                        "threshold": 0.6,
                        "risk_name": "social_bias"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ServiceInstanceIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TextDetectionContentResponse"
                },
                "examples": {
                  "detect_pii": {
                    "summary": "text PII detection",
                    "description": "A PII text detection example",
                    "value": {
                      "detections": [
                        {
                          "start": 20,
                          "end": 24,
                          "detection_type": "pii",
                          "detection": "xxxx",
                          "score": 0.846
                        }
                      ]
                    }
                  },
                  "detect_hap": {
                    "summary": "A HAP text detection example.",
                    "description": "A HAP text detection example.\\n",
                    "value": {
                      "detections": [
                        {
                          "start": 122,
                          "end": 239,
                          "detection_type": "hap",
                          "detection": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
                          "score": 0.846
                        }
                      ]
                    }
                  },
                  "detect_granite_guardian": {
                    "summary": "A text detection example using Granite Guardian.",
                    "description": "A text detection example using Granite Guardian.\\n",
                    "value": {
                      "detections": [
                        {
                          "start": 0,
                          "end": 57,
                          "text": "my input text",
                          "detection_type": "risk",
                          "detection": "Yes",
                          "score": 0.97
                        }
                      ]
                    }
                  },
                  "detect_topic_relevance": {
                    "summary": "A topic relevance text detection example.",
                    "description": "A topic relevance text detection example.\\n",
                    "value": {
                      "detections": [
                        {
                          "start": 0,
                          "end": 74,
                          "text": "my input text",
                          "detection_type": "topic_relevance",
                          "detection": "off-topic",
                          "score": 0.9226847887039183
                        }
                      ]
                    }
                  },
                  "detect_prompt_safety_risk": {
                    "summary": "A prompt safety risk text detection example.",
                    "description": "A prompt safety risk text detection example.\\n",
                    "value": {
                      "detections": [
                        {
                          "start": 0,
                          "end": 74,
                          "text": "my input text",
                          "detection_type": "prompt_injection",
                          "detection": "attack_confidence",
                          "score": 0.8615
                        }
                      ]
                    }
                  },
                  "detect_keyword": {
                    "summary": "A keyword text detection example.",
                    "description": "A keyword text detection example.\\n",
                    "value": {
                      "detections": [
                        {
                          "start": 122,
                          "end": 239,
                          "text": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
                          "detection_type": "keyword",
                          "detection": "present",
                          "score": 1
                        }
                      ]
                    }
                  },
                  "detect_regex": {
                    "summary": "A regex text detection example.",
                    "description": "A regex text detection example.\\n",
                    "value": {
                      "detections": [
                        {
                          "start": 122,
                          "end": 239,
                          "text": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
                          "detection_type": "regex",
                          "detection": "has_regex",
                          "score": 1
                        }
                      ]
                    }
                  },
                  "detect_multiple": {
                    "summary": "text detection with multiple detectors",
                    "description": "A text detection with multiple detectors.\\n",
                    "value": {
                      "detections": [
                        {
                          "start": 20,
                          "end": 24,
                          "detection_type": "pii",
                          "detection": "xxxx",
                          "score": 0.846
                        },
                        {
                          "start": 122,
                          "end": 239,
                          "detection_type": "hap",
                          "detection": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
                          "score": 0.846
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request, the response body should contain the reason.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, an authentication error including trying to access an unauthorized watsonx.gov service instance.\n"
          },
          "404": {
            "description": "The specified resource was not found.\n"
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "detect hap",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n         \"hap\": {\n          \"threshold\": 0.5\n         }\n      },\n      \"input\": \"my text to check\"\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect pii",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n        \"pii\": {}\n      },\n      \"input\": \"my text to check\"\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect using Granite Guardian",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n        \"granite_guardian\": {\n          \"risk_name\": \"harm\",\n          \"threshold\": 0.6\n        }\n      },\n      \"input\": \"my text to check\"\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect topic relevance",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n        \"topic_relevance\": {\n          \"threshold\": 0.5,\n          \"system_prompt\": \"my system prompt\"\n        }\n      },\n      \"input\": \"my text to check\"\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect prompt safety risk",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n        \"prompt_safety_risk\": {\n          \"enable_two_level_detection\": false,\n          \"threshold\": 0.9,\n          \"system_prompt\": \"my system prompt\"\n        }\n      },\n      \"input\": \"my text to check\"\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect keyword",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n         \"keyword\": {\n          \"case_sensitive\": true,\n          \"keywords\": [\"my_keyword_1\", \"my_keyword_2\"]\n         }\n      },\n      \"input\": \"my text to check\"\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect regex",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n         \"regex\": {\n          \"regex_patterns\": [\"my_regex_pattern_1\", \"my_regex_pattern_2\"]\n         }\n      },\n      \"input\": \"my text to check\"\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect multiple",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n        \"hap\": {\n          \"threshold\": 0.5\n        },\n        \"pii\": {},\n        \"granite_guardian\": {\n          \"risk_name\": \"harm\",\n          \"threshold\": 0.6\n        }\n      },\n      \"input\": \"my text to check\"\n  }'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/ml/v1/text/detection/context": {
      "post": {
        "operationId": "TextDetectionContext",
        "summary": "Detection task on input content based on context documents.",
        "description": "This operation supports `context relevance` and `faithfulness` (or `groundedness`). The `input` is analyzed, along with the context information, and the model will return any detections that it found.",
        "tags": [
          "Text Detection"
        ],
        "requestBody": {
          "required": true,
          "description": "From a content, detect text using a detection model.\n",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextDetectionContextRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TextDetectionContextResponse"
                },
                "examples": {
                  "detect_context_relevance_1": {
                    "summary": "context relevance detection using granite_guardian",
                    "value": {
                      "detections": [
                        {
                          "detection_type": "context_relevance",
                          "detection": "relevant",
                          "detector_id": "granite_guardian_3_2_5b",
                          "score": 0.846
                        }
                      ]
                    }
                  },
                  "detect_context_relevance_2": {
                    "summary": "context relevance detection using context_relevance_model",
                    "value": {
                      "detections": [
                        {
                          "detection_type": "context_relevance",
                          "detection": "relevant",
                          "detector_id": "context_relevance_125m_v1_en",
                          "score": 0.9937,
                          "evidence": [
                            {
                              "name": "context",
                              "value": "",
                              "score": 0.9905,
                              "evidence": [
                                {
                                  "name": "context_chunk",
                                  "value": "evidence_value",
                                  "score": 0.9905
                                },
                                {
                                  "name": "context_chunk",
                                  "value": "evidence_value",
                                  "score": 0.9891
                                },
                                {
                                  "name": "context_chunk",
                                  "value": "evidence_value",
                                  "score": 0.987
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "detect_groundedness_1": {
                    "summary": "groundedness detection using granite_guardian",
                    "value": {
                      "detections": [
                        {
                          "detection_type": "faithfulness",
                          "detection": "factual",
                          "detector_id": "granite_guardian_3_2_5b",
                          "score": 0.846
                        }
                      ]
                    }
                  },
                  "detect_groundedness_2": {
                    "summary": "groundedness detection using faithfulness_model",
                    "value": {
                      "detections": [
                        {
                          "detection_type": "faithfulness",
                          "detection": "faithful",
                          "detector_id": "faithfulness_125m_v1_en",
                          "score": 0.9679,
                          "evidence": [
                            {
                              "name": "content_chunk",
                              "value": "evidence_value",
                              "score": 0.9679,
                              "evidence": [
                                {
                                  "name": "context_chunk",
                                  "value": "evidence_value",
                                  "score": 0.9679
                                },
                                {
                                  "name": "context_chunk",
                                  "value": "evidence_value",
                                  "score": 0.9637
                                },
                                {
                                  "name": "context_chunk",
                                  "value": "evidence_value",
                                  "score": 0.0317
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request, the response body should contain the reason.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, an authentication error including trying to access an unauthorized watsonx.gov service instance.\n"
          },
          "404": {
            "description": "The specified resource was not found.\n"
          },
          "500": {
            "description": "Internal Server Error."
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "detect context relevance",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection/context' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n         \"context_relevance\": {\n          \"threshold\": 0.5,\n          \"method\": \"granite_guardian\"\n         }\n      },\n      \"input\": \"my text to check\",\n      \"context_type\": \"docs\",\n      \"context\": [\"my_context_1\", \"my_context_2\"]\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect context relevance - old format",
                "deprecated": "This payload format is deprecated and will be removed in the future releases. Please use the new payload format.",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection/context' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n         \"granite_guardian\": {\n          \"threshold\": 0.5,\n          \"risk_name\": \"context_relevance\"\n         }\n      },\n      \"input\": \"my text to check\",\n      \"context_type\": \"docs\",\n      \"context\": [\"my_context_1\", \"my_context_2\"]\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect groundedness",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection/context' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n        \"faithfulness\": {\n          \"threshold\": 0.5,\n          \"method\": \"granite_guardian\"\n        }\n      },\n      \"input\": \"my text to check\",\n      \"context_type\": \"docs\",\n      \"context\": [\"my_context_1\", \"my_context_2\"]\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect groundedness - old format",
                "deprecated": "This payload format is deprecated and will be removed in the future releases. Please use the new payload format.",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection/context' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n        \"granite_guardian\": {\n          \"threshold\": 0.5,\n          \"risk_name\": \"groundedness\"\n        }\n      },\n      \"input\": \"my text to check\",\n      \"context_type\": \"docs\",\n      \"context\": [\"my_context_1\", \"my_context_2\"]\n  }'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/ml/v1/text/detection/generated": {
      "post": {
        "operationId": "TextDetectionGenerated",
        "summary": "Detection task performing detection on prompt and generated text.",
        "description": "This operation supports `answer relevance`. The `prompt` is analyzed along with the `generated text` and the model will return any detections that it found.",
        "tags": [
          "Text Detection"
        ],
        "requestBody": {
          "required": true,
          "description": "From a content, detect text using a detection model.\n",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextDetectionGeneratedRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TextDetectionGeneratedResponse"
                },
                "examples": {
                  "detect_answer_relevance_1": {
                    "summary": "answer relevance detection using granite_guardian",
                    "value": {
                      "detections": [
                        {
                          "detection_type": "answer_relevance",
                          "detection": "relevant",
                          "detector_id": "granite_guardian_3_2_5b",
                          "score": 0.846
                        }
                      ]
                    }
                  },
                  "detect_answer_relevance_2": {
                    "summary": "answer relevance detection using answer_relevance_model",
                    "value": {
                      "detections": [
                        {
                          "detection_type": "answer_relevance",
                          "detector_id": "answer_relevance_125m_v1_en",
                          "detection": "relevant",
                          "score": 0.0036
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request, the response body should contain the reason.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, an authentication error including trying to access an unauthorized watsonx.gov service instance.\n"
          },
          "404": {
            "description": "The specified resource was not found.\n"
          },
          "500": {
            "description": "Internal Server Error."
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "detect answer relevance using granite_guardian",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection/generated' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n         \"answer_relevance\": {\n          \"threshold\": 0.5,\n          \"method\": \"granite_guardian\"\n         }\n      },\n      \"prompt\": \"my input prompt\",\n      \"generated_text\": \"my model generated response\"\n  }'"
                    ]
                  }
                ]
              },
              {
                "name": "detect answer relevance - old format",
                "deprecated": "this payload format is deprecated and will be removed in the future releases. Please use the new payload format.",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection/generated' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n         \"granite_guardian\": {\n          \"threshold\": 0.5,\n          \"risk_name\": \"answer_relevance\"\n         }\n      },\n      \"prompt\": \"my input prompt\",\n      \"generated_text\": \"my model generated response\"\n  }'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/ml/v1/text/detection/chat": {
      "post": {
        "operationId": "TextDetectionChat",
        "summary": "Detection task performing function calling hallucination detection.",
        "description": "This operation supports `function calling hallucination`. The `input` is analyzed along with the `messages` and `tools` and the model will return any detections that it found with respect to the tool calls made.",
        "tags": [
          "Text Detection"
        ],
        "requestBody": {
          "required": true,
          "description": "From a content, detect text using a detection model.\n",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextDetectionChatRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TextDetectionGeneratedResponse"
                },
                "examples": {
                  "detect_function_calling_risk": {
                    "summary": "function calling risk detection",
                    "description": "function calling risk detection example",
                    "value": {
                      "detections": [
                        {
                          "detection_type": "risk",
                          "detection": "yes",
                          "detector_id": "granite_guardian_3_2_5b",
                          "score": 0.985042929649353
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request, the response body should contain the reason.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, an authentication error including trying to access an unauthorized watsonx.gov service instance.\n"
          },
          "404": {
            "description": "The specified resource was not found.\n"
          },
          "500": {
            "description": "Internal Server Error."
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "detect function calling risk",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl -X 'POST' \\\n  'https://us-south.ml.cloud.ibm.com/ml/v1/text/detection/chat' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: {Bearer token}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'x-governance-instance-id: {service_instance_id}' \\\n  -d '{\n      \"detectors\": {\n         \"granite_guardian\": {\n          \"threshold\": 0.5,\n          \"risk_name\": \"function_call\"\n         }\n      },\n      \"messages\": [\n        {\n            \"content\": \"Fetch the first 15 comments for the IBM video with ID 456789123.\",\n            \"role\": \"user\"\n        },\n        {\n            \"tool_calls\": [\n                {\n                    \"id\": \"thing\",\n                    \"function\": {\n                        \"arguments\": {\n                            \"awname_id\": 456789123,\n                            \"count\": 15\n                        },\n                        \"name\": \"comment_list\"\n                    },\n                    \"type\": \"function\"\n                }\n            ],\n            \"role\": \"assistant\"\n        }\n    ],\n    \"tools\": [\n        {\n            \"type\": \"function\",\n            \"function\": {\n                \"name\": \"comment_list\",\n                \"description\": \"Fetches a list of comments for a specified IBM video using the given API.\",\n                \"parameters\": {\n                    \"video_id\": {\n                        \"description\": \"The ID of the IBM video.\",\n                        \"type\": \"int\",\n                        \"default\": \"7178094165614464282\"\n                    },\n                    \"cursor\": {\n                        \"description\": \"The cursor for pagination to get the next page of comments. Defaults to 0.\",\n                        \"type\": \"int, optional\",\n                        \"default\": \"0\"\n                    },\n                    \"count\": {\n                        \"description\": \"The number of comments to fetch. Maximum is 30. Defaults to 20.\",\n                        \"type\": \"int, optional\",\n                        \"default\": \"20\"\n                    }\n                }\n            }\n        }\n    ]\n  }'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/guardrails_manager/v2/detectors": {
      "get": {
        "summary": "Get all detectors",
        "description": "Retrieves all detectors including both built-in detectors (from detector_template.json) and custom detectors (from CAMs)",
        "operationId": "list_detectors",
        "tags": [
          "Guardrails Manager"
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved all detectors",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "detectors",
                    "custom_detectors"
                  ],
                  "properties": {
                    "detectors": {
                      "type": "array",
                      "description": "List of built-in detectors from detector_template.json",
                      "items": {
                        "$ref": "#/components/schemas/DetectorResponse"
                      }
                    },
                    "custom_detectors": {
                      "type": "array",
                      "description": "List of custom detectors from CAMs",
                      "items": {
                        "$ref": "#/components/schemas/DetectorResponse"
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Successfully retrieved all detectors",
                    "value": {
                      "detectors": [
                        {
                          "entity": {
                            "actions": [
                              "block",
                              "mask"
                            ],
                            "description": "Detects personally identifiable or sensitive information such as phone number, email address, age, major credit card numbers.",
                            "detector_properties": [],
                            "has_threshold": false,
                            "id": "pii",
                            "is_input": true,
                            "is_output": true,
                            "name": "Personally Identifiable Information",
                            "status": {
                              "state": "active"
                            }
                          },
                          "metadata": {}
                        }
                      ],
                      "custom_detectors": [
                        {
                          "entity": {
                            "id": "id_string",
                            "inventory_id": "id_string",
                            "name": "custom_detector_example",
                            "description": "Example custom detector for demonstration",
                            "url": "https://api.example.com/detector/endpoint",
                            "actions": [
                              "block",
                              "mask"
                            ],
                            "metadata": {
                              "secret_id": "id_string"
                            },
                            "detector_properties": [
                              {
                                "name": "threshold",
                                "type": "number",
                                "min": 0,
                                "max": 10,
                                "default_value": 5
                              },
                              {
                                "name": "case_sensitive",
                                "type": "bool",
                                "default_value": "false"
                              },
                              {
                                "name": "pattern",
                                "type": "text",
                                "default_value": "example"
                              }
                            ],
                            "parameters": [
                              {
                                "name": "text",
                                "is_optional": true
                              },
                              {
                                "name": "context",
                                "is_optional": true
                              }
                            ],
                            "status": {
                              "state": "active"
                            }
                          },
                          "metadata": {
                            "id": "id_string",
                            "created_at": "2025-12-16T08:30:00Z",
                            "created_by": "string",
                            "modified_at": "2025-12-16T10:15:00Z",
                            "modified_by": "string"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User doesn't have permission to view detectors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl --request GET \\\n  --url 'https://aiopenscale.cloud.ibm.com/guardrails_manager/v2/detectors' \\\n  --header 'Authorization: Bearer {Bearer token}' \\\n  --header 'Content-Type: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "post": {
        "summary": "Create a detector",
        "description": "Creates a new detector with custom endpoint URL and configuration.",
        "operationId": "create_detector",
        "tags": [
          "Guardrails Manager"
        ],
        "parameters": [
          {
            "name": "X-Governance-Instance-Id",
            "in": "header",
            "required": true,
            "description": "Service instance ID (also known as Governance Instance ID or instance GUID)",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          {
            "name": "inventory_id",
            "in": "query",
            "required": true,
            "description": "CAMS inventory ID (UUID format)",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDetectorRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Detector created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectorResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Detector created successfully",
                    "value": {
                      "entity": {
                        "id": "id_string",
                        "inventory_id": "id_string",
                        "name": "custom_detector_prod_example",
                        "description": "Example custom detector for production use",
                        "url": "https://api.example.com/detector/custom-endpoint",
                        "actions": [
                          "block",
                          "mask"
                        ],
                        "metadata": {
                          "secret_id": "id_string"
                        },
                        "detector_properties": [
                          {
                            "name": "threshold",
                            "type": "number",
                            "min": 3,
                            "max": 7,
                            "default_value": 4
                          },
                          {
                            "name": "case_sensitive",
                            "type": "bool",
                            "default_value": "true"
                          },
                          {
                            "name": "input",
                            "type": "text",
                            "default_value": "sample_text"
                          }
                        ],
                        "parameters": [
                          {
                            "name": "text",
                            "is_optional": true
                          },
                          {
                            "name": "context",
                            "is_optional": true
                          }
                        ],
                        "status": {
                          "state": "active"
                        }
                      },
                      "metadata": {
                        "id": "id_string",
                        "created_at": "2025-12-16T11:35:38Z",
                        "created_by": "string",
                        "modified_at": "2025-12-16T11:35:38Z",
                        "modified_by": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Invalid input or validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User doesn't have permission to create detectors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl --request POST \\\n  --url 'https://aiopenscale.cloud.ibm.com/guardrails_manager/v2/detectors?inventory_id={inventory_id}' \\\n  --header 'Authorization: Bearer {Bearer token}' \\\n  --header 'Content-Type: application/json' \\\n  --header 'x-governance-instance-id: {service_instance_id}' \\\n  --data '{\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"url\": \"string\",\n  \"api_key\": \"string\",\n  \"direction\": [\n    \"input\",\n    \"output\"\n  ],\n  \"detector_properties\": [\n    {\n      \"name\": \"string\",\n      \"type\": \"number\",\n      \"min\": 0,\n      \"max\": 0,\n      \"default_value\": \"string\"\n    },\n    {\n      \"name\": \"string\",\n      \"type\": \"bool\",\n      \"default_value\": true\n    },\n    {\n      \"name\": \"string\",\n      \"type\": \"text\",\n      \"default_value\": \"string\"\n    }\n  ],\n  \"parameters\": [\n    {\n      \"name\": \"string\",\n      \"is_optional\": true\n    }\n  ]\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/guardrails_manager/v2/detectors/{id}": {
      "get": {
        "summary": "Get a detector by ID",
        "description": "Retrieves a specific custom detector by its ID",
        "operationId": "get_detector",
        "tags": [
          "Guardrails Manager"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The UUID of the detector to retrieve",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          },
          {
            "$ref": "#/components/parameters/InventoryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Detector retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectorResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Detector retrieved successfully",
                    "value": {
                      "entity": {
                        "id": "id_string",
                        "inventory_id": "id_string",
                        "name": "custom_detector_retrieved",
                        "description": "Retrieved custom detector example",
                        "url": "https://api.example.com/detector/retrieve-endpoint",
                        "actions": [
                          "block",
                          "mask"
                        ],
                        "metadata": {
                          "secret_id": "id_string"
                        },
                        "detector_properties": [
                          {
                            "name": "threshold",
                            "type": "number",
                            "min": 1,
                            "max": 10,
                            "default_value": 5
                          },
                          {
                            "name": "case_sensitive",
                            "type": "bool",
                            "default_value": "false"
                          },
                          {
                            "name": "pattern",
                            "type": "text",
                            "default_value": "default_pattern"
                          }
                        ],
                        "parameters": [
                          {
                            "name": "text",
                            "is_optional": true
                          },
                          {
                            "name": "context",
                            "is_optional": true
                          }
                        ],
                        "status": {
                          "state": "active"
                        }
                      },
                      "metadata": {
                        "id": "id_string",
                        "created_at": "2025-12-16T09:20:00Z",
                        "created_by": "string",
                        "modified_at": "2025-12-16T10:45:00Z",
                        "modified_by": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Invalid input or validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User doesn't have permission to view detectors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Detector not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl --request GET \\\n  --url 'https://aiopenscale.cloud.ibm.com/guardrails_manager/v2/detectors/{detector_id}?inventory_id={inventory_id}' \\\n  --header 'Authorization: Bearer {Bearer token}' \\\n  --header 'Content-Type: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/guardrails_manager/v2/enforce/{id}": {
      "post": {
        "summary": "Enforce a policy",
        "description": "Executes a policy by ID to detect and apply actions on the provided text based on configured detectors",
        "operationId": "create_enforce",
        "tags": [
          "Guardrails Manager"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The UUID of the policy to enforce",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          },
          {
            "name": "X-Governance-Instance-Id",
            "in": "header",
            "required": true,
            "description": "Service instance ID (also known as Governance Instance ID or instance GUID)",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          {
            "name": "inventory_id",
            "in": "query",
            "required": true,
            "description": "CAMS inventory ID (UUID format)",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnforceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Policy enforced successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnforceResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Policy enforced successfully",
                    "value": {
                      "entity": {
                        "text": "Sample text with sensitive information masked",
                        "status": {
                          "overall": "success",
                          "summary": {
                            "total_detectors": 12,
                            "succeeded": 12,
                            "failed": 0,
                            "succeeded_without_retry": 12,
                            "succeeded_with_retry": 0
                          },
                          "details": {
                            "failed_detectors": [],
                            "succeeded_with_retry": []
                          }
                        }
                      },
                      "metadata": {
                        "id": "id_string",
                        "created_at": "2025-12-16T12:05:30.123456Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Invalid input or validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User doesn't have permission to enforce policies",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Policy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl --request POST \\\n  --url 'https://aiopenscale.cloud.ibm.com/guardrails_manager/v2/enforce/{policy_id}?inventory_id={inventory_id}' \\\n  --header 'Authorization: Bearer {Bearer token}' \\\n  --header 'Content-Type: application/json' \\\n  --header 'x-governance-instance-id: {service_instance_id}' \\\n  --data '{\n  \"text\": \"Please send the report to john.doe@example.com\",\n  \"direction\": \"input\",\n  \"detectors_properties\": {\n    \"pii\": {},\n    \"hap\": {}\n  }\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/guardrails_manager/v2/policies": {
      "get": {
        "summary": "Get all policies",
        "description": "Retrieves a list of all policies with optional search and filtering by policy type",
        "operationId": "list_policies",
        "tags": [
          "Guardrails Manager"
        ],
        "parameters": [
          {
            "name": "inventory_id",
            "in": "query",
            "required": true,
            "description": "CAMS inventory ID (UUID format)",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          },
          {
            "name": "policytype",
            "in": "query",
            "required": true,
            "description": "Filter policies by type (publish for active, draft for inactive)",
            "schema": {
              "type": "string",
              "enum": [
                "publish",
                "draft"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Search term to filter policies by name or description",
            "schema": {
              "type": "string",
              "pattern": "^.*$",
              "minLength": 0,
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Policies retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyResponseCollection"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Policies retrieved successfully",
                    "value": {
                      "policies": [
                        {
                          "entity": {
                            "inventory_id": "id_string",
                            "id": "id_string",
                            "name": "Content Safety Policy Example",
                            "description": "Policy to detect and manage harmful content in user interactions",
                            "input": [
                              {
                                "detector": "pii"
                              },
                              {
                                "detector": "harm"
                              },
                              {
                                "detector": "jailbreak"
                              },
                              {
                                "detector": "social_bias"
                              },
                              {
                                "detector": "profanity"
                              },
                              {
                                "detector": "sexual_content"
                              }
                            ],
                            "output": [
                              {
                                "detector": "pii"
                              },
                              {
                                "detector": "harm"
                              },
                              {
                                "detector": "jailbreak"
                              },
                              {
                                "detector": "social_bias"
                              },
                              {
                                "detector": "profanity"
                              },
                              {
                                "detector": "sexual_content"
                              }
                            ],
                            "tags": [
                              "content_safety",
                              "production_ready"
                            ],
                            "status": {
                              "state": "active"
                            }
                          },
                          "metadata": {
                            "id": "id_string",
                            "created_at": "2025-12-15T14:30:00Z",
                            "created_by": "id_string",
                            "modified_at": "2025-12-15T16:45:00Z",
                            "modified_by": "id_string"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Invalid query parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User doesn't have permission to view policies",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl --request GET \\\n  --url 'https://aiopenscale.cloud.ibm.com/guardrails_manager/v2/policies?inventory_id={inventory_id}&policytype=publish' \\\n  --header 'Authorization: Bearer {Bearer token}' \\\n  --header 'Content-Type: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "post": {
        "summary": "Create a policy",
        "description": "Creates a new policy with detector and action configurations for input and output directions",
        "operationId": "create_policy",
        "tags": [
          "Guardrails Manager"
        ],
        "parameters": [
          {
            "name": "inventory_id",
            "in": "query",
            "required": true,
            "description": "CAMS inventory ID (UUID format)",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyResponsePrototype"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Policy created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Policy created successfully",
                    "value": {
                      "entity": {
                        "inventory_id": "id_string",
                        "id": "id_string",
                        "name": "policy",
                        "description": "description",
                        "block_message": "blocked",
                        "mask_character": "*",
                        "input": [
                          {
                            "action": "mask",
                            "detector": "detector",
                            "detector_properties": [
                              {
                                "name": "custom_detector_id",
                                "value": "id_string"
                              },
                              {
                                "name": "threshold",
                                "value": "0.2"
                              },
                              {
                                "name": "case_sensitive",
                                "value": "true"
                              },
                              {
                                "name": "input",
                                "value": "xyz"
                              }
                            ]
                          },
                          {
                            "action": "mask",
                            "detector": "detector_two",
                            "detector_properties": [
                              {
                                "name": "custom_detector_id",
                                "value": "id_string"
                              },
                              {
                                "name": "threshold",
                                "value": "3.5"
                              },
                              {
                                "name": "case_sensitive",
                                "value": "true"
                              },
                              {
                                "name": "input",
                                "value": "xyz"
                              }
                            ]
                          }
                        ],
                        "output": [],
                        "policy_status": "publish",
                        "tags": [
                          "CD",
                          "Demo"
                        ],
                        "status": {
                          "state": "active"
                        }
                      },
                      "metadata": {
                        "id": "id_string",
                        "created_at": "2025-12-09T20:02:37Z",
                        "created_by": "id_string",
                        "modified_at": "2025-12-09T20:02:37Z",
                        "modified_by": "id_string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Invalid input or validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User doesn't have permission to create policies",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl --request POST \\\n  --url 'https://aiopenscale.cloud.ibm.com/guardrails_manager/v2/policies?inventory_id={inventory_id}' \\\n  --header 'Authorization: Bearer {Bearer token}' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"block_message\": \"string\",\n  \"mask_character\": \"string\",\n  \"input\": [\n    {\n      \"action\": \"mask\",\n      \"detector\": \"string\",\n      \"detector_properties\": [\n        {\n          \"name\": \"custom_detector_id\",\n          \"value\": \"***\"\n        },\n        {\n          \"name\": \"string\",\n          \"value\": 0.8\n        },\n        {\n          \"name\": \"string\",\n          \"value\": true\n        },\n        {\n          \"name\": \"string\",\n          \"value\": \"test\"\n        }\n      ]\n    }\n  ],\n  \"output\": [\n    {\n      \"action\": \"mask\",\n      \"detector\": \"string\",\n      \"detector_properties\": [\n        {\n          \"name\": \"custom_detector_id\",\n          \"value\": \"***\"\n        },\n        {\n          \"name\": \"string\",\n          \"value\": 0.8\n        },\n        {\n          \"name\": \"string\",\n          \"value\": true\n        },\n        {\n          \"name\": \"string\",\n          \"value\": \"test\"\n        }\n      ]\n    }\n  ],\n  \"policy_status\": \"draft\",\n  \"tags\": [\"string1\", \"string2\"]\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    },
    "/guardrails_manager/v2/policies/{id}": {
      "get": {
        "summary": "Get a policy by ID",
        "description": "Retrieves a specific policy by its unique identifier",
        "operationId": "get_policy",
        "tags": [
          "Guardrails Manager"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Unique identifier for the policy (UUID format)",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          },
          {
            "name": "inventory_id",
            "in": "query",
            "required": true,
            "description": "CAMS inventory ID (UUID format)",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Policy retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Policy retrieved successfully",
                    "value": {
                      "entity": {
                        "inventory_id": "id_string",
                        "id": "id_string",
                        "name": "All detectors",
                        "description": "Description",
                        "block_message": "blocked",
                        "mask_character": "*",
                        "input": [
                          {
                            "action": "block",
                            "detector": "context_relevance",
                            "detector_properties": [
                              {
                                "name": "threshold",
                                "value": "0.5"
                              }
                            ]
                          },
                          {
                            "action": "block",
                            "detector": "violence",
                            "detector_properties": [
                              {
                                "name": "threshold",
                                "value": "0.25"
                              }
                            ]
                          }
                        ],
                        "output": [
                          {
                            "action": "block",
                            "detector": "context_relevance",
                            "detector_properties": [
                              {
                                "name": "threshold",
                                "value": "0.5"
                              }
                            ]
                          },
                          {
                            "action": "block",
                            "detector": "violence",
                            "detector_properties": [
                              {
                                "name": "threshold",
                                "value": "0.25"
                              }
                            ]
                          }
                        ],
                        "policy_status": "publish",
                        "tags": [
                          "detector_properties",
                          "test"
                        ],
                        "status": {
                          "state": "active"
                        }
                      },
                      "metadata": {
                        "id": "id_string",
                        "created_at": "2025-09-14T08:40:00Z",
                        "created_by": "id_string",
                        "modified_at": "2025-10-05T16:38:46Z",
                        "modified_by": "id_string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Invalid policy ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User doesn't have permission to view this policy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Policy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl --request GET \\\n  --url 'https://aiopenscale.cloud.ibm.com/guardrails_manager/v2/policies/{policy_id}?inventory_id={inventory_id}' \\\n  --header 'Authorization: Bearer {Bearer token}' \\\n  --header 'Content-Type: application/json'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "put": {
        "summary": "Update a policy",
        "description": "Updates an existing policy with new detector and action configurations",
        "operationId": "replace_policy",
        "tags": [
          "Guardrails Manager"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Unique identifier for the policy (UUID format)",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          },
          {
            "name": "inventory_id",
            "in": "query",
            "required": true,
            "description": "CAMS inventory ID (UUID format)",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyResponsePrototype"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Policy updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyResponse"
                },
                "examples": {
                  "response": {
                    "summary": "Success",
                    "description": "Policy updated successfully",
                    "value": {
                      "entity": {
                        "inventory_id": "id_string",
                        "id": "id_string",
                        "name": "All detectors",
                        "description": "Description",
                        "block_message": "blocked",
                        "mask_character": "*",
                        "input": [
                          {
                            "action": "block",
                            "detector": "context_relevance",
                            "detector_properties": [
                              {
                                "name": "threshold",
                                "value": "0.5"
                              }
                            ]
                          },
                          {
                            "action": "block",
                            "detector": "violence",
                            "detector_properties": [
                              {
                                "name": "threshold",
                                "value": "0.25"
                              }
                            ]
                          }
                        ],
                        "output": [
                          {
                            "action": "block",
                            "detector": "context_relevance",
                            "detector_properties": [
                              {
                                "name": "threshold",
                                "value": "0.5"
                              }
                            ]
                          },
                          {
                            "action": "block",
                            "detector": "violence",
                            "detector_properties": [
                              {
                                "name": "threshold",
                                "value": "0.25"
                              }
                            ]
                          }
                        ],
                        "policy_status": "publish",
                        "tags": [
                          "detector_properties",
                          "test"
                        ],
                        "status": {
                          "state": "active"
                        }
                      },
                      "metadata": {
                        "id": "id_string",
                        "created_at": "2025-09-14T08:40:00Z",
                        "created_by": "id_string",
                        "modified_at": "2025-10-05T16:38:46Z",
                        "modified_by": "id_string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Invalid input or validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User doesn't have permission to update this policy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Policy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl --request PUT \\\n  --url 'https://aiopenscale.cloud.ibm.com/guardrails_manager/v2/policies/{policy_id}?inventory_id={inventory_id}' \\\n  --header 'Authorization: Bearer {Bearer token}' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"block_message\": \"string\",\n  \"mask_character\": \"string\",\n  \"input\": [\n    {\n      \"action\": \"mask\",\n      \"detector\": \"string\",\n      \"detector_properties\": [\n        {\n          \"name\": \"custom_detector_id\",\n          \"value\": \"***\"\n        },\n        {\n          \"name\": \"string\",\n          \"value\": 0.8\n        },\n        {\n          \"name\": \"string\",\n          \"value\": true\n        },\n        {\n          \"name\": \"string\",\n          \"value\": \"test\"\n        }\n      ]\n    }\n  ],\n  \"output\": [\n    {\n      \"action\": \"mask\",\n      \"detector\": \"string\",\n      \"detector_properties\": [\n        {\n          \"name\": \"custom_detector_id\",\n          \"value\": \"***\"\n        },\n        {\n          \"name\": \"string\",\n          \"value\": 0.8\n        },\n        {\n          \"name\": \"string\",\n          \"value\": true\n        },\n        {\n          \"name\": \"string\",\n          \"value\": \"test\"\n        }\n      ]\n    }\n  ],\n  \"policy_status\": \"publish\",\n  \"tags\": [\"string1\", \"string2\"]\n}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      },
      "delete": {
        "summary": "Delete a policy",
        "description": "Deletes a policy by its unique identifier",
        "operationId": "delete_policy",
        "tags": [
          "Guardrails Manager"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Unique identifier for the policy (UUID format)",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          },
          {
            "name": "inventory_id",
            "in": "query",
            "required": true,
            "description": "CAMS inventory ID (UUID format)",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Policy deleted successfully (no content)"
          },
          "400": {
            "description": "Bad request - Invalid policy ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User doesn't have permission to delete this policy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Policy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailsErrorResponse"
                }
              }
            }
          }
        },
        "x-sdk-operations": {
          "request-examples": {
            "curl": [
              {
                "name": "Example request",
                "example": [
                  {
                    "type": "code",
                    "lang": "curl",
                    "source": [
                      "curl --request DELETE \\\n  --url 'https://aiopenscale.cloud.ibm.com/guardrails_manager/v2/policies/{policy_id}?inventory_id={inventory_id}' \\\n  --header 'Authorization: Bearer {Bearer token}'"
                    ]
                  }
                ]
              }
            ]
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "PromptTemplateAssetIdParameter": {
        "name": "prompt_template_asset_id",
        "in": "query",
        "required": true,
        "description": "The GUID of the prompt template asset.",
        "schema": {
          "$ref": "#/components/schemas/PromptTemplateAssetId"
        }
      },
      "ProjectIdParameter": {
        "name": "project_id",
        "in": "query",
        "required": false,
        "description": "The GUID of the project.",
        "schema": {
          "$ref": "#/components/schemas/ProjectId"
        }
      },
      "SpaceIdParameter": {
        "name": "space_id",
        "in": "query",
        "required": false,
        "description": "The GUID of the space.",
        "schema": {
          "$ref": "#/components/schemas/SpaceId"
        }
      },
      "DeploymentIdParameter": {
        "name": "deployment_id",
        "in": "query",
        "required": false,
        "description": "The GUID of the deployment.",
        "schema": {
          "$ref": "#/components/schemas/DeploymentId"
        }
      },
      "MonitorDefinitionIdParameter": {
        "name": "monitor_definition_id",
        "in": "path",
        "required": true,
        "description": "Unique monitor definition ID",
        "schema": {
          "$ref": "#/components/schemas/MonitorDefinitionId"
        }
      },
      "SubscriptionIdParameter": {
        "name": "subscription_id",
        "in": "path",
        "required": true,
        "description": "Unique subscription ID",
        "schema": {
          "$ref": "#/components/schemas/SubscriptionId"
        }
      },
      "SubscriptionIdParameterInQuery": {
        "name": "subscription_id",
        "in": "query",
        "required": false,
        "description": "Unique subscription ID",
        "schema": {
          "$ref": "#/components/schemas/SubscriptionId"
        }
      },
      "SubscriptionTablesDataSetTypeParameter": {
        "in": "path",
        "name": "dataset_type",
        "required": true,
        "description": "data set type of subscription",
        "schema": {
          "$ref": "#/components/schemas/SubscriptionTablesDataSetTypeName"
        }
      },
      "MonitorInstanceIdParameter": {
        "name": "monitor_instance_id",
        "in": "path",
        "required": true,
        "description": "Unique monitor instance ID",
        "schema": {
          "$ref": "#/components/schemas/MonitorInstanceId"
        }
      },
      "MonitoringRunIdParameter": {
        "name": "monitoring_run_id",
        "in": "path",
        "required": true,
        "description": "Unique monitoring run ID",
        "schema": {
          "$ref": "#/components/schemas/MonitoringRunId"
        }
      },
      "MonitoringRunIdsParameters": {
        "name": "run_id",
        "in": "query",
        "required": false,
        "description": "Comma delimited list of measurement run_id",
        "schema": {
          "type": "string"
        }
      },
      "PagingLimitParameter": {
        "name": "limit",
        "in": "query",
        "description": "The limit of the number of items to return, for example limit=50. If not specified a default of 100 will be  used.",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 100,
          "minimum": 1
        }
      },
      "PagingStartParameter": {
        "name": "start",
        "in": "query",
        "description": "The page token indicating where to start paging from.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "SecretIdParameter": {
        "name": "secret_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "ID of secret"
      },
      "UserPreferenceKeyParameter": {
        "name": "user_preference_key",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "key in user preferences"
      },
      "DataMartIdParameter": {
        "name": "data_mart_id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/DataMartId"
        },
        "description": "ID of the data mart"
      },
      "ServiceProviderIdParameter": {
        "name": "service_provider_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "ID of the ML service provider",
        "example": "446bae08-6ca9-459e-bf6b-fece996cc173"
      },
      "MeasurementIdParameter": {
        "name": "measurement_id",
        "in": "path",
        "required": true,
        "description": "Unique measurement ID",
        "schema": {
          "$ref": "#/components/schemas/MeasurementId"
        }
      },
      "DataDistributionId": {
        "name": "data_distribution_id",
        "description": "ID of the data distribution requested to be calculated",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "DataSetIdParameter": {
        "name": "data_set_id",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/DataSetId"
        },
        "description": "ID of the data set"
      },
      "RequestIdParameter": {
        "name": "request_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "ID of the request",
        "example": "77593143-15e8-443a-9e30-fe927aaa9d5d"
      },
      "RecordIdParameter": {
        "name": "record_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "ID of the record",
        "example": "4165a2fb-3b57-4b19-8a2b-037b9b0f7b08"
      },
      "IntegratedSystemIdParameter": {
        "name": "integrated_system_id",
        "in": "path",
        "required": true,
        "description": "Unique integrated system ID",
        "schema": {
          "$ref": "#/components/schemas/IntegratedSystemId"
        }
      },
      "OperationalSpaceIdParameter": {
        "name": "operational_space_id",
        "in": "path",
        "required": true,
        "description": "Unique Operational Space ID",
        "schema": {
          "$ref": "#/components/schemas/OperationalSpaceId"
        }
      },
      "BinaryFormatParameter": {
        "name": "binary_format",
        "in": "query",
        "description": "Binary data presentation format. By default, the binary field value is encoded to base64 string. If _reference_ is chosen, every binary field is moved to the _references_ section with value set to an uri to the particular field within the record that can be GET in a separate request.",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "reference"
          ]
        }
      },
      "ServiceInstanceIdParameter": {
        "name": "service_instance_id",
        "in": "header",
        "required": true,
        "description": "The instance id of watsonx.governance",
        "schema": {
          "type": "string",
          "$ref": "#/components/schemas/ServiceInstanceId"
        },
        "example": "4165a2fb-3b57-4b19-8a2b-037b9b0f7b08"
      },
      "ServiceInstanceId": {
        "name": "X-Governance-Instance-Id",
        "in": "header",
        "required": true,
        "description": "Service instance ID (also known as Governance Instance ID or instance GUID)",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        }
      },
      "InventoryId": {
        "name": "inventory_id",
        "in": "query",
        "required": true,
        "description": "CAMS inventory ID (UUID format)",
        "schema": {
          "type": "string",
          "format": "uuid",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
          "minLength": 36,
          "maxLength": 36
        }
      }
    },
    "securitySchemes": {
      "IAM": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      },
      "ICP4D": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "GUID": {
        "type": "string",
        "description": "The ID (typically a UUID v4) which uniquely identifies the resource",
        "example": "c5b95e10-d422-42f9-ba14-566fecfd550c",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "JsFormat": {
        "type": "string",
        "enum": [
          "dict",
          "list"
        ],
        "default": "dict"
      },
      "JsDict": {
        "type": "array",
        "description": "JSON dictionary format.",
        "items": {
          "$ref": "#/components/schemas/JsDictElem"
        }
      },
      "JsList": {
        "type": "object",
        "description": "JSON list (condensed) format.",
        "required": [
          "fields",
          "values"
        ],
        "properties": {
          "fields": {
            "$ref": "#/components/schemas/JsListFields"
          },
          "values": {
            "$ref": "#/components/schemas/JsListValues"
          }
        }
      },
      "JsDictElem": {
        "type": "object",
        "description": "Fields and values of the entity matches JSON object's fields and values."
      },
      "JsListFields": {
        "type": "array",
        "description": "Fields' names are listed in order in 'fields'.",
        "items": {
          "type": "string"
        },
        "example": [
          "GENDER",
          "PRODUCT_LINE",
          "AGE",
          "MARITAL_STATUS",
          "PROFESSION"
        ]
      },
      "JsListValues": {
        "type": "array",
        "description": "Rows organized per fields as described in 'fields'.",
        "items": {
          "$ref": "#/components/schemas/JsListValuesRow"
        }
      },
      "JsListValuesRow": {
        "type": "array",
        "description": "A row of v with the order as in 'fields'.",
        "items": {
          "description": "Value of the type relevant for given field."
        },
        "example": [
          "M",
          "Golf Equipment",
          25,
          "Unspecified",
          "Sales"
        ]
      },
      "Annotations": {
        "type": "object",
        "description": "Any JSON object representing annotations.",
        "additionalProperties": true,
        "example": {
          "biased": {
            "fairness_score": 0.62
          }
        }
      },
      "AnnotationList": {
        "type": "array",
        "description": "List of annotations objects.",
        "items": {
          "$ref": "#/components/schemas/Annotations"
        }
      },
      "Metadata": {
        "type": "object",
        "required": [
          "id",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID (typically a GUID) which uniquely identifies the resource"
          },
          "crn": {
            "type": "string",
            "example": "crn:v1:bluemix:public:aiopenscale:us-south:a/{account-id}:{instance-id}:{resource-type}:{resource-id}",
            "description": "Cloud Resource Name (CRN) uniquely identify IBM Cloud resource (https://console.bluemix.net/docs/overview/crn.html)\n"
          },
          "url": {
            "type": "string",
            "description": "The URL which can be used to uniquely refer to the resource\nTypically a GET on this url would return details of the resource, a DELETE would delete it and a PUT/PATCH would update it.\n"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the resource was first created\nIn format YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, matching the date-time format as specified by RFC 3339.\n"
          },
          "created_by": {
            "type": "string",
            "example": "IBMid-1100011XYZ",
            "description": "The IAM ID of the user who created the resource"
          },
          "modified_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the resource was first created\nIn format YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, matching the date-time format as specified by RFC 3339.\n"
          },
          "modified_by": {
            "type": "string",
            "example": "IBMid-1100011XYZ",
            "description": "The IAM ID of the user who last modified the resource"
          }
        }
      },
      "GenericErrorResponse": {
        "required": [
          "trace",
          "errors"
        ],
        "properties": {
          "trace": {
            "type": "string",
            "description": "ID of the original request"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "message"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Error code",
                  "example": "AISUT0002E"
                },
                "message": {
                  "type": "string",
                  "description": "Error message"
                },
                "parameters": {
                  "$ref": "#/components/schemas/GenericErrorParameters"
                }
              }
            }
          }
        }
      },
      "GenericErrorParameters": {
        "description": "Error message parameters",
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "ConfigurationSynchronization": {
        "type": "object",
        "properties": {
          "configurations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "monitor_definition_id": {
                  "type": "string"
                },
                "monitor_instance_id": {
                  "type": "string"
                },
                "monitor_instance_status": {
                  "type": "string"
                },
                "source_properties": {
                  "$ref": "#/components/schemas/GraphVertexProperties"
                },
                "status": {
                  "type": "string"
                },
                "target_properties": {
                  "$ref": "#/components/schemas/GraphVertexProperties"
                }
              }
            }
          }
        },
        "example": "{\n  \"configurations\": [\n    {\n      \"monitor_definition_id\": \"N/A\",\n      \"monitor_instance_id\": \"648135c1-d77f-4f91-a139-6cf25f3728f8\",\n      \"monitor_instance_status\": \"active\",\n      \"source_properties\": {\n        \"id\": \"439c3309-c678-4f24-93af-56134140b28a\",\n        \"properties\": {\n          \"target.target_type\": \"subscription\",\n          \"resource_type\": \"data_set\",\n          \"target.target_id\": \"e242a4c9-7a5f-418d-aeb4-6fcbe50e5158\",\n          \"rev\": \"67028956\",\n          \"status\": \"active\",\n          \"touched_at\": \"2024-04-04T06:42:27.517Z\",\n          \"type\": \"payload_logging\"\n        }\n      },\n      \"status\": \"exists\",\n      \"target_properties\": {\n        \"id\": \"648135c1-d77f-4f91-a139-6cf25f3728f8\",\n        \"properties\": {\n          \"target.target_type\": \"subscription\",\n          \"resource_type\": \"data_set\",\n          \"target.target_id\": \"99d0eca8-33bc-4bd4-8fb9-33248bcc2a45\",\n          \"rev\": \"67080940\",\n          \"status\": \"active\",\n          \"touched_at\": \"2024-04-05T02:12:57.314Z\",\n          \"type\": \"payload_logging\"\n        }\n      }\n    },\n    {\n      \"monitor_definition_id\": \"fairness\",\n      \"monitor_instance_id\": \"83ba7bb5-d344-4da7-a653-f0aa1b5492d9\",\n      \"monitor_instance_status\": \"error\",\n      \"source_properties\": {\n        \"id\": \"5aa308b4-3823-4db6-b5d3-2ce1e8ab70fe\",\n        \"properties\": {\n          \"target.target_type\": \"subscription\",\n          \"resource_type\": \"monitor_instance\",\n          \"target.target_id\": \"e242a4c9-7a5f-418d-aeb4-6fcbe50e5158\",\n          \"rev\": \"67029078\",\n          \"data_mart_id\": \"c7335e14-e3ba-491e-b7f3-e5fd9037e67e\",\n          \"monitor_definition_id\": \"fairness\",\n          \"status\": \"active\",\n          \"touched_at\": \"2024-04-04T06:44:33.485Z\"\n        }\n      }\n    ]\n  }       \n"
      },
      "GraphVertexProperties": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "properties": {
            "type": "object",
            "properties": {
              "target.target_type": {
                "type": "string"
              },
              "resource_type": {
                "type": "string"
              },
              "target.target_id": {
                "type": "string"
              },
              "rev": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "touched_at": {
                "type": "string",
                "format": "date-time"
              },
              "type": {
                "type": "string"
              }
            }
          }
        }
      },
      "CollectionUrlModel": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "description": "URI of a resource"
          }
        },
        "example": {
          "url": "https://server/path"
        }
      },
      "MonitorInstance": {
        "required": [
          "data_mart_id",
          "monitor_definition_id",
          "target"
        ],
        "properties": {
          "data_mart_id": {
            "$ref": "#/components/schemas/DataMartId"
          },
          "monitor_definition_id": {
            "$ref": "#/components/schemas/MonitorDefinitionId"
          },
          "target": {
            "$ref": "#/components/schemas/Target"
          },
          "parameters": {
            "$ref": "#/components/schemas/MonitorInstanceParameters"
          },
          "thresholds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricThresholdOverride"
            }
          },
          "schedule": {
            "$ref": "#/components/schemas/MonitorInstanceSchedule"
          },
          "schedule_id": {
            "type": "string"
          },
          "managed_by": {
            "type": "string"
          },
          "unprocessed_records": {
            "$ref": "#/components/schemas/RecordsCountSummary"
          },
          "total_records": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecordsCountSummary"
              },
              {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string"
                  }
                }
              }
            ]
          }
        }
      },
      "RecordsCountSummary": {
        "type": "object",
        "description": "Summary about records count\n",
        "required": [
          "count",
          "type"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "type": {
            "description": "The type of records time",
            "type": "string",
            "enum": [
              "payload_logging",
              "feedback"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "timestamp of last consumed record (only for unprocessed_records)"
          },
          "failure": {
            "$ref": "#/components/schemas/GenericErrorResponse"
          }
        }
      },
      "MonitorInstanceParameters": {
        "type": "object",
        "description": "Monitoring parameters consistent with the `parameters_schema` from the monitor definition",
        "additionalProperties": true,
        "example": {
          "monitorParam1": "value1",
          "monitorParam2": 2,
          "monitorParam3": {
            "field1": "fieldvalue1"
          },
          "monitorParam4": [
            "elem1",
            "elem2"
          ]
        }
      },
      "ScheduleStartTime": {
        "type": "object",
        "description": "Definition of first run time for scheduled activity; either absolute or relative the the moment of activation\n",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "description": "The type of start time",
            "type": "string",
            "enum": [
              "relative",
              "absolute"
            ]
          },
          "delay_unit": {
            "type": "string",
            "description": "must be set if type is `relative`",
            "enum": [
              "minute",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "delay": {
            "description": "must be set if type is `relative`",
            "type": "integer"
          },
          "timestamp": {
            "description": "must be set if type is `absolute`",
            "type": "string",
            "format": "date-time",
            "example": "2018-11-21T09:37:55.523Z"
          }
        },
        "example": {
          "type": "relative",
          "delay_unit": "minute",
          "delay": 2
        }
      },
      "MonitorInstanceSchedule": {
        "type": "object",
        "description": "The schedule used to control how frequently the target is monitored. The maximum frequency is once every 30 minutes.\nDefaults to once every hour if not specified.\n",
        "required": [
          "repeat_interval",
          "repeat_unit"
        ],
        "properties": {
          "repeat_interval": {
            "description": "The interval to monitor the target.",
            "type": "integer"
          },
          "repeat_unit": {
            "description": "The type of interval to monitor the target.",
            "type": "string",
            "enum": [
              "minute",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "start_time": {
            "$ref": "#/components/schemas/ScheduleStartTime"
          },
          "repeat_type": {
            "description": "The type of interval to monitor the target.",
            "type": "string"
          },
          "status": {
            "description": "The status of scheduler to trigger new evaluation based on configuration",
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          }
        },
        "example": {
          "repeat_interval": 1,
          "repeat_unit": "hour",
          "repeat_type": "hour"
        }
      },
      "MonitorInstanceScheduleCollection": {
        "type": "object",
        "description": "A set of schedules used to control how frequently the target is monitored for online and batch deployment type.\n",
        "properties": {
          "online": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MonitorInstanceSchedule"
              },
              {
                "description": "Schedule for online deployment type"
              }
            ]
          },
          "batch": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MonitorInstanceSchedule"
              },
              {
                "description": "Schedule for batch deployment type"
              }
            ]
          }
        },
        "example": {
          "online": {
            "repeat_interval": 3,
            "repeat_unit": "hour",
            "start_time": {
              "type": "relative",
              "delay_unit": "minute",
              "delay": 2
            },
            "repeat_type": "hour"
          },
          "batch": {
            "repeat_interval": 1,
            "repeat_unit": "week",
            "start_time": {
              "type": "relative",
              "delay_unit": "hour",
              "delay": 1
            },
            "repeat_type": "week"
          }
        }
      },
      "MonitorInstanceStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "preparing",
                  "active",
                  "failed",
                  "deleting",
                  "pending_delete"
                ]
              },
              "failure": {
                "$ref": "#/components/schemas/GenericErrorResponse"
              },
              "activity_status": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/components/schemas/ActivityStatusId"
                  },
                  "url": {
                    "$ref": "#/components/schemas/ActivityStatusUrl"
                  }
                }
              }
            },
            "required": [
              "state"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "MonitorInstanceResponse": {
        "type": "object",
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MonitorInstance"
              },
              {
                "$ref": "#/components/schemas/MonitorInstanceStatus"
              }
            ]
          }
        }
      },
      "MetricThresholdOverride": {
        "required": [
          "metric_id",
          "type"
        ],
        "properties": {
          "metric_id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "lower_limit",
              "upper_limit"
            ]
          },
          "value": {
            "type": "number",
            "format": "double",
            "description": "value of the threshold"
          },
          "specific_values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricSpecificThresholdShortObject"
            }
          }
        }
      },
      "PromptTemplateAssetId": {
        "type": "string",
        "example": "1c133af3-5115-4f31-8376-6975434288c8",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "ProjectId": {
        "type": "string",
        "example": "c5b95e10-d422-42f9-ba14-566fecfd550c",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "SpaceId": {
        "type": "string",
        "example": "fa883e36-1bdf-445c-b66e-431b3fa49f10",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "DeploymentId": {
        "type": "string",
        "example": "075ef77c-3211-4098-bc7f-9ae783df6306",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "DataMartId": {
        "type": "string",
        "example": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "ServiceProviderId": {
        "type": "string",
        "example": "348845a2-0099-45d1-a050-5960bb563249",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "MonitorDefinitionId": {
        "type": "string",
        "example": "quality",
        "minLength": 1,
        "maxLength": 255,
        "pattern": "[a-z0-9_\\-]+"
      },
      "MonitorInstanceId": {
        "type": "string",
        "example": "d901a7ac-4ec4-4e31-8eb2-7df72ec2a458",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9\\-]+"
      },
      "MonitoringRunId": {
        "type": "string",
        "example": "4d213d6d-92b0-46dd-8d9f-010ab78f4902",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9\\-]+"
      },
      "SubscriptionId": {
        "type": "string",
        "example": "c37c3c7c-67ae-48be-84bd-86cd2b25e618",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "ActivityStatusId": {
        "type": "string",
        "example": "c37c3c7c-67ae-48be-84bd-86cd2b25e618",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "IntegratedSystemId": {
        "type": "string",
        "example": "4d213d6d-92b0-46dd-8d9f-010ab78f4902",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9\\-]+"
      },
      "OperationalSpaceId": {
        "type": "string",
        "example": "4d213d6d-92b0-46dd-8d9f-010ab78f4902",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9\\-]+"
      },
      "ServiceInstanceId": {
        "type": "string",
        "example": "4d213d6d-92b0-46dd-8d9f-010ab78f4902",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9\\-]+"
      },
      "ActivityStatusUrl": {
        "type": "string",
        "example": "/v2/activity_statuses/c37c3c7c-67ae-48be-84bd-86cd2b25e618"
      },
      "SparkStructFieldPrimitive": {
        "required": [
          "name",
          "type",
          "nullable"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "nullable": {
            "type": "boolean"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "SparkStructFieldObject": {
        "required": [
          "name",
          "type",
          "nullable"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "object"
          },
          "nullable": {
            "type": "boolean"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "SparkStructField": {
        "description": "Spark struct field",
        "oneOf": [
          {
            "$ref": "#/components/schemas/SparkStructFieldPrimitive"
          },
          {
            "$ref": "#/components/schemas/SparkStructFieldObject"
          }
        ]
      },
      "SparkStruct": {
        "required": [
          "type",
          "fields"
        ],
        "properties": {
          "type": {
            "type": "string",
            "example": "struct"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SparkStructField"
            }
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "LocationSchemaName": {
        "type": "object",
        "properties": {
          "schema_name": {
            "type": "string",
            "description": "Database schema name (for PostgreSQL default is a public schema)"
          }
        }
      },
      "LocationTableName": {
        "type": "object",
        "properties": {
          "table_name": {
            "type": "string",
            "description": "Database table name"
          }
        }
      },
      "DataMartLocationHeader": {
        "type": "string",
        "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/data_marts/488e5686-b976-4c5a-942e-7b090c9e1331"
      },
      "DataMartConfigurationDatabase": {
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "service_instance_crn": {
            "type": "string"
          },
          "internal_database": {
            "type": "boolean",
            "default": false,
            "description": "If `true` the internal database managed by AI OpenScale is provided for the user"
          },
          "database_configuration": {
            "$ref": "#/components/schemas/DatabaseConfiguration"
          },
          "database_discovery": {
            "type": "string",
            "description": "Used by UI to check if database discovery was automatic or manual",
            "enum": [
              "automatic",
              "manual"
            ]
          }
        }
      },
      "DataMartRequest": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the data mart"
          },
          "description": {
            "type": "string",
            "description": "Description of the data mart"
          },
          "service_instance_crn": {
            "type": "string",
            "description": "Can be omitted if user token is used for authorization"
          },
          "internal_database": {
            "type": "boolean",
            "default": false,
            "description": "If `true` the internal database managed by AI OpenScale is provided for the user"
          },
          "database_configuration": {
            "$ref": "#/components/schemas/DatabaseConfigurationRequest"
          },
          "database_discovery": {
            "type": "string",
            "description": "Indicates if the database was discovered automatically or manually added by user through UI",
            "enum": [
              "automatic",
              "manual"
            ]
          }
        }
      },
      "DataMartDatabaseResponse": {
        "type": "object",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DataMartConfigurationDatabase"
              },
              {
                "type": "object",
                "properties": {
                  "status": {
                    "$ref": "#/components/schemas/Status"
                  }
                }
              }
            ]
          }
        }
      },
      "DataMartDatabaseResponseCollection": {
        "type": "object",
        "required": [
          "data_marts"
        ],
        "properties": {
          "data_marts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataMartDatabaseResponse"
            }
          }
        }
      },
      "RecordId": {
        "description": "record id value",
        "type": "string",
        "example": "4165a2fb-3b57-4b19-8a2b-037b9b0f7b08"
      },
      "RecordIdOrMore": {
        "description": "one or more record id values",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/RecordId"
        }
      },
      "TransactionId": {
        "description": "transaction id value",
        "type": "string"
      },
      "TransactionIdOrMore": {
        "description": "one or more transaction id values",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/TransactionId"
        }
      },
      "SecretCleaned": {
        "required": [
          "secret_id"
        ],
        "properties": {
          "secret_id": {
            "type": "string",
            "description": "Generated id which identifies credentials"
          }
        }
      },
      "UserPreferenceValueObject": {
        "description": "user preference object value",
        "type": "object"
      },
      "UserPreferenceValueString": {
        "description": "user preference string value - response string wrapped in an object",
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "response string value"
          }
        }
      },
      "ServiceProviderLocationHeader": {
        "type": "string",
        "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/service_providers/fc9a952d-6ef7-40c1-907a-0e1a4270f424"
      },
      "ServiceProviderRequest": {
        "required": [
          "name",
          "service_type"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "wml-production-o09",
            "description": "Name of the ML service instance"
          },
          "service_type": {
            "type": "string",
            "example": "watson_machine_learning",
            "enum": [
              "watson_machine_learning",
              "amazon_sagemaker",
              "azure_machine_learning",
              "custom_machine_learning",
              "spss_collaboration_and_deployment_services"
            ]
          },
          "instance_id": {
            "type": "string",
            "example": "f8059a5f-162e-4526-9c3d-9e67af543491",
            "description": "ID of the ML service instance (required for Watson Machine Learning)"
          },
          "credentials": {
            "$ref": "#/components/schemas/SecretCleaned"
          },
          "request_headers": {
            "description": "Additional headers passed to the ML engine API (for example when scoring)",
            "type": "object",
            "additionalProperties": true
          },
          "operational_space_id": {
            "description": "Reference to Operational Space",
            "type": "string"
          },
          "deployment_space_id": {
            "description": "Reference to V2 Space ID",
            "type": "string"
          },
          "integrated_project_id": {
            "description": "Project ID",
            "type": "string"
          },
          "group_ids": {
            "description": "Access control list of group id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "10000",
              "10001"
            ]
          },
          "user_ids": {
            "description": "Access control list of user id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "1000330999",
              "1000331301"
            ]
          }
        }
      },
      "ServiceProviderRequestObjectMk2": {
        "required": [
          "name",
          "service_type",
          "credentials"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "wml-production-o09",
            "description": "Name of the ML service instance"
          },
          "description": {
            "type": "string"
          },
          "service_type": {
            "type": "string",
            "example": "watson_machine_learning",
            "description": "machine learning service type (azure_machine_learning_studio is a preferred alias for azure_machine_learning and should be used in new service bindings)",
            "enum": [
              "watson_machine_learning",
              "amazon_sagemaker",
              "azure_machine_learning",
              "custom_machine_learning",
              "spss_collaboration_and_deployment_services",
              "azure_machine_learning_studio",
              "azure_machine_learning_service"
            ]
          },
          "credentials": {
            "$ref": "#/components/schemas/MLCredentials"
          },
          "request_headers": {
            "description": "map header name to header value",
            "type": "object",
            "additionalProperties": true
          },
          "operational_space_id": {
            "description": "Reference to Operational Space",
            "type": "string"
          },
          "deployment_space_id": {
            "description": "Reference to V2 Space ID",
            "type": "string"
          },
          "integrated_project_id": {
            "description": "Project ID",
            "type": "string"
          },
          "group_ids": {
            "description": "Access control list of group id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "10000",
              "10001"
            ]
          },
          "user_ids": {
            "description": "Access control list of user id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "1000330999",
              "1000331301"
            ]
          }
        }
      },
      "ServiceProviderResponse": {
        "type": "object",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ServiceProviderRequest"
              },
              {
                "type": "object",
                "properties": {
                  "status": {
                    "$ref": "#/components/schemas/Status"
                  }
                }
              }
            ]
          }
        }
      },
      "ServiceProviderResponseCollection": {
        "required": [
          "service_providers"
        ],
        "properties": {
          "service_providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceProviderResponse"
            }
          }
        }
      },
      "SubscriptionLocationHeader": {
        "type": "string",
        "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/subscriptions/19a30eb8-8f5e-4a62-870a-4fbbbabb4bea"
      },
      "SubscriptionRequest": {
        "required": [
          "data_mart_id",
          "service_provider_id",
          "asset",
          "deployment"
        ],
        "properties": {
          "data_mart_id": {
            "$ref": "#/components/schemas/DataMartId"
          },
          "service_provider_id": {
            "type": "string",
            "example": "fc9a952d-6ef7-40c1-907a-0e1a4270f424"
          },
          "asset": {
            "$ref": "#/components/schemas/Asset"
          },
          "asset_properties": {
            "$ref": "#/components/schemas/AssetPropertiesRequest"
          },
          "deployment": {
            "$ref": "#/components/schemas/AssetDeploymentRequest"
          },
          "risk_evaluation_status": {
            "$ref": "#/components/schemas/RiskEvaluationStatus"
          },
          "analytics_engine": {
            "$ref": "#/components/schemas/AnalyticsEngine"
          },
          "data_sources": {
            "$ref": "#/components/schemas/DataSourceCollection"
          }
        }
      },
      "Subscription": {
        "required": [
          "data_mart_id",
          "service_provider_id",
          "asset",
          "deployment"
        ],
        "properties": {
          "data_mart_id": {
            "$ref": "#/components/schemas/DataMartId"
          },
          "service_provider_id": {
            "type": "string",
            "example": "fc9a952d-6ef7-40c1-907a-0e1a4270f424"
          },
          "asset": {
            "$ref": "#/components/schemas/Asset"
          },
          "asset_properties": {
            "$ref": "#/components/schemas/AssetProperties"
          },
          "deployment": {
            "$ref": "#/components/schemas/AssetDeployment"
          },
          "integration_reference": {
            "$ref": "#/components/schemas/IntegratedSystemReference"
          },
          "risk_evaluation_status": {
            "$ref": "#/components/schemas/RiskEvaluationStatus"
          },
          "analytics_engine": {
            "$ref": "#/components/schemas/AnalyticsEngine"
          },
          "data_sources": {
            "$ref": "#/components/schemas/DataSourceCollection"
          },
          "embeddings_providers": {
            "$ref": "#/components/schemas/EmbeddingsProviderCollection"
          }
        }
      },
      "SubscriptionResponse": {
        "type": "object",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Subscription"
              },
              {
                "type": "object",
                "properties": {
                  "status": {
                    "$ref": "#/components/schemas/Status"
                  }
                }
              }
            ]
          }
        }
      },
      "SubscriptionResponseCollection": {
        "required": [
          "subscriptions"
        ],
        "properties": {
          "subscriptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionResponse"
            }
          }
        }
      },
      "RiskEvaluationStatus": {
        "type": "object",
        "required": [
          "state"
        ],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "pending_evaluation",
              "approved",
              "rejected"
            ]
          },
          "comment": {
            "description": "Optional comment to the evaluation",
            "type": "string"
          },
          "evaluated_by": {
            "description": "Author of the evaluation",
            "type": "string"
          },
          "evaluated_at": {
            "description": "Time of the evaluation",
            "type": "string"
          }
        }
      },
      "AnalyticsEngine": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "description": "Type of analytics engine. e.g. spark",
            "type": "string"
          },
          "integrated_system_id": {
            "type": "string",
            "description": "id of the Integrated System"
          },
          "credentials": {
            "description": "Credentials to override credentials in integration_reference",
            "type": "object"
          },
          "parameters": {
            "description": "Additional parameters (e.g. max_num_executors, min_num_executors, executor_cores, executor_memory, driver_cores, driver_memory)",
            "type": "object"
          }
        }
      },
      "DataSourceCollection": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/DataSource"
        }
      },
      "DataSource": {
        "type": "object",
        "required": [
          "type, connection, database_name, schema_name, table_name"
        ],
        "properties": {
          "type": {
            "description": "Type of data source. e.g. payload, feedback, drift,explain",
            "type": "string"
          },
          "connection": {
            "$ref": "#/components/schemas/DataSourceConnection"
          },
          "database_name": {
            "type": "string",
            "description": "database name"
          },
          "schema_name": {
            "type": "string",
            "description": "schema name"
          },
          "table_name": {
            "type": "string",
            "description": "table name"
          },
          "endpoint": {
            "$ref": "#/components/schemas/DataSourceEndpoint"
          },
          "parameters": {
            "description": "Additional parameters",
            "type": "object"
          },
          "auto_create": {
            "type": "boolean",
            "description": "Set true for automatically creating the table"
          },
          "status": {
            "$ref": "#/components/schemas/DataSourceStatus"
          }
        }
      },
      "DataSourceConnection": {
        "type": "object",
        "required": [
          "type, integrated_system_id"
        ],
        "properties": {
          "type": {
            "description": "Type of integrated system, e.g. hive, jdbc",
            "type": "string"
          },
          "integrated_system_id": {
            "type": "string",
            "description": "id of the integrated system"
          },
          "parameters": {
            "description": "Additional parameters",
            "type": "object"
          }
        }
      },
      "DataSourceEndpoint": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "description": "Url of the endpoint",
            "type": "string"
          },
          "credentials": {
            "description": "Credentials for the endpoint",
            "type": "object"
          }
        }
      },
      "DataSourceStatus": {
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "new",
              "preparing",
              "active",
              "error"
            ]
          },
          "failure": {
            "$ref": "#/components/schemas/GenericErrorResponse"
          }
        },
        "required": [
          "state"
        ]
      },
      "EmbeddingsProviderCollection": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/EmbeddingsProvider"
        }
      },
      "EmbeddingsProvider": {
        "type": "object",
        "required": [
          "integrated_system_id"
        ],
        "properties": {
          "integrated_system_id": {
            "$ref": "#/components/schemas/GUID"
          }
        }
      },
      "MonitorMeasurementMetrics": {
        "type": "object",
        "description": "Value of the out of the box or custom metric in a format compliant with a monitor definition",
        "additionalProperties": true,
        "example": {
          "quality": 0.89
        }
      },
      "MonitorMeasurementRequest": {
        "type": "object",
        "required": [
          "timestamp",
          "metrics"
        ],
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "example": "2018-11-21T09:37:55.523Z"
          },
          "run_id": {
            "type": "string",
            "description": "ID of the monitoring run which produced the measurement"
          },
          "metrics": {
            "type": "array",
            "description": "Metrics grouped for a single measurement",
            "items": {
              "$ref": "#/components/schemas/MonitorMeasurementMetrics"
            }
          },
          "sources": {
            "type": "array",
            "description": "The sources of the metric",
            "items": {
              "$ref": "#/components/schemas/Source"
            }
          },
          "asset_revision": {
            "type": "string",
            "description": "Revision number of the ML model or function used by the monitor"
          }
        }
      },
      "MonitorMeasurementRequestCollection": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/MonitorMeasurementRequest"
        }
      },
      "MonitorMeasurementResponseCollection": {
        "required": [
          "measurements"
        ],
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "description": "Beginning of the time range"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "description": "End of the time range"
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of measurements returned",
            "example": 10
          },
          "offset": {
            "type": "integer",
            "description": "Offset of measurements returned",
            "example": 0
          },
          "measurements": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "entity",
                "metadata"
              ],
              "properties": {
                "metadata": {
                  "$ref": "#/components/schemas/Metadata"
                },
                "entity": {
                  "$ref": "#/components/schemas/MeasurementEntity"
                }
              }
            }
          }
        }
      },
      "MeasurementsResponseCollection": {
        "required": [
          "measurements"
        ],
        "properties": {
          "measurements": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "entity",
                "metadata"
              ],
              "properties": {
                "metadata": {
                  "$ref": "#/components/schemas/Metadata"
                },
                "entity": {
                  "$ref": "#/components/schemas/MeasurementEntity"
                }
              }
            }
          }
        }
      },
      "MeasurementEntity": {
        "type": "object",
        "required": [
          "timestamp",
          "values",
          "issue_count"
        ],
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "run_id": {
            "type": "string",
            "description": "ID of the monitoring run which produced the measurement"
          },
          "values": {
            "type": "array",
            "description": "Metrics grouped for a single measurement",
            "items": {
              "$ref": "#/components/schemas/MonitorMeasurementValue"
            }
          },
          "issue_count": {
            "type": "integer",
            "description": "Number of the metrics with issues, which exceeded limits",
            "example": 2
          },
          "asset_revision": {
            "type": "string",
            "description": "Revision number of the ML model or function used by the monitor"
          },
          "target": {
            "$ref": "#/components/schemas/Target"
          },
          "monitor_instance_id": {
            "type": "string"
          },
          "monitor_definition_id": {
            "type": "string",
            "example": "quality"
          }
        }
      },
      "MeasurementSources": {
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "description": "The sources of the metric",
            "items": {
              "$ref": "#/components/schemas/Source"
            }
          }
        }
      },
      "MeasurementId": {
        "type": "string",
        "description": "Unique measurement identifier assigned to the measurement by the OpenScale DataMart",
        "example": "123e4567-e89b-12d3-a456-426655440000",
        "minLength": 1,
        "maxLength": 128,
        "pattern": "[a-z0-9_\\-]+"
      },
      "MonitorMeasurementResponse": {
        "type": "object",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MeasurementEntity"
              },
              {
                "$ref": "#/components/schemas/MeasurementSources"
              }
            ]
          }
        }
      },
      "MonitorMeasurementValue": {
        "description": "Measurement metrics and tags",
        "required": [
          "metrics",
          "tags"
        ],
        "properties": {
          "metrics": {
            "description": "Metrics related to the measurement",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitorMeasurementMetric"
            },
            "example": [
              {
                "id": "area_under_roc",
                "value": 0.88,
                "lower_limit": 0.8
              },
              {
                "id": "area_under_pr",
                "value": 0.71,
                "lower_limit": 0.73
              }
            ]
          },
          "tags": {
            "description": "Tags related to the measurement",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitorMeasurementTag"
            },
            "example": [
              {
                "id": "model_type",
                "value": "original"
              }
            ]
          }
        }
      },
      "MonitorMeasurementMetric": {
        "description": "Value and limits for the metrics",
        "required": [
          "id",
          "value"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "area_under_roc"
          },
          "value": {
            "type": "number",
            "format": "double",
            "example": 0.86
          },
          "lower_limit": {
            "type": "number",
            "format": "double",
            "example": 0.56
          },
          "upper_limit": {
            "type": "number",
            "format": "double",
            "example": 0.99
          }
        }
      },
      "MonitorMeasurementTag": {
        "description": "Tag related to the metrics",
        "required": [
          "id",
          "value"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "region"
          },
          "value": {
            "type": "string",
            "example": "us-south"
          }
        }
      },
      "DataMartGetMonitorInstanceMetrics": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "description": "Floored to full interval"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "description": "Ceiled to full interval"
          },
          "interval": {
            "type": "string"
          },
          "monitor_definition_id": {
            "type": "string"
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "value"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                },
                "metrics": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "lower_limit": {
                        "type": "number"
                      },
                      "upper_limit": {
                        "type": "number"
                      },
                      "last": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "measurement_id": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "first": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "measurement_id": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "sum": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          }
                        }
                      },
                      "avg": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          }
                        }
                      },
                      "min": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "measurement_id": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "max": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "measurement_id": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "median": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          }
                        }
                      },
                      "count": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "measurement_id": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "stddev": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "example": {
          "start": "2019-02-15T10:00:00Z",
          "end": "2019-02-15T14:00:00Z",
          "interval": "hour",
          "monitor_definition_id": "fairness",
          "target_type": "subscription",
          "target_id": "0571522b-9908-43a9-a8c4-8deec4b224ae",
          "groups": [
            {
              "tags": [
                {
                  "id": "feature",
                  "value": "age"
                },
                {
                  "id": "feature_value",
                  "value": "18-44"
                }
              ],
              "metrics": [
                {
                  "id": "fairness_value",
                  "min": {
                    "value": [
                      0.71,
                      null,
                      0.77,
                      0.83
                    ],
                    "measurement_id": [
                      "e4f33501-bbae-4e76-bf5a-15339e3c5022",
                      null,
                      "6c750aef-e6c5-4904-b9c9-da900824c25e",
                      "f2a33371-a25c-4384-b307-d1046cc7b602"
                    ]
                  },
                  "max": {
                    "value": [
                      0.74,
                      null,
                      0.79,
                      0.88
                    ],
                    "measurement_id": [
                      "a4f33501-bbae-4e76-bf5a-15339e3c5022",
                      null,
                      "ac750aef-e6c5-4904-b9c9-da900824c25e",
                      "a2a33371-a25c-4384-b307-d1046cc7b602"
                    ]
                  },
                  "lower_limit": [
                    0.8,
                    null,
                    0.85,
                    0.85
                  ]
                }
              ]
            }
          ]
        }
      },
      "ScoringPayloadRequest": {
        "required": [
          "request",
          "response"
        ],
        "properties": {
          "scoring_id": {
            "type": "string"
          },
          "scoring_timestamp": {
            "type": "string"
          },
          "response_time": {
            "type": "number",
            "format": "double"
          },
          "asset_revision": {
            "type": "string"
          },
          "multiple_records": {
            "type": "boolean",
            "default": true,
            "description": "This property is important for payload logging for unstructured data. There will be one record created in payload logging table\nif this property is set to `false`. The `request.values` field and `response.values` field are treated as one scoring\nrequest and one scoring response in such case. If this field is set to `true` then it might be created more than one row in the payload logging table.\nThe first dimension of the `request.values` and `response.values` corresponds to the separate entry in the payload logging table in such case.\n"
          },
          "request": {
            "type": "object",
            "required": [
              "values"
            ],
            "properties": {
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The data field names of model's or python function's input data. This property is mandatory for Spark based models. It might not be required for other frameworks."
              },
              "values": {
                "description": "The scoring input data rows.",
                "type": "array",
                "items": {
                  "type": "array",
                  "description": "The scoring input data row. If the fields are defined then the elements of the array corresponds to the fields.",
                  "items": {
                    "description": "It can be any value - object, string, number, boolean or array"
                  }
                }
              },
              "meta": {
                "type": "object",
                "required": [
                  "fields",
                  "values"
                ],
                "properties": {
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The names of the additional columns which will be created in the payload logging table."
                  },
                  "values": {
                    "description": "Values for the additional columns which will be logged in the payload logging table.",
                    "type": "array",
                    "items": {
                      "type": "array",
                      "description": "Elements of the array corresponds to the fields.",
                      "items": {
                        "description": "It can be any value - object, string, number, boolean or array"
                      }
                    }
                  }
                }
              }
            },
            "example": {
              "fields": [
                "name",
                "age",
                "position"
              ],
              "values": [
                [
                  "john",
                  33,
                  "engineer"
                ],
                [
                  "mike",
                  23,
                  "student"
                ]
              ],
              "meta": {
                "fields": [
                  "transactionid",
                  "misc1"
                ],
                "values": [
                  [
                    "tran1345",
                    "misc value for John"
                  ],
                  [
                    "tran1345",
                    "misc value for Mike"
                  ]
                ]
              }
            }
          },
          "response": {
            "type": "object",
            "required": [
              "values"
            ],
            "properties": {
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Names of the data fields."
              },
              "values": {
                "description": "The scoring output data rows.",
                "type": "array",
                "items": {
                  "description": "It can be any value - object, string, number, boolean or array. If this is an array and fields are defined then elements of the array corresponds to the fields."
                }
              }
            },
            "example": {
              "fields": [
                "name",
                "age",
                "position",
                "prediction",
                "probability"
              ],
              "values": [
                [
                  "john",
                  33,
                  "engineer",
                  "personal",
                  [
                    0.6744664422398081,
                    0.32553355776019194
                  ]
                ],
                [
                  "mike",
                  23,
                  "student",
                  "camping",
                  [
                    0.2794765664946941,
                    0.7205234335053059
                  ]
                ]
              ]
            }
          },
          "user_id": {
            "type": "string"
          }
        }
      },
      "AssetDeploymentRequest": {
        "required": [
          "deployment_id",
          "name",
          "deployment_type"
        ],
        "properties": {
          "deployment_id": {
            "type": "string"
          },
          "deployment_rn": {
            "type": "string",
            "description": "Deployment Resource Name (used for integration with 3rd party ML engines)"
          },
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "deployment_type": {
            "type": "string",
            "description": "Deployment type",
            "enum": [
              "online",
              "batch",
              "detached"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "scoring_endpoint": {
            "$ref": "#/components/schemas/ScoringEndpointRequest"
          }
        },
        "example": {
          "name": "Azure scoring endpoint",
          "deployment_id": "ae62976ad690472eaf4f9797075ed831",
          "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831",
          "created_at": "2018-01-11T10:02:00",
          "deployment_type": "online",
          "scoring_endpoint": {
            "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831/execute?api-version=2.0&format=swagger",
            "credentials": {
              "token": "dhgsfg3uy46rteyfugwerfygueq6wetfguyewf"
            }
          }
        }
      },
      "AssetDeployment": {
        "properties": {
          "deployment_id": {
            "type": "string"
          },
          "deployment_rn": {
            "type": "string",
            "description": "Deployment Resource Name (used for integration with 3rd party ML engines)"
          },
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "deployment_type": {
            "type": "string",
            "description": "Deployment type",
            "enum": [
              "online",
              "batch",
              "detached"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "scoring_endpoint": {
            "$ref": "#/components/schemas/ScoringEndpoint"
          }
        },
        "example": {
          "name": "Azure scoring endpoint",
          "deployment_id": "ae62976ad690472eaf4f9797075ed831",
          "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831",
          "created_at": "2018-01-11T10:02:00",
          "deployment_type": "online",
          "scoring_endpoint": {
            "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831/execute?api-version=2.0&format=swagger",
            "credentials": {
              "id": "c9ced591-1856-4a8e-b330-e166e0d6babd"
            }
          }
        }
      },
      "Asset": {
        "required": [
          "asset_id",
          "asset_type"
        ],
        "properties": {
          "asset_id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "asset_type": {
            "type": "string",
            "enum": [
              "model",
              "function",
              "prompt"
            ]
          },
          "asset_rn": {
            "type": "string",
            "description": "Asset Resource Name (used for integration with 3rd party ML engines)"
          },
          "created_at": {
            "type": "string"
          },
          "problem_type": {
            "type": "string",
            "enum": [
              "binary",
              "regression",
              "multiclass",
              "question_answering",
              "summarization",
              "retrieval_augmented_generation",
              "classification",
              "generation",
              "code",
              "extraction"
            ]
          },
          "model_type": {
            "type": "string"
          },
          "runtime_environment": {
            "type": "string"
          },
          "input_data_type": {
            "type": "string",
            "enum": [
              "structured",
              "unstructured_image",
              "unstructured_text",
              "unstructured_video",
              "unstructured_audio"
            ]
          },
          "foundational_model_id": {
            "type": "string",
            "example": "ibm-granite/granite-3.0-8b-instruct"
          },
          "locale": {
            "type": "object",
            "description": "represents languages used in both input and output of the model",
            "properties": {
              "input": {
                "$ref": "#/components/schemas/Language"
              },
              "output": {
                "$ref": "#/components/schemas/Language"
              }
            }
          }
        }
      },
      "Language": {
        "type": "array",
        "description": "represents a list of language-code LLM can handle",
        "items": {
          "description": "represents a language-code, which can include country/region potentially once they are supported, e.g. en-US or pt-BR",
          "type": "string",
          "enum": [
            "en",
            "ja",
            "de",
            "fr",
            "es",
            "ar",
            "it",
            "pt",
            "ko",
            "da"
          ]
        }
      },
      "AssetPropertiesRequest": {
        "description": "Additional asset properties (subject of discovery if not provided when creating the subscription)",
        "properties": {
          "training_data_reference": {
            "$ref": "#/components/schemas/TrainingDataReference"
          },
          "training_data_schema": {
            "$ref": "#/components/schemas/SparkStruct"
          },
          "input_data_schema": {
            "$ref": "#/components/schemas/SparkStruct"
          },
          "output_data_schema": {
            "$ref": "#/components/schemas/SparkStruct"
          },
          "input_token_count_field": {
            "description": "Field with this name will be given modeling_role `input-token-count`",
            "type": "string"
          },
          "output_token_count_field": {
            "description": "Field with this name will be given modeling_role `output-token-count`",
            "type": "string"
          },
          "label_column": {
            "type": "string"
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dashboard_configuration": {
            "type": "object",
            "additionalProperties": true
          },
          "predicted_target_field": {
            "description": "Field with this name will be given modeling_role `decoded-target`",
            "type": "string"
          },
          "prediction_field": {
            "description": "Field with this name will be given modeling_role `prediction`",
            "type": "string"
          },
          "transaction_id_field": {
            "description": "Field with this name will have `transaction_id_key` metadata set to true",
            "type": "string"
          },
          "feature_fields": {
            "description": "Fields to be given modeling_role feature",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "categorical_fields": {
            "description": "Fields to be given metadata `measure` of value `discrete`",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "context_fields": {
            "description": "Contexts fields with this name will be given `prompt_role` as `context_field` used in Retrieval-Augmented Generation.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "question_field": {
            "description": "Question field with this name will be given `prompt_role` as `question_field` used in Retrieval-Augmented Generation.",
            "type": "string"
          },
          "probability_fields": {
            "description": "Fields to be given modeling_role `class_probability` (for columns of double data type) or `probability` (for column of array data type)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "prediction_names": {
            "description": "Prediction names for multiple output models",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AssetProperties": {
        "description": "Additional asset properties (subject of discovery if not provided when creating the subscription)",
        "properties": {
          "training_data_reference": {
            "$ref": "#/components/schemas/SecretCleaned"
          },
          "training_data_schema": {
            "$ref": "#/components/schemas/SparkStruct"
          },
          "input_data_schema": {
            "$ref": "#/components/schemas/SparkStruct"
          },
          "output_data_schema": {
            "$ref": "#/components/schemas/SparkStruct"
          },
          "input_token_count_field": {
            "description": "Field with this name will be given modeling_role `input-token-count`",
            "type": "string"
          },
          "output_token_count_field": {
            "description": "Field with this name will be given modeling_role `output-token-count`",
            "type": "string"
          },
          "label_column": {
            "type": "string"
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dashboard_configuration": {
            "type": "object",
            "additionalProperties": true
          },
          "predicted_target_field": {
            "description": "Field with this name will be given modeling_role `decoded-target`",
            "type": "string"
          },
          "prediction_field": {
            "description": "Field with this name will be given modeling_role `prediction`",
            "type": "string"
          },
          "transaction_id_field": {
            "description": "Field with this name will have `transaction_id_key` metadata set to true",
            "type": "string"
          },
          "feature_fields": {
            "description": "Fields to be given modeling_role feature",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "categorical_fields": {
            "description": "Fields to be given metadata `measure` of value `discrete`",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "context_fields": {
            "description": "Contexts fields with this name will be given `prompt_role` as `context_field` used in Retrieval-Augmented Generation.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "question_field": {
            "description": "Question field with this name will be given `prompt_role` as `question_field` used in Retrieval-Augmented Generation.",
            "type": "string"
          },
          "probability_fields": {
            "description": "Fields to be given modeling_role `class_probability` (for columns of double data type) or `probability` (for column of array data type)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "prediction_names": {
            "description": "Prediction names for multiple output models",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ScoringEndpointRequest": {
        "description": "Definition of scoring endpoint in custom_machine_learning",
        "properties": {
          "url": {
            "type": "string"
          },
          "credentials": {
            "$ref": "#/components/schemas/ScoringEndpointCredentials"
          },
          "request_headers": {
            "type": "object",
            "description": "map header name to header value",
            "additionalProperties": true
          }
        }
      },
      "ScoringEndpoint": {
        "description": "Definition of scoring endpoint in custom_machine_learning",
        "properties": {
          "url": {
            "type": "string"
          },
          "credentials": {
            "$ref": "#/components/schemas/SecretCleaned"
          },
          "request_headers": {
            "type": "object",
            "description": "map header name to header value",
            "additionalProperties": true
          }
        }
      },
      "ScoringEndpointCredentials": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AzureScoringEndpointCredentials"
          }
        ],
        "additionalProperties": true,
        "example": {
          "token": "dhgsfg3uy46rteyfugwerfygueq6wetfguyewf"
        }
      },
      "Status": {
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "preparing",
              "active",
              "deleting",
              "pending_delete",
              "disabled",
              "error"
            ]
          },
          "deleted_at": {
            "type": "string"
          },
          "failure": {
            "$ref": "#/components/schemas/GenericErrorResponse"
          }
        },
        "required": [
          "state"
        ]
      },
      "DataReference": {
        "properties": {
          "type": {
            "description": "Type of the storage",
            "type": "string",
            "enum": [
              "db2",
              "postgresql"
            ]
          },
          "location": {
            "$ref": "#/components/schemas/LocationTableName"
          },
          "connection": {
            "type": "object",
            "description": "credentials",
            "additionalProperties": true
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "location",
          "connection"
        ]
      },
      "TrainingDataReference": {
        "properties": {
          "type": {
            "description": "Type of the storage",
            "type": "string",
            "enum": [
              "db2",
              "cos",
              "dataset",
              "file_asset"
            ]
          },
          "location": {
            "$ref": "#/components/schemas/TrainingDataReferenceLocation"
          },
          "connection": {
            "$ref": "#/components/schemas/TrainingDataReferenceConnection"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "location",
          "connection"
        ],
        "example": {
          "type": "file_asset"
        }
      },
      "InputDataReference": {
        "description": "InputDataReference is the same as TrainingDataReference except that neither location nor connection is required. This is needed for the Schemas API and to avoid updating existing APIs.",
        "properties": {
          "type": {
            "description": "Type of the storage",
            "type": "string",
            "enum": [
              "db2",
              "cos",
              "dataset",
              "file_asset"
            ]
          },
          "location": {
            "$ref": "#/components/schemas/TrainingDataReferenceLocation"
          },
          "connection": {
            "$ref": "#/components/schemas/TrainingDataReferenceConnection"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "example": {
          "type": "file_asset"
        }
      },
      "TrainingDataReferenceLocation": {
        "description": "training data set location",
        "oneOf": [
          {
            "$ref": "#/components/schemas/DB2TrainingDataReferenceLocation"
          },
          {
            "$ref": "#/components/schemas/COSTrainingDataReferenceLocation"
          },
          {
            "$ref": "#/components/schemas/DatasetTrainingDataReferenceLocation"
          },
          {
            "$ref": "#/components/schemas/FileAssetTrainingDataReferenceLocation"
          }
        ]
      },
      "TrainingDataReferenceConnection": {
        "description": "training data set connection credentials",
        "oneOf": [
          {
            "$ref": "#/components/schemas/DB2TrainingDataReferenceConnection"
          },
          {
            "$ref": "#/components/schemas/COSTrainingDataReferenceConnection"
          }
        ]
      },
      "FileTrainingDataReferenceOptions": {
        "x-child-schema-name": "FileTrainingDataReferenceOptions",
        "type": "object",
        "description": "additional options for different types of training data references",
        "properties": {
          "file_name": {
            "description": "file name",
            "type": "string"
          },
          "file_format": {
            "type": "string",
            "description": "File format"
          },
          "first_line_is_header": {
            "description": "if not provided service will attempt to automatically detect header in the first line (for data provided as csv)",
            "type": "boolean"
          },
          "delimiter": {
            "description": "delimiter character for data provided as csv",
            "type": "string"
          },
          "csv_max_line_length": {
            "description": "maximum length of single line in bytes (default 10000000)",
            "type": "number"
          },
          "on_error": {
            "description": "Expected behaviour on error while reading a csv file. Default behaviour is \"stop\".",
            "type": "string",
            "enum": [
              "stop",
              "continue"
            ]
          }
        },
        "example": {
          "file_name": "CreditRisk.csv",
          "file_format": "csv",
          "header": true,
          "delimiter": "|",
          "csv_max_line_length": 1000000,
          "on_error": "continue"
        }
      },
      "DB2TrainingDataReferenceConnection": {
        "x-child-schema-name": "DB2TrainingDataReferenceConnection",
        "required": [
          "hostname",
          "username",
          "password",
          "database_name"
        ],
        "properties": {
          "hostname": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "database_name": {
            "type": "string"
          },
          "port": {
            "type": "integer"
          },
          "ssl": {
            "type": "boolean",
            "default": false
          },
          "certificate_base64": {
            "type": "string",
            "description": "DER-encoded certificate in Base64 encoding. The decoded content must be bound at the beginning by -----BEGIN CERTIFICATE----- and at the end by -----END CERTIFICATE-----"
          },
          "connection_string": {
            "type": "string"
          }
        }
      },
      "COSTrainingDataReferenceConnection": {
        "x-child-schema-name": "COSTrainingDataReferenceConnection",
        "required": [
          "resource_instance_id",
          "url",
          "api_key"
        ],
        "properties": {
          "resource_instance_id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "api_key": {
            "type": "string"
          },
          "iam_url": {
            "type": "string"
          }
        }
      },
      "DB2TrainingDataReferenceLocation": {
        "x-child-schema-name": "DB2TrainingDataReferenceLocation",
        "description": "DB2 table name",
        "required": [
          "table_name"
        ],
        "properties": {
          "table_name": {
            "description": "name of the table",
            "type": "string"
          },
          "schema_name": {
            "description": "name of the schema",
            "type": "string"
          }
        }
      },
      "COSTrainingDataReferenceLocation": {
        "x-child-schema-name": "COSTrainingDataReferenceLocation",
        "description": "COS file location",
        "required": [
          "bucket",
          "file_name"
        ],
        "properties": {
          "bucket": {
            "type": "string"
          },
          "file_name": {
            "type": "string"
          },
          "firstlineheader": {
            "type": "boolean"
          },
          "infer_schema": {
            "type": "string"
          },
          "file_format": {
            "type": "string",
            "enum": [
              "csv"
            ]
          }
        }
      },
      "DatasetTrainingDataReferenceLocation": {
        "x-child-schema-name": "DatasetTrainingDataReferenceLocation",
        "description": "WOS dataset id",
        "required": [
          "dataset_id"
        ],
        "properties": {
          "dataset_id": {
            "type": "string",
            "description": "Dataset id"
          },
          "meta": {
            "$ref": "#/components/schemas/FileTrainingDataReferenceOptions"
          }
        },
        "example": {
          "dataset_id": "3032bfa5-8fd0-432c-be1a-ad2423742227"
        }
      },
      "FileAssetTrainingDataReferenceLocation": {
        "x-child-schema-name": "FileAssetTrainingDataReferenceLocation",
        "description": "File data asset reference location",
        "required": [
          "asset_href"
        ],
        "properties": {
          "project_id": {
            "type": "string",
            "description": "Project id"
          },
          "asset_id": {
            "type": "string",
            "description": "File data asset id"
          },
          "asset_href": {
            "type": "string",
            "description": "File data asset reference"
          },
          "meta": {
            "$ref": "#/components/schemas/FileTrainingDataReferenceOptions"
          }
        },
        "example": {
          "project_id": "3442bfa5-8fd0-432c-9944-ad2423742227",
          "asset_id": "b3335fa5-8fd0-432c-9944-ad24237cd123",
          "asset_href": "/v2/assets/b3335fa5-8fd0-432c-9944-ad24237cd123?project_id=3442bfa5-8fd0-432c-9944-ad2423742227",
          "meta": {
            "file_name": "CreditRiskTrainingData.csv",
            "file_format": "csv"
          }
        }
      },
      "FileAssetMetadata": {
        "description": "File data asset metadata",
        "required": [
          "asset_href"
        ],
        "properties": {
          "project_id": {
            "type": "string",
            "description": "Project id"
          },
          "project_name": {
            "type": "string",
            "description": "Project name"
          },
          "asset_id": {
            "type": "string",
            "description": "File data asset id"
          },
          "asset_name": {
            "type": "string",
            "description": "File data asset name"
          },
          "asset_href": {
            "type": "string",
            "description": "File data asset reference"
          },
          "meta": {
            "$ref": "#/components/schemas/FileTrainingDataReferenceOptions"
          }
        },
        "example": {
          "project_id": "3442bfa5-8fd0-432c-9944-ad2423742227",
          "project_name": "Machine learning test project",
          "asset_id": "b3335fa5-8fd0-432c-9944-ad24237cd123",
          "asset_name": "Credit Risk csv file",
          "asset_href": "/v2/assets/b3335fa5-8fd0-432c-9944-ad24237cd123?project_id=3442bfa5-8fd0-432c-9944-ad2423742227",
          "meta": {
            "file_name": "CreditRiskTrainingData.csv",
            "file_format": "csv"
          }
        }
      },
      "PatchRequest": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/PatchDocument"
        }
      },
      "PatchDocument": {
        "description": "A JSONPatch document as defined by RFC 6902",
        "required": [
          "op",
          "path"
        ],
        "properties": {
          "op": {
            "type": "string",
            "description": "The operation to be performed",
            "enum": [
              "add",
              "remove",
              "replace",
              "move",
              "copy",
              "test"
            ]
          },
          "path": {
            "type": "string",
            "description": "A JSON-Pointer"
          },
          "value": {
            "type": "object",
            "description": "The value to be used within the operations."
          },
          "from": {
            "type": "string",
            "description": "A string containing a JSON Pointer value."
          }
        },
        "example": {
          "op": "replace",
          "path": "/name",
          "value": "NewObjectName"
        }
      },
      "MLCredentials": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/SageMakerCredentials"
          },
          {
            "$ref": "#/components/schemas/AzureCredentials"
          },
          {
            "$ref": "#/components/schemas/CustomCredentials"
          },
          {
            "$ref": "#/components/schemas/WMLCredentialsCloud"
          },
          {
            "$ref": "#/components/schemas/WMLCredentialsCP4D"
          },
          {
            "$ref": "#/components/schemas/SPSSCredentials"
          },
          {
            "$ref": "#/components/schemas/UnknownCredentials"
          }
        ],
        "additionalProperties": true,
        "example": {
          "instance_id": "f8059a5f-162e-4526-9c3d-9e67af543491",
          "apikey": "dhgsfg3uy46rteyfugwerfygueq6wetfguyewf",
          "username": "some_user",
          "password": "passwd",
          "url": "https://us-south.wml.cloud.ibm.com"
        }
      },
      "SageMakerCredentials": {
        "x-child-schema-name": "SageMakerCredentials",
        "required": [
          "access_key_id",
          "secret_access_key"
        ],
        "properties": {
          "access_key_id": {
            "type": "string"
          },
          "secret_access_key": {
            "type": "string"
          },
          "region": {
            "type": "string"
          }
        }
      },
      "AzureWorkspaceCredentials": {
        "required": [
          "workspace_id",
          "token"
        ],
        "properties": {
          "workspace_id": {
            "type": "string"
          },
          "token": {
            "type": "string"
          }
        }
      },
      "AzureCredentials": {
        "x-child-schema-name": "AzureCredentials",
        "properties": {
          "token": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "subscription_id": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "client_secret": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "workspaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AzureWorkspaceCredentials"
            }
          }
        }
      },
      "AzureScoringEndpointCredentials": {
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "CustomCredentials": {
        "x-child-schema-name": "CustomCredentials",
        "properties": {
          "url": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "apikey": {
            "type": "string"
          },
          "auth_url": {
            "type": "string"
          },
          "auth_type": {
            "type": "string",
            "enum": [
              "basic",
              "api_key"
            ]
          },
          "auth_provider": {
            "type": "string",
            "enum": [
              "cloud",
              "cpd"
            ]
          }
        }
      },
      "SPSSCredentials": {
        "x-child-schema-name": "SPSSCredentials",
        "required": [
          "url",
          "username",
          "password"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "WMLCredentialsCloud": {
        "x-child-schema-name": "WMLCredentialsCloud",
        "required": [
          "url",
          "instance_id"
        ],
        "properties": {
          "apikey": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "instance_id": {
            "type": "string"
          }
        }
      },
      "WMLCredentialsCP4D": {
        "x-child-schema-name": "WMLCredentialsCP4D",
        "description": "WMLCredentials format for OpenScale on Cloud Pak for Data",
        "properties": {
          "url": {
            "type": "string",
            "description": "Required if wml_location is cpd_remote or cloud_remote"
          },
          "apikey": {
            "type": "string",
            "description": "Required if wml_location is cpd_remote or cloud_remote"
          },
          "username": {
            "type": "string",
            "description": "Required if wml_location is cpd_remote"
          },
          "uid": {
            "type": "string",
            "description": "User ID of a user in the Cloud Pak for Data. If not set, the uid extracted from the access token in Authorization header is used. This parameter is only applicable if wml_location is cpd_local."
          },
          "wml_location": {
            "type": "string",
            "enum": [
              "cpd_local",
              "cpd_remote",
              "cloud_remote"
            ],
            "description": "If wml_location is not selected, we treat the service provider as cpd_local for backward compatibility."
          }
        }
      },
      "UnknownCredentials": {
        "x-child-schema-name": "UnknownCredentials",
        "type": "object",
        "description": "Unknown service provider credentials",
        "additionalProperties": true
      },
      "PrimaryStorageCredentials": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PrimaryStorageCredentialsLong"
          }
        ],
        "example": {
          "hostname": "aaa.bbb.ccc.ddd",
          "username": "xxxxxxxx",
          "password": "yyyyyyyy",
          "db": "SAMPLE",
          "port": 50000,
          "ssl": false
        }
      },
      "PrimaryStorageCredentialsLong": {
        "required": [
          "hostname",
          "username",
          "password",
          "db"
        ],
        "properties": {
          "hostname": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "db": {
            "type": "string"
          },
          "port": {
            "type": "integer",
            "default": 50000
          },
          "ssl": {
            "type": "boolean",
            "default": false
          },
          "sslmode": {
            "type": "string",
            "description": "(postgresql only)"
          },
          "certificate_base64": {
            "type": "string",
            "description": "DER-encoded certificate in Base64 encoding. The decoded content must be bound at the beginning by -----BEGIN CERTIFICATE----- and at the end by -----END CERTIFICATE-----"
          },
          "additional_properties": {
            "type": "object",
            "description": "any additional properties to be included in connection url",
            "additionalProperties": true
          }
        },
        "example": {
          "hostname": "aaa.bbb.ccc.ddd",
          "username": "xxxxxxxx",
          "password": "yyyyyyyy",
          "db": "SAMPLE",
          "port": 50000,
          "ssl": false
        }
      },
      "FairnessMonitoringRemediationRequest": {
        "type": "object",
        "required": [
          "values"
        ],
        "properties": {
          "fields": {
            "type": "array",
            "description": "The fields to process debias scoring",
            "example": [
              "name",
              "age",
              "position"
            ],
            "items": {
              "type": "string"
            }
          },
          "values": {
            "type": "array",
            "description": "The values associated to the fields",
            "example": [
              [
                "john",
                33,
                "engineer"
              ]
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "FairnessMonitoringRemediation": {
        "type": "object",
        "required": [
          "fields",
          "values"
        ],
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The fields of the model processed debias scoring.",
            "example": [
              "name",
              "age",
              "position",
              "prediction",
              "probability",
              "debiased_prediction",
              "debiased_probability",
              "debiased_decoded_target"
            ]
          },
          "values": {
            "type": "array",
            "description": "The values associated to the fields.",
            "items": {
              "type": "object"
            },
            "example": [
              [
                "john",
                35,
                "engineer",
                0.3,
                [
                  0.754601226993865,
                  0.24539877300613497
                ],
                0.4,
                [
                  0.754601226993865,
                  0.24539877300613497
                ],
                "good"
              ]
            ]
          }
        }
      },
      "ApplicabilitySelection": {
        "properties": {
          "input_data_type": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "structured",
                "unstructured_image",
                "unstructured_text",
                "unstructured_video",
                "unstructured_audio"
              ]
            }
          },
          "problem_type": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "binary",
                "regression",
                "multiclass",
                "question_answering",
                "retrieval_augmented_generation",
                "summarization",
                "classification",
                "generation",
                "code",
                "extraction"
              ]
            }
          },
          "target_type": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TargetType"
            }
          }
        }
      },
      "SubscriptionTablesDataSetTypeName": {
        "type": "string",
        "enum": [
          "feedback"
        ]
      },
      "MonitorDefinitionLocationHeader": {
        "type": "string",
        "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/monitor_definitions/533cbb52-585d-451c-874c-4868ec8a5375"
      },
      "MonitorRequest": {
        "type": "object",
        "required": [
          "metrics",
          "tags",
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Monitor UI label (must be unique).",
            "example": "Quality extended metrics"
          },
          "description": {
            "type": "string",
            "description": "Long monitoring description presented in monitoring catalog."
          },
          "metrics": {
            "type": "array",
            "description": "A list of metric definition.",
            "items": {
              "$ref": "#/components/schemas/MonitorMetricRequest"
            }
          },
          "tags": {
            "type": "array",
            "description": "Available tags.",
            "items": {
              "$ref": "#/components/schemas/MonitorTagRequest"
            }
          },
          "applies_to": {
            "$ref": "#/components/schemas/ApplicabilitySelection"
          },
          "parameters_schema": {
            "type": "object",
            "description": "JSON schema that will be used to validate monitoring parameters when enabled",
            "additionalProperties": true
          },
          "managed_by": {
            "type": "string"
          },
          "schedule": {
            "$ref": "#/components/schemas/MonitorInstanceSchedule"
          },
          "schedules": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MonitorInstanceScheduleCollection"
              },
              {
                "description": "A set of schedules of online and batch deployment type. If this field is set, schedule field is ignored."
              }
            ]
          },
          "monitor_runtime": {
            "$ref": "#/components/schemas/MonitorRuntime"
          }
        }
      },
      "MonitorRuntime": {
        "type": "object",
        "description": "Field to specify if scheduler should be created or not.",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "when either `service` or `custom_metrics_provider` is specified, scheduler gets created. `service` is for OOTB, `custom_metrics_provider` is for custom metric integrated.",
            "enum": [
              "service",
              "custom_metrics_provider",
              "none"
            ]
          }
        }
      },
      "Monitor": {
        "type": "object",
        "required": [
          "metrics",
          "tags",
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Monitor UI label (must be unique).",
            "example": "Quality extended metrics"
          },
          "description": {
            "type": "string",
            "description": "Long monitoring description presented in monitoring catalog."
          },
          "metrics": {
            "type": "array",
            "description": "A list of metric definition.",
            "items": {
              "$ref": "#/components/schemas/MonitorMetric"
            }
          },
          "tags": {
            "type": "array",
            "description": "Available tags.",
            "items": {
              "$ref": "#/components/schemas/MonitorTag"
            }
          },
          "parameters_schema": {
            "type": "object",
            "description": "JSON schema that will be used to validate monitoring parameters when enabled",
            "additionalProperties": true
          },
          "dictionary": {
            "type": "object",
            "description": "translated resources",
            "additionalProperties": true
          },
          "applies_to": {
            "$ref": "#/components/schemas/ApplicabilitySelection"
          },
          "managed_by": {
            "type": "string"
          },
          "schedule": {
            "$ref": "#/components/schemas/MonitorInstanceSchedule"
          },
          "schedules": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MonitorInstanceScheduleCollection"
              },
              {
                "description": "A set of schedules of online and batch deployment type. If this field is set, schedule field is ignored."
              }
            ]
          },
          "monitor_runtime": {
            "$ref": "#/components/schemas/MonitorRuntime"
          }
        }
      },
      "MonitorDisplayForm": {
        "type": "object",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "$ref": "#/components/schemas/Monitor"
          }
        }
      },
      "MonitorCollections": {
        "required": [
          "monitor_definitions"
        ],
        "properties": {
          "monitor_definitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitorDisplayForm"
            }
          }
        }
      },
      "MonitorInstanceLocationHeader": {
        "type": "string",
        "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/monitor_instances/2e12a976-22ed-4141-8cd6-f571b2036f64"
      },
      "MonitorInstanceCollection": {
        "required": [
          "monitor_instances"
        ],
        "properties": {
          "monitor_instances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitorInstanceResponse"
            }
          }
        }
      },
      "ThresholdConditionObject": {
        "required": [
          "type",
          "key",
          "value"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "tag"
            ]
          },
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "MetricSpecificThresholdObject": {
        "required": [
          "id",
          "applies_to",
          "default"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "default": {
            "type": "number",
            "format": "double",
            "description": "default value of threshold"
          },
          "recommendation": {
            "type": "string"
          },
          "applies_to": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThresholdConditionObject"
            }
          }
        }
      },
      "MetricSpecificThresholdShortObject": {
        "required": [
          "applies_to",
          "value"
        ],
        "properties": {
          "value": {
            "type": "number",
            "format": "double",
            "description": "value of threshold"
          },
          "applies_to": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThresholdConditionObject"
            }
          }
        }
      },
      "MetricThreshold": {
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "lower_limit",
              "upper_limit"
            ]
          },
          "default": {
            "type": "number",
            "format": "double",
            "description": "default value of threshold"
          },
          "default_recommendation": {
            "type": "string"
          },
          "specific_values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricSpecificThresholdObject"
            }
          }
        }
      },
      "ExpectedDirection": {
        "description": "the indicator specifying the expected direction of the monotonic metric values",
        "type": "string",
        "enum": [
          "increasing",
          "decreasing",
          "unknown"
        ]
      },
      "MonitorMetricRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "unique name used by UI instead of id (must be unique in scope of the monitor definition across both metrics and tags)"
          },
          "description": {
            "type": "string",
            "description": "Description of the metrics."
          },
          "thresholds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricThreshold"
            }
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "applies_to": {
            "$ref": "#/components/schemas/ApplicabilitySelection"
          },
          "expected_direction": {
            "$ref": "#/components/schemas/ExpectedDirection"
          },
          "default_aggregation": {
            "type": "string",
            "default": "last",
            "enum": [
              "last",
              "first",
              "min",
              "max",
              "sum",
              "count",
              "avg",
              "median",
              "stddev"
            ]
          }
        }
      },
      "MonitorMetric": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MonitorMetricRequest"
          },
          {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string"
              }
            }
          }
        ]
      },
      "MonitorTagRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "unique name used by UI instead of id (must be unique in scope of the monitor definition across both metrics and tags)"
          },
          "description": {
            "type": "string",
            "description": "Description of the tag"
          },
          "required": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "MonitorTag": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MonitorTagRequest"
          },
          {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string"
              }
            }
          }
        ]
      },
      "MonitoringRunCollection": {
        "description": "A page from a collection of monitoring runs.\n",
        "required": [
          "runs"
        ],
        "properties": {
          "runs": {
            "type": "array",
            "description": "A page from a collection of monitoring runs.\n",
            "items": {
              "$ref": "#/components/schemas/MonitoringRun"
            }
          },
          "first": {
            "$ref": "#/components/schemas/CollectionUrlModel"
          },
          "prev": {
            "$ref": "#/components/schemas/CollectionUrlModel"
          },
          "next": {
            "$ref": "#/components/schemas/CollectionUrlModel"
          },
          "last": {
            "$ref": "#/components/schemas/CollectionUrlModel"
          },
          "limit": {
            "type": "integer",
            "description": "The number of monitoring runs requested to be returned."
          },
          "total_count": {
            "type": "integer",
            "description": "The total number of monitoring runs available."
          }
        }
      },
      "MonitoringRunRequest": {
        "type": "object",
        "description": "Monitoring run options.",
        "properties": {
          "triggered_by": {
            "$ref": "#/components/schemas/MonitoringRunTriggeredBy"
          },
          "parameters": {
            "$ref": "#/components/schemas/MonitorInstanceParameters"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the monitoring run was created with expiry date (in the format YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, matching the date-time format as specified by RFC 3339)."
          }
        }
      },
      "MonitoringRun": {
        "type": "object",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "$ref": "#/components/schemas/MonitoringRunEntity"
          }
        }
      },
      "MonitoringRunEntity": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "triggered_by": {
            "$ref": "#/components/schemas/MonitoringRunTriggeredBy"
          },
          "parameters": {
            "$ref": "#/components/schemas/MonitorInstanceParameters"
          },
          "status": {
            "$ref": "#/components/schemas/MonitoringRunStatus"
          }
        }
      },
      "MonitoringRunState": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "finished",
          "error"
        ]
      },
      "MonitoringRunTriggeredBy": {
        "type": "string",
        "description": "An identifier representing the source that triggered the run request (optional). One of: event, scheduler, user, webhook.\n",
        "enum": [
          "event",
          "scheduler",
          "user",
          "webhook",
          "bkpi_manager"
        ]
      },
      "MonitoringRunStatus": {
        "type": "object",
        "description": "The status information for the monitoring run.",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/MonitoringRunState"
          },
          "queued_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the monitoring run was queued to be run (in the format YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, matching the date-time format as specified by RFC 3339)."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the monitoring run was started running (in the format YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, matching the date-time format as specified by RFC 3339)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the monitoring run was last updated (in the format YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, matching the date-time format as specified by RFC 3339)."
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the monitoring run finished running (in the format YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, matching the date-time format as specified by RFC 3339)."
          },
          "message": {
            "type": "string",
            "description": "Any message associated with the monitoring run"
          },
          "failure": {
            "$ref": "#/components/schemas/GenericErrorResponse"
          },
          "operators": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitoringRunOperator"
            }
          }
        }
      },
      "MonitoringRunOperator": {
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "properties": {
              "state": {
                "$ref": "#/components/schemas/MonitoringRunState"
              },
              "started_at": {
                "type": "string",
                "format": "date-time"
              },
              "completed_at": {
                "type": "string",
                "format": "date-time"
              },
              "failure": {
                "$ref": "#/components/schemas/GenericErrorResponse"
              }
            }
          },
          "result": {
            "type": "object",
            "description": "Result produced by the operator, if any.",
            "additionalProperties": true
          }
        }
      },
      "DatabaseConfiguration": {
        "type": "object",
        "description": "Database configuration ignored if internal database is requested (`internal_database` is `true`)",
        "required": [
          "database_type",
          "credentials"
        ],
        "properties": {
          "database_type": {
            "type": "string",
            "enum": [
              "postgresql",
              "db2"
            ]
          },
          "instance_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "credentials": {
            "$ref": "#/components/schemas/SecretCleaned"
          },
          "location": {
            "$ref": "#/components/schemas/LocationSchemaName"
          }
        }
      },
      "DatabaseConfigurationRequest": {
        "type": "object",
        "description": "Database configuration ignored if internal database is requested (`internal_database` is `true`)",
        "required": [
          "database_type",
          "credentials"
        ],
        "properties": {
          "database_type": {
            "type": "string",
            "enum": [
              "postgresql",
              "db2"
            ]
          },
          "name": {
            "type": "string"
          },
          "instance_id": {
            "type": "string"
          },
          "credentials": {
            "$ref": "#/components/schemas/PrimaryStorageCredentials"
          },
          "location": {
            "$ref": "#/components/schemas/LocationSchemaName"
          }
        }
      },
      "DataDistributionAgg": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "example": [
          "count",
          "Age:min",
          "Age:stddev"
        ],
        "description": "Definition of aggregations, by default 'count'.\n\nAggregations can be one of:\n* count\n* <column_name>:sum\n* <column_name>:min\n* <column_name>:max\n* <column_name>:avg\n* <column_name>:stddev\n"
      },
      "DataDistributionFilter": {
        "type": "string",
        "example": "Age:eq:33,Gender:in:[M,F,T]",
        "description": "Filters defined by user in format: {field_name}:{op}:{value}.\nPartly compatible with filters in \"filter\" parameter of GET /v2/data_sets/{data_set_id}/records.\n\nPossible filter operators:\n* eq - equals (numeric, string)\n* gt - greater than (numeric)\n* gte - greater than or equal (numeric)\n* lt - lower than (numeric)\n* lte - lower than or equal (numeric)\n* in - value in a set (numeric, string)\n* field:null (a no-argument filter) - value is null (any nullable)\n* field:exists (a no-argument filter) - value is not null (any column)\n"
      },
      "DataDistributionRequest": {
        "type": "object",
        "description": "Data distribution creation request",
        "required": [
          "start",
          "end",
          "group",
          "dataset"
        ],
        "properties": {
          "start": {
            "type": "string",
            "example": "2019-02-26T10:00:00.000Z",
            "description": "start datetime in ISO format"
          },
          "end": {
            "type": "string",
            "example": "2019-02-26T10:00:00.000Z",
            "description": "end datetime in ISO format"
          },
          "dataset": {
            "$ref": "#/components/schemas/DataSetType"
          },
          "limit": {
            "type": "number",
            "example": 100,
            "description": "limit for number of rows, by default it is 50,000 (max possible limit is 50,000)"
          },
          "group": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "Age",
              "Gender"
            ],
            "description": "names of columns to be grouped"
          },
          "filter": {
            "$ref": "#/components/schemas/DataDistributionFilter"
          },
          "agg": {
            "$ref": "#/components/schemas/DataDistributionAgg"
          },
          "max_bins": {
            "type": "number",
            "example": 4,
            "description": "max number of bins which will be generated for data"
          }
        }
      },
      "DataDistributionResult": {
        "type": "object",
        "description": "The computed data distribution against specified data set.",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/MonitoringRunStatus"
          },
          "processed_records": {
            "type": "number",
            "example": 300,
            "description": "number of processed records"
          },
          "limited_data": {
            "type": "boolean",
            "example": true,
            "description": "was the limit used on data"
          },
          "distribution": {
            "type": "object",
            "required": [
              "fields",
              "values"
            ],
            "properties": {
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "names of the data distribution fields"
              },
              "values": {
                "description": "data distribution rows",
                "type": "array",
                "items": {
                  "description": "It can be any value - object, string, number, boolean or array. If this is an array and fields are defined then elements of the array corresponds to the fields."
                }
              }
            },
            "example": {
              "fields": [
                "Age",
                "Gender",
                "count"
              ],
              "values": [
                [
                  33,
                  "M",
                  4
                ],
                [
                  33,
                  "F",
                  5
                ]
              ]
            }
          }
        }
      },
      "DataDistributionResponse": {
        "type": "object",
        "description": "Data distribution details response",
        "required": [
          "metadata",
          "entity"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DataDistributionRequest"
              },
              {
                "$ref": "#/components/schemas/DataDistributionResult"
              }
            ]
          }
        }
      },
      "Source": {
        "type": "object",
        "required": [
          "id",
          "type",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "id of the source",
            "example": "confusion_matrix_1",
            "minLength": 1,
            "maxLength": 128
          },
          "type": {
            "type": "string",
            "description": "type of the source",
            "example": "confusion_matrix",
            "minLength": 1,
            "maxLength": 128
          },
          "metric_ids": {
            "type": "array",
            "description": "a selection of metrics that the source applies to (if not provided the source applies to all metrics)",
            "items": {
              "type": "string",
              "example": [
                "area_under_roc",
                "area_under_pr"
              ]
            }
          },
          "data": {
            "description": "Data representing the source. It can be any value - object, string, number, boolean or array.",
            "example": {
              "labels": [
                "NoRisk",
                "Risk"
              ],
              "values": [
                [
                  0.97,
                  0.01
                ],
                [
                  0.03,
                  0.96
                ]
              ]
            }
          }
        }
      },
      "DataSetId": {
        "type": "string",
        "description": "Unique identifier of the data set (like scoring or feedback)",
        "example": "59e92703-febe-4eda-abfa-09261c48f3dd",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "DataSetLocationHeader": {
        "type": "string",
        "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/data_sets/19a30eb8-8f5e-4a62-870a-4fbbbabb4bea"
      },
      "TargetId": {
        "type": "string",
        "description": "ID of the data set target (e.g. subscription ID, ...)",
        "example": "4b133ea1-3097-4175-82a1-4fd80759de26",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "[a-z0-9_\\-]+"
      },
      "TargetType": {
        "type": "string",
        "description": "Type of the target (e.g. subscription, ...)",
        "enum": [
          "subscription",
          "instance",
          "data_mart",
          "project",
          "space"
        ]
      },
      "Target": {
        "type": "object",
        "required": [
          "target_type",
          "target_id"
        ],
        "properties": {
          "target_type": {
            "$ref": "#/components/schemas/TargetType"
          },
          "target_id": {
            "$ref": "#/components/schemas/TargetId"
          }
        }
      },
      "DataSetObject": {
        "type": "object",
        "required": [
          "data_mart_id",
          "name",
          "type",
          "target",
          "data_schema",
          "status"
        ],
        "properties": {
          "data_mart_id": {
            "$ref": "#/components/schemas/DataMartId"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/DataSetType"
          },
          "target": {
            "$ref": "#/components/schemas/Target"
          },
          "schema_update_mode": {
            "type": "string",
            "enum": [
              "none",
              "auto"
            ]
          },
          "data_schema": {
            "$ref": "#/components/schemas/SparkStruct"
          },
          "location": {
            "$ref": "#/components/schemas/LocationTableName"
          },
          "managed_by": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          }
        }
      },
      "DataSetObjectRequest": {
        "type": "object",
        "required": [
          "name",
          "data_mart_id",
          "target",
          "type",
          "data_schema"
        ],
        "properties": {
          "data_mart_id": {
            "$ref": "#/components/schemas/DataMartId"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/DataSetType"
          },
          "target": {
            "$ref": "#/components/schemas/Target"
          },
          "schema_update_mode": {
            "type": "string",
            "enum": [
              "none",
              "auto"
            ]
          },
          "data_schema": {
            "$ref": "#/components/schemas/SparkStruct"
          },
          "location": {
            "$ref": "#/components/schemas/LocationTableName"
          },
          "managed_by": {
            "type": "string"
          }
        }
      },
      "DataSetResponse": {
        "type": "object",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "$ref": "#/components/schemas/DataSetObject"
          }
        }
      },
      "DataRecord": {
        "type": "object",
        "required": [
          "values"
        ],
        "properties": {
          "values": {
            "$ref": "#/components/schemas/JsDictElem"
          },
          "annotations": {
            "$ref": "#/components/schemas/Annotations"
          }
        }
      },
      "DataRecordResponse": {
        "type": "object",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "$ref": "#/components/schemas/DataRecord"
          }
        }
      },
      "DataRecordResponseList": {
        "type": "object",
        "required": [
          "fields",
          "values"
        ],
        "properties": {
          "fields": {
            "$ref": "#/components/schemas/JsListFields"
          },
          "values": {
            "$ref": "#/components/schemas/JsListValues"
          },
          "annotations": {
            "$ref": "#/components/schemas/AnnotationList"
          }
        }
      },
      "DataRecordsResponseCollectionDict": {
        "description": "dict format",
        "required": [
          "records"
        ],
        "properties": {
          "total_count": {
            "type": "integer",
            "description": "Number of all rows which satisfy the query. It is calculated and returned when include_total_count query param is set to `true`"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataRecordResponse"
            }
          }
        }
      },
      "DataRecordsResponseCollectionList": {
        "description": "list format",
        "required": [
          "records"
        ],
        "properties": {
          "total_count": {
            "type": "integer",
            "description": "Number of all rows which satisfy the query. It is calculated and returned when include_total_count query param is set to `true`"
          },
          "records": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "$ref": "#/components/schemas/DataRecordResponseList"
            }
          }
        }
      },
      "DataSetType": {
        "type": "string",
        "description": "type of a data set",
        "enum": [
          "manual_labeling",
          "payload_logging",
          "feedback",
          "business_payload",
          "explanations",
          "explanations_whatif",
          "training",
          "payload_logging_error",
          "model_health",
          "drift_stats",
          "drift_intervals",
          "drift_insights",
          "gen_ai_quality_metrics",
          "drift_scores",
          "aidc_feedback",
          "custom"
        ]
      },
      "DataSetResponseCollection": {
        "required": [
          "data_sets"
        ],
        "properties": {
          "data_sets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataSetResponse"
            }
          }
        }
      },
      "DataSetRequestsLocationHeader": {
        "type": "string",
        "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/data_sets/19a30eb8-8f5e-4a62-870a-4fbbbabb4bea/requests/3d16bc2b-5cad-42c6-a289-6a248c777c77"
      },
      "DataSetRecords": {
        "type": "object",
        "required": [
          "data_set_records"
        ],
        "properties": {
          "data_set_records": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "data_set",
                "records"
              ],
              "properties": {
                "data_set": {
                  "type": "object",
                  "required": [
                    "data_mart_id",
                    "type",
                    "target",
                    "data_schema"
                  ],
                  "properties": {
                    "data_mart_id": {
                      "$ref": "#/components/schemas/DataMartId"
                    },
                    "type": {
                      "$ref": "#/components/schemas/DataSetType"
                    },
                    "target": {
                      "$ref": "#/components/schemas/Target"
                    },
                    "data_schema": {
                      "$ref": "#/components/schemas/SparkStruct"
                    }
                  }
                },
                "records": {
                  "type": "object",
                  "required": [
                    "metadata",
                    "entity"
                  ],
                  "properties": {
                    "metadata": {
                      "$ref": "#/components/schemas/Metadata"
                    },
                    "entity": {
                      "type": "object",
                      "required": [
                        "values"
                      ],
                      "properties": {
                        "values": {
                          "$ref": "#/components/schemas/JsDictElem"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "IntegratedSystemLocationHeader": {
        "type": "string",
        "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/integrated_systems/3cc3bb1a-0afc-47fa-b3d3-d9856cd8ee80"
      },
      "IntegratedSystemCollection": {
        "required": [
          "integrated_systems"
        ],
        "properties": {
          "integrated_systems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegratedSystemResponse"
            }
          }
        }
      },
      "IntegratedSystem": {
        "type": "object",
        "description": "Integrated System definition\n",
        "required": [
          "name",
          "type",
          "description",
          "credentials"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the Integrated System."
          },
          "type": {
            "$ref": "#/components/schemas/IntegratedSystemType"
          },
          "description": {
            "type": "string",
            "description": "The description of the Integrated System."
          },
          "credentials": {
            "type": "object",
            "description": "The credentials for the Integrated System",
            "additionalProperties": true
          },
          "connection": {
            "type": "object",
            "description": "The additional connection information for the Integrated System"
          },
          "group_ids": {
            "description": "Access control list of group id of Cloud Pak for Data (Only available for open_pages type and OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "10000",
              "10001"
            ]
          },
          "user_ids": {
            "description": "Access control list of user id of Cloud Pak for Data (Only available for open_pages type and OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "1000330999",
              "1000331301"
            ]
          },
          "parameters": {
            "description": "Additional parameters",
            "type": "object"
          }
        }
      },
      "IntegratedSystemType": {
        "type": "string",
        "enum": [
          "open_pages",
          "slack",
          "webhook",
          "hive",
          "spark",
          "jdbc",
          "custom_metrics_provider",
          "watson_knowledge_catalog",
          "generative_ai_evaluator",
          "embeddings_provider"
        ]
      },
      "IntegratedSystemResponse": {
        "type": "object",
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "$ref": "#/components/schemas/IntegratedSystem"
          }
        }
      },
      "IntegratedSystemReference": {
        "type": "object",
        "description": "Integrated System reference\n",
        "required": [
          "integrated_system_id",
          "external_id"
        ],
        "properties": {
          "integrated_system_id": {
            "type": "string",
            "description": "id of the Integrated System"
          },
          "external_id": {
            "type": "string",
            "description": "id of the resource in the Integrated System"
          },
          "parameters": {
            "type": "object",
            "description": "Additional parameters",
            "example": {
              "external_type": "model"
            }
          }
        }
      },
      "OperationalSpaceLocationHeader": {
        "type": "string",
        "example": "https://aiopenscale.cloud.ibm.com/openscale/9fdaa46c-c124-4700-b794-6d6a5262c3aa/v2/operational_spaces/3cc3bb1a-0afc-47fa-b3d3-d9856cd8ee80"
      },
      "OperationalSpaceCollection": {
        "required": [
          "operational_spaces"
        ],
        "properties": {
          "operational_spaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperationalSpace"
            }
          }
        }
      },
      "OperationalSpace": {
        "type": "object",
        "description": "Operational Space definition\n",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the Operational Space."
          },
          "description": {
            "type": "string",
            "description": "The description of the Operational Space."
          }
        }
      },
      "OperationalSpaceResponse": {
        "type": "object",
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "entity": {
            "$ref": "#/components/schemas/OperationalSpace"
          }
        }
      },
      "ExplanationTaskRequest": {
        "description": "Explanation task request to submit for computing explanation. One of scoring_ids and input_rows is mandatory.",
        "properties": {
          "scoring_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "scoring_id1",
              "scoring_id2"
            ],
            "description": "IDs of the scoring transaction"
          },
          "input_rows": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "example": [
              {
                "feature1": "value1",
                "probability": [
                  0.4,
                  0.6
                ],
                "prediction": "classA",
                "scoring_id": "scoring_id1",
                "subscription_id": "c37c3c7c-67ae-48be-84bd-86cd2b25e618",
                "service_provider_id": "c37c3c7c-67ae-48be-84bd-86cd2b25e619",
                "deployment_id": "c37c3c7c-67ae-48be-84bd-86cd2b25e620"
              }
            ],
            "description": "List of scoring transactions"
          },
          "explanation_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "lime",
                "contrastive"
              ],
              "default": "lime"
            },
            "description": "Types of explanations to generate"
          },
          "subscription_id": {
            "description": "Unique subscription ID",
            "type": "string",
            "example": "c37c3c7c-67ae-48be-84bd-86cd2b25e618"
          }
        }
      },
      "PostExplanationTaskResponse": {
        "description": "Post explanation tasks response",
        "required": [
          "metadata"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/PostExplanationTaskResponseMetadata"
          }
        }
      },
      "PostExplanationTaskResponseMetadata": {
        "description": "Metadata of post explanation tasks response",
        "required": [
          "explanation_task_ids",
          "created_at",
          "created_by"
        ],
        "properties": {
          "explanation_task_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of identifiers for tracking explanation tasks",
            "example": [
              "explanation_task_id1",
              "explanation_task_id2"
            ]
          },
          "created_by": {
            "type": "string",
            "description": "ID of the user creating explanation task",
            "example": "IBMid-123456"
          },
          "created_at": {
            "type": "string",
            "description": "Time when the explanation task was initiated",
            "example": "2018-11-01 09:16:45.783596"
          }
        }
      },
      "GetExplanationTaskResponse": {
        "description": "Get explanation task response",
        "required": [
          "metadata",
          "entity"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/GetExplanationTaskResponseMetadata"
          },
          "entity": {
            "$ref": "#/components/schemas/GetExplanationTaskResponseEntity"
          }
        }
      },
      "GetExplanationTaskResponseMetadata": {
        "description": "Metadata of get explanation task response",
        "required": [
          "explanation_task_id",
          "created_at",
          "created_by"
        ],
        "properties": {
          "explanation_task_id": {
            "type": "string",
            "description": "Identifier for tracking explanation task",
            "example": "explanation_task_id1"
          },
          "created_by": {
            "type": "string",
            "description": "ID of the user creating explanation task",
            "example": "IBMid-123456"
          },
          "created_at": {
            "type": "string",
            "description": "Time when the explanation task was initiated",
            "example": "2018-11-01 09:16:45.783596"
          },
          "updated_at": {
            "type": "string",
            "description": "Time when the explanation task was last updated",
            "example": "2018-11-01 09:16:45.783596"
          }
        }
      },
      "GetExplanationTaskResponseEntity": {
        "description": "Entity of get explanation task response",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "description": "Status of the explanation task",
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "in_progress",
                  "finished",
                  "error"
                ],
                "description": "Overall status of the explanation task"
              }
            }
          },
          "asset": {
            "$ref": "#/components/schemas/ExplanationTaskResponseEntityAsset"
          },
          "input_features": {
            "description": "List of input features",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExplanationTaskResponseEntityInputFeature"
            }
          },
          "perturbed": {
            "type": "string",
            "description": "Indicate whether the transaction is perturbed or not",
            "enum": [
              true,
              false
            ],
            "example": false
          },
          "explanations": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/LimeExplanation"
                },
                {
                  "$ref": "#/components/schemas/ContrastiveExplanation"
                }
              ]
            },
            "description": "List of generated explanations"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExplanationError"
            },
            "description": "List of errors occurred while generating explanations"
          },
          "scoring_id": {
            "type": "string",
            "description": "ID of the scoring transaction",
            "example": "scoring_id1"
          }
        }
      },
      "ExplanationTaskResponseEntityAsset": {
        "description": "Asset details in get explanation task response",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier for the asset",
            "example": "asset_id"
          },
          "name": {
            "type": "string",
            "description": "Name of the asset",
            "example": "asset_name"
          },
          "input_data_type": {
            "type": "string",
            "description": "Type of the input data",
            "enum": [
              "structured",
              "unstructured_image",
              "unstructured_text"
            ]
          },
          "problem_type": {
            "type": "string",
            "description": "Problem type",
            "enum": [
              "binary",
              "regression",
              "multiclass",
              "question_answering",
              "summarization",
              "retrieval_augmented_generation",
              "classification",
              "generation",
              "code",
              "extraction"
            ]
          },
          "deployment": {
            "description": "Asset deployment details",
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Identifier for the asset deployment",
                "example": "deployment_id"
              },
              "name": {
                "type": "string",
                "description": "Name of the asset deployment",
                "example": "deployment_name"
              }
            }
          }
        }
      },
      "ExplanationTaskResponseEntityInputFeature": {
        "description": "Input feature details in get explanation task response",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the feature column",
            "example": "feature_name"
          },
          "value": {
            "type": "string",
            "description": "Value of the feature column",
            "example": "feature_value"
          },
          "feature_type": {
            "type": "string",
            "enum": [
              "numerical",
              "categorical"
            ],
            "description": "Identifies the type of feature column"
          }
        }
      },
      "LimeExplanation": {
        "description": "Lime explanation details",
        "properties": {
          "explanation_type": {
            "type": "string",
            "description": "Type of the explanation",
            "example": "lime"
          },
          "predictions": {
            "description": "Lime explanations of predictions",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LimeExplanationPrediction"
            }
          }
        }
      },
      "LimeExplanationPrediction": {
        "description": "Lime explanation prediction details",
        "properties": {
          "value": {
            "type": "string",
            "description": "Value of the output field in this particular prediction",
            "example": "class1"
          },
          "probability": {
            "type": "number",
            "description": "Signifies probability of this particular prediction",
            "example": 0.8
          },
          "explanation_features": {
            "description": "List of features and their contribution in prediction",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExplanationFeature"
            }
          }
        }
      },
      "ExplanationFeature": {
        "description": "Explanation feature details",
        "properties": {
          "feature_name": {
            "type": "string",
            "description": "Name of the feature column",
            "example": "feature_name"
          },
          "weight": {
            "type": "number",
            "description": "Contributing weight to the output explanation for the given feature",
            "example": 0.18
          },
          "importance": {
            "type": "string",
            "description": "Contributing importance to the output explanation for the given feature",
            "example": 1
          },
          "feature_value": {
            "type": "string",
            "description": "Value of the feature column",
            "example": "feature_value"
          },
          "feature_range": {
            "type": "object",
            "description": "Range of feature values",
            "properties": {
              "min": {
                "type": "string",
                "description": "Minimum possible value for given feature",
                "example": "10"
              },
              "min_inclusive": {
                "type": "boolean",
                "description": "Identifies if the minimum value is inclusive or not",
                "example": true
              },
              "max": {
                "type": "string",
                "description": "Maximum possible value for given feature",
                "example": "100"
              },
              "max_inclusive": {
                "type": "boolean",
                "description": "Identifies if the maximum value is inclusive or not",
                "example": false
              }
            }
          }
        }
      },
      "ContrastiveExplanation": {
        "description": "Contrastive explanation details",
        "properties": {
          "explanation_type": {
            "type": "string",
            "description": "Type of explanation",
            "example": "contrastive"
          },
          "pertinent_positive": {
            "type": "object",
            "description": "These factors are sufficient evidence in themselves to yield the given classification",
            "properties": {
              "features": {
                "type": "array",
                "description": "List of feature names, values and their importance",
                "items": {
                  "$ref": "#/components/schemas/ExplanationFeature"
                }
              }
            }
          },
          "pertinent_negative": {
            "type": "object",
            "description": "These factors, if added, would cause the classification to change",
            "properties": {
              "features": {
                "type": "array",
                "description": "List of feature names, values and their importance",
                "items": {
                  "$ref": "#/components/schemas/ExplanationFeature"
                }
              },
              "prediction": {
                "type": "string",
                "description": "Classification of pertinent negative features",
                "example": "class2"
              },
              "probability": {
                "type": "number",
                "description": "Probability of pertinent negative features",
                "example": 0.6
              }
            }
          }
        }
      },
      "ExplanationError": {
        "description": "Explanation error details",
        "properties": {
          "explanation_type": {
            "type": "string",
            "description": "Type of explanation",
            "example": "lime"
          },
          "error": {
            "type": "object",
            "description": "The error message details",
            "properties": {
              "code": {
                "type": "string",
                "description": "Error code",
                "example": "AIQES1001E"
              },
              "message": {
                "type": "string",
                "description": "Error message",
                "example": "There was an error while computing the explanation."
              }
            }
          },
          "trace_id": {
            "type": "string",
            "description": "ID used to track the explanation task via logs",
            "example": "cddd239ec9df40108170ea7ce6dfca43"
          }
        }
      },
      "GetExplanationTasksResponse": {
        "description": "List all explanations response",
        "required": [
          "total_count",
          "limit",
          "offset",
          "explanation_fields"
        ],
        "properties": {
          "total_count": {
            "type": "integer",
            "description": "Total number of computed explanations",
            "example": 10
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of returned explanations",
            "example": 5
          },
          "offset": {
            "type": "integer",
            "description": "Offset of returned explanations",
            "example": 2
          },
          "explanation_fields": {
            "description": "The list of explanation fields",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "explanation_task_id",
              "scoring_id",
              "created_at",
              "finished_at",
              "status",
              "prediction",
              "subscription_id",
              "deployment_id",
              "asset_name",
              "deployment_name"
            ]
          },
          "explanation_values": {
            "description": "The list of explanation values",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              [
                "explanation_task_id1",
                "scoring_id1",
                "2020-05-18T10:01:38.207844Z",
                "2020-05-18T10:18:56.863283Z",
                "finished",
                "prediction1",
                "subscription_id1",
                "deployment_id1",
                "Asset name1",
                "Deployment name1"
              ],
              [
                "explanation_task_id2",
                "scoring_id2",
                "2020-05-18T06:04:44.915682Z",
                "2020-05-18T06:04:56.521611Z",
                "error",
                "prediction2",
                "subscription_id2",
                "deployment_id2",
                "Asset name2",
                "Deployment name2"
              ]
            ]
          }
        }
      },
      "SchemaInferenceRequest": {
        "description": "Schema inference request - either input_data or training_data_reference must be provided",
        "properties": {
          "input_data": {
            "$ref": "#/components/schemas/ScoreDataRecords"
          },
          "training_data_reference": {
            "$ref": "#/components/schemas/InputDataReference"
          }
        }
      },
      "SchemaInferenceResponse": {
        "description": "Schema inference response",
        "required": [
          "subscription"
        ],
        "properties": {
          "file_asset_metadata": {
            "$ref": "#/components/schemas/FileAssetMetadata"
          },
          "subscription": {
            "$ref": "#/components/schemas/SubscriptionResponse"
          }
        }
      },
      "ScoreDataRecords": {
        "description": "Array of score data object. If multiple score data objects are included, the \"fields\" array (if any) for score purposes will always be taken from the first score data object.",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ScoreData"
        }
      },
      "ScoreData": {
        "description": "Score data object",
        "properties": {
          "values": {
            "description": "Score value records",
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "fields": {
            "description": "Score fields",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "id": {
            "description": "Discriminates the data for multi input data situation. For example in cases where multiple tensors are expected.",
            "type": "string"
          }
        },
        "required": [
          "values"
        ],
        "type": "object",
        "example": {
          "fields": [
            "age",
            "profession"
          ],
          "values": [
            [
              "28",
              "engineer"
            ],
            [
              "33",
              "teacher"
            ]
          ]
        }
      },
      "PostRiskEvaluationsResponse": {
        "type": "object",
        "properties": {
          "evaluation_id": {
            "type": "string",
            "description": "The unique ID for the MRM evaluation."
          },
          "evaluation_date": {
            "type": "string",
            "description": "The date time stamp in UTC ISO format for the MRM evaluation."
          },
          "publish_metrics": {
            "type": "string",
            "description": "Flag to decide whether to send evaluated metrics to OpenPages."
          },
          "evaluation_tests": {
            "type": "string",
            "description": "Comma separated list of monitor tests to run."
          },
          "evaluation_start_time": {
            "type": "string",
            "description": "Time stamp of the evaluation."
          },
          "status": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "description": "The state of the upload data."
              }
            }
          }
        }
      },
      "RiskEvaluationResponse": {
        "type": "object",
        "properties": {
          "metadata": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "created_at": {
                "type": "string"
              },
              "created_by": {
                "type": "string"
              },
              "modified_by": {
                "type": "string"
              }
            }
          },
          "entity": {
            "$ref": "#/components/schemas/MonitoringRunEntity"
          }
        }
      },
      "PutRiskEvaluation": {
        "type": "object",
        "properties": {
          "cancel_run": {
            "type": "string"
          }
        }
      },
      "IntegratedMetric": {
        "type": "object",
        "properties": {
          "integrated_system_type": {
            "type": "string"
          },
          "mapped_metrics": {
            "type": "string"
          }
        }
      },
      "IntegratedSystemMetricsArray": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The monitor for which the metrics needs to be published to integrated system."
          },
          "measures": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "integrated_metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegratedMetric"
            }
          }
        }
      },
      "IntegratedSystemMetrics": {
        "type": "object",
        "properties": {
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegratedSystemMetricsArray"
            }
          },
          "send_report": {
            "type": "boolean"
          }
        }
      },
      "MrmUpdateRiskEvaluationStatusEntity": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string"
          }
        }
      },
      "RiskNotificationPreferencesRequest": {
        "type": "object",
        "properties": {
          "notification_enabled": {
            "type": "boolean"
          },
          "notification_frequency": {
            "type": "string"
          },
          "notification_emails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RiskNotificationPreferencesResponse": {
        "type": "object",
        "properties": {
          "metadata": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string"
              },
              "created_by": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            }
          },
          "entity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RiskNotificationPreferencesRequest"
              },
              {
                "type": "object"
              }
            ]
          }
        }
      },
      "MrmGetRiskEvaluationStatus": {
        "type": "object",
        "properties": {
          "subscription_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "localized_status": {
            "type": "string"
          }
        }
      },
      "MrmGetRiskEvaluationStatusEntity": {
        "type": "object",
        "properties": {
          "risk_evaluation_status": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MrmGetRiskEvaluationStatus"
            }
          }
        }
      },
      "PromptSetupMetaField": {
        "type": "object",
        "description": "The details of the meta-fields to be input for prompt setup.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the meta-field."
          },
          "data_type": {
            "type": "string",
            "description": "The data-type of the meta-field.",
            "example": [
              "string",
              "double",
              "boolean",
              "integer"
            ]
          }
        }
      },
      "PromptSetupRequest": {
        "type": "object",
        "required": [
          "label_column",
          "operational_space_id",
          "problem_type",
          "input_data_type"
        ],
        "properties": {
          "label_column": {
            "type": "string",
            "description": "The name of the column containing the ground truth or actual labels."
          },
          "operational_space_id": {
            "type": "string",
            "description": "The rank of the environment in which the monitoring is happening. Accepted values are `development`, `pre_production`, `production`."
          },
          "problem_type": {
            "type": "string",
            "description": "The task type to monitor for the given prompt template asset."
          },
          "classification_type": {
            "type": "string",
            "description": "The classification type `binary`/`multiclass` applicable only for `classification` problem (task) type."
          },
          "input_data_type": {
            "type": "string",
            "description": "The input data type."
          },
          "context_fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of prompt variables containing the context. Applicable only for Retrieval-Augmented Generation problem type."
          },
          "question_field": {
            "type": "string",
            "description": "The prompt variable containing the question. Applicable only for Retrieval-Augmented Generation problem type."
          },
          "meta_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromptSetupMetaField"
            },
            "description": "The list of meta-fields for the prompt."
          },
          "monitors": {
            "type": "object",
            "properties": {
              "monitor_definition_id": {
                "type": "object",
                "properties": {
                  "parameters": {
                    "type": "object"
                  },
                  "thresholds": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "PromptSetupResponse": {
        "type": "object",
        "required": [
          "prompt_template_asset_id",
          "start_time"
        ],
        "properties": {
          "prompt_template_asset_id": {
            "$ref": "#/components/schemas/PromptTemplateAssetId"
          },
          "project_id": {
            "$ref": "#/components/schemas/ProjectId"
          },
          "space_id": {
            "$ref": "#/components/schemas/SpaceId"
          },
          "deployment_id": {
            "$ref": "#/components/schemas/DeploymentId"
          },
          "service_provider_id": {
            "$ref": "#/components/schemas/ServiceProviderId"
          },
          "subscription_id": {
            "$ref": "#/components/schemas/SubscriptionId"
          },
          "mrm_monitor_instance_id": {
            "type": "string",
            "description": "The MRM monitor instance ID."
          },
          "start_time": {
            "type": "string",
            "description": "The date-timestamp when the prompt setup was started."
          },
          "end_time": {
            "type": "string",
            "description": "The date-timestamp when the prompt setup ended."
          },
          "status": {
            "$ref": "#/components/schemas/PromptSetupResponseStatus"
          }
        }
      },
      "PromptSetupResponseStatus": {
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "RUNNING",
              "ERROR",
              "FINISHED"
            ]
          },
          "failure": {
            "$ref": "#/components/schemas/GenericErrorResponse"
          }
        },
        "required": [
          "state"
        ]
      },
      "TextDetectionContentRequest": {
        "type": "object",
        "description": "The request for text detection on input content.\\n",
        "properties": {
          "input": {
            "type": "string",
            "description": "The text to be examined."
          },
          "detectors": {
            "$ref": "#/components/schemas/TextDetectionContentDetectors"
          }
        },
        "required": [
          "input",
          "detectors"
        ]
      },
      "TextDetectionContextRequest": {
        "type": "object",
        "description": "The request for text detection based on context documents.\n",
        "properties": {
          "input": {
            "type": "string",
            "description": "The text to be examined.\n"
          },
          "detectors": {
            "$ref": "#/components/schemas/TextDetectionContextDetectors"
          },
          "context_type": {
            "type": "string",
            "description": "The type of the context.\n",
            "enum": [
              "docs"
            ]
          },
          "context": {
            "description": "Context documents.\n",
            "items": {
              "$ref": "#/components/schemas/TextDetectionContext"
            },
            "minItems": 1,
            "maxItems": 100,
            "example": [
              "https://en.wikipedia.org/wiki/IBM",
              "https://research.ibm.com/"
            ]
          }
        },
        "required": [
          "input",
          "detectors",
          "context_type",
          "context"
        ]
      },
      "TextDetectionGeneratedRequest": {
        "type": "object",
        "description": "The request for text detection on prompt and generated text.",
        "properties": {
          "prompt": {
            "type": "string",
            "description": "The text prompt."
          },
          "generated_text": {
            "type": "string",
            "description": "The generated text."
          },
          "detectors": {
            "$ref": "#/components/schemas/TextDetectionGeneratedDetectors"
          }
        },
        "required": [
          "prompt",
          "generated_text",
          "detectors"
        ]
      },
      "TextDetectionChatRequest": {
        "type": "object",
        "description": "Request for hallucination detection through tool calling.",
        "allOf": [
          {
            "type": "object",
            "description": "The definition of an assistant message.\n",
            "properties": {
              "messages": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TextDetectionChatMessage"
                    },
                    {
                      "$ref": "#/components/schemas/TextDetectionChatToolCalls"
                    }
                  ]
                },
                "minItems": 1,
                "maxItems": 100
              },
              "tools": {
                "type": "array",
                "description": "Tool functions that may be invoked.",
                "items": {
                  "$ref": "#/components/schemas/TextDetectionChatParameterTools"
                },
                "minItems": 1,
                "maxItems": 128
              },
              "detectors": {
                "$ref": "#/components/schemas/TextDetectionChatDetectors"
              }
            }
          }
        ]
      },
      "TextDetectionChatToolCalls": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "assistant"
            ]
          },
          "tool_calls": {
            "type": "array",
            "description": "Tool calls initiated by the assistant.",
            "items": {
              "$ref": "#/components/schemas/TextDetectionChatToolCall"
            }
          }
        }
      },
      "TextDetectionChatPropertyTool": {
        "type": "string",
        "description": "The tool type.",
        "enum": [
          "function"
        ]
      },
      "TextDetectionChatParameterFunction": {
        "type": "object",
        "description": "The parameters specific to chat function.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the function.\\n",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-zA-Z]+[a-zA-Z0-9-_]*$"
          },
          "description": {
            "type": "string",
            "description": "A description of what the function does\\nused by the model to choose when and how to call the function.\\n"
          },
          "parameters": {
            "type": "object",
            "description": "The parameters the functions accepts described as a JSON Schema object.\\nSee the [JSON Schema reference](https://json-schema.org/learn/getting-started-step-by-step)\\nfor documentation about the format.\\n\\nOmitting parameters defines a function with an empty parameter list.\\n"
          }
        },
        "required": [
          "name"
        ]
      },
      "TextDetectionChatParameterTools": {
        "type": "object",
        "description": "The chat tool parameters.\n",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TextDetectionChatPropertyTool"
          },
          "function": {
            "$ref": "#/components/schemas/TextDetectionChatParameterFunction"
          }
        },
        "required": [
          "type"
        ]
      },
      "TextDetectionChatMessage": {
        "type": "object",
        "description": "The base definition of a text chat message.\n",
        "discriminator": {
          "propertyName": "role"
        },
        "properties": {
          "role": {
            "type": "string",
            "description": "The role of the messages author.\n",
            "enum": [
              "assistant",
              "system",
              "tool",
              "user"
            ]
          },
          "content": {
            "type": "string",
            "description": "The content of the user message"
          }
        },
        "required": [
          "role",
          "content"
        ]
      },
      "TextDetectionChatFunctionCall": {
        "type": "object",
        "description": "The function call.\\n",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the function.\\n"
          },
          "arguments": {
            "type": "object",
            "description": "The arguments to call the function with, as generated by the model in JSON format.\\n\\nNote that the model does not always generate valid JSON\\nand may hallucinate parameters not defined by your function schema.\\nValidate the arguments in your code before calling your function.\\n"
          }
        },
        "required": [
          "name",
          "arguments"
        ]
      },
      "TextDetectionChatToolCall": {
        "type": "object",
        "description": "The tool call.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the tool call."
          },
          "type": {
            "type": "string",
            "description": "The type of the tool. Currently only `function` is supported.",
            "enum": [
              "function"
            ]
          },
          "function": {
            "$ref": "#/components/schemas/TextDetectionChatFunctionCall"
          }
        },
        "required": [
          "id",
          "type",
          "function"
        ]
      },
      "TextDetectionGeneratedResponse": {
        "type": "object",
        "description": "The response for generated text detection.\\n",
        "properties": {
          "detections": {
            "type": "array",
            "description": "The text that was detected.\\n",
            "items": {
              "$ref": "#/components/schemas/TextDetectionGeneratedItem"
            },
            "minItems": 0
          }
        },
        "required": [
          "detections"
        ]
      },
      "TextDetectionContext": {
        "type": "string",
        "format": "url",
        "description": "The context item.\n    \n"
      },
      "TextDetectionScore": {
        "type": "number",
        "format": "float",
        "description": "The threshold probability that this is a real match.",
        "minimum": 0,
        "maximum": 1,
        "example": 0.823
      },
      "TextDetectionDetectionItem": {
        "type": "object",
        "description": "Detection details.",
        "properties": {
          "detection_type": {
            "type": "string",
            "description": "The type of the detection identified."
          },
          "detection": {
            "type": "string",
            "description": "The detected string."
          },
          "detector_id": {
            "type": "string",
            "description": "The id of the detector used."
          },
          "score": {
            "$ref": "#/components/schemas/TextDetectionScore"
          }
        },
        "required": [
          "detection_type",
          "detection",
          "score"
        ]
      },
      "TextDetectionGeneratedItem": {
        "type": "object",
        "description": "Detection details.",
        "properties": {
          "detection_type": {
            "type": "string",
            "description": "The type of the detection identified."
          },
          "detector_id": {
            "type": "string",
            "description": "The id of the detector used."
          },
          "detection": {
            "type": "string",
            "description": "The detected string."
          },
          "score": {
            "$ref": "#/components/schemas/TextDetectionScore"
          }
        },
        "required": [
          "detection_type",
          "detection",
          "score",
          "detector_id"
        ]
      },
      "TextDetectionContentDetectors": {
        "type": "object",
        "description": "The detectors to use, these can be IBM provided `HAP` or `PII` detectors or a custom content detector.",
        "properties": {
          "hap": {
            "$ref": "#/components/schemas/TextDetectionHAPDetector"
          },
          "pii": {
            "$ref": "#/components/schemas/TextDetectionPIIDetector"
          },
          "topic_relevance": {
            "$ref": "#/components/schemas/TextDetectionTopicRelevanceDetector"
          },
          "prompt_safety_risk": {
            "$ref": "#/components/schemas/TextDetectionPromptSafetyRiskDetector"
          },
          "granite_guardian": {
            "$ref": "#/components/schemas/TextDetectionGGDetector"
          },
          "keyword": {
            "$ref": "#/components/schemas/TextDetectionKeywordDetector"
          },
          "regex": {
            "$ref": "#/components/schemas/TextDetectionRegexDetector"
          }
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/TextDetectionDetectors"
        }
      },
      "TextDetectionContextDetectors": {
        "type": "object",
        "description": "The detectors to use, `context_relevance` and `faithfulness` is supported. \n\n⚠️ **Deprecated Feature Warning**\n`granite_guardian` is deprecated and will be removed in the future releases.\n",
        "properties": {
          "granite_guardian": {
            "deprecated": true,
            "$ref": "#/components/schemas/TextDetectionContextGGDetector"
          },
          "context_relevance": {
            "$ref": "#/components/schemas/TextDetectionContextCRDetector"
          },
          "faithfulness": {
            "$ref": "#/components/schemas/TextDetectionContextFaithDetector"
          }
        }
      },
      "TextDetectionGeneratedDetectors": {
        "type": "object",
        "description": "The detectors to use, only `answer_relevance` is supported. \n\n⚠️ **Deprecated Feature Warning**\n`granite_guardian` is deprecated and will be removed in the future releases.\n",
        "properties": {
          "granite_guardian": {
            "deprecated": true,
            "$ref": "#/components/schemas/TextDetectionGeneratedGGDetector"
          },
          "answer_relevance": {
            "$ref": "#/components/schemas/TextDetectionGeneratedARDetector"
          }
        }
      },
      "TextDetectionChatDetectors": {
        "type": "object",
        "description": "The detectors to use, only granite_guardian is supported.",
        "properties": {
          "granite_guardian": {
            "$ref": "#/components/schemas/TextDetectionChatGGDetector"
          }
        }
      },
      "TextDetectionPropertyThreshold": {
        "type": "number",
        "format": "float",
        "description": "The threshold probability that this is a real match.\n",
        "minimum": 0,
        "maximum": 1,
        "default": 0.5
      },
      "TextDetectionPropertyContextCRMethod": {
        "type": "string",
        "description": "The method used to compute context relevance metric.\n\n**NOTE:** The method `context_relevance_model` is not available on cloud and is available only in on-prem version.\n",
        "enum": [
          "granite_guardian",
          "context_relevance_model"
        ]
      },
      "TextDetectionPropertyContextFaithMethod": {
        "type": "string",
        "description": "The method used to compute faithfulness (or groundedness) metric.\n\n**NOTE:** The method `faithfulness_model` is not available on cloud and is available only in on-prem version.\n",
        "enum": [
          "granite_guardian",
          "faithfulness_model"
        ]
      },
      "TextDetectionPropertyGeneratedARMethod": {
        "type": "string",
        "description": "The method used to compute answer_relevance metric. \n\n**NOTE:** The method `answer_relevance_model` is not available on cloud and is available only in on-prem version.\n",
        "enum": [
          "granite_guardian",
          "answer_relevance_model"
        ]
      },
      "TextDetectionPropertyRiskName": {
        "type": "string",
        "description": "(Optional) The specific Granite Guardian risk to evaluate. If not provided, defaults to \"harm\".\n  Valid values: [\"harm\", \"social_bias\", \"violence\", \"jailbreak\", \"profanity\", \"sexual_content\", \"unethical_behavior\"]\n",
        "enum": [
          "harm",
          "social_bias",
          "violence",
          "jailbreak",
          "profanity",
          "sexual_content",
          "unethical_behavior"
        ],
        "default": "harm"
      },
      "TextDetectionPropertyContextRiskName": {
        "type": "string",
        "description": "The specific Granite Guardian risk to evaluate. Valid values: [\"context_relevance\", \"groundedness\"]\n",
        "enum": [
          "context_relevance",
          "groundedness"
        ]
      },
      "TextDetectionPropertyGeneratedRiskName": {
        "type": "string",
        "description": "(Optional) The specific Granite Guardian risk to evaluate. If not provided, defaults to \"answer_relevance\".\n",
        "default": "answer_relevance"
      },
      "TextDetectionPropertyChatRiskName": {
        "type": "string",
        "description": "(Optional) The specific Granite Guardian risk to evaluate. If not provided, defaults to \"function_call\".\n",
        "default": "function_call"
      },
      "TextDetectionPropertyEnableTwoLevel": {
        "type": "boolean",
        "description": "Flag to enable two-level detection for prompt safety risks. If enabled, and the confidence scores from off-topic and prompt injection detectors fall below a threshold, Granite Guardian is invoked and its response is returned to the user.\n",
        "default": true
      },
      "TextDetectionPropertySystemPrompt": {
        "type": "string",
        "description": "The system prompt describing the AI use case, which serves as the basis for determining whether a user prompt is off-topic.\n",
        "example": "Imagine you are Granite Chat, a highly knowledgeable and professional banking assistant developed by IBM. Your primary role is to assist users with all banking-related queries. Your responses should be clear, concise, and easy to understand, ensuring users can quickly grasp banking concepts. You should be able to provide information on a wide range of banking topics. You must always maintain a friendly tone making users feel comfortable while interacting with you. You are a cautious assistant who carefully follows instructions, adheres to ethical guidelines, and promotes positive behaviour. You are helpful and harmless, always ensuring your responses align with IBM's responsible AI principles.You always respond to greetings (e.g., hi, hello, good morning, what's up) with: 'Hello! I am Granite Chat, created by IBM. How can I help you today?'. Please do not say anything else or initiate a conversation."
      },
      "TextDetectionPropertyCaseSensitive": {
        "type": "boolean",
        "description": "Specifies whether keyword matching is case-sensitive. If enabled, matches will be case-sensitive.\n",
        "default": false
      },
      "TextDetectionPropertyKeywordString": {
        "type": "array",
        "description": "List of keywords to match against the input text.\n",
        "items": {
          "type": "string"
        }
      },
      "TextDetectionPropertyRegexPatterns": {
        "type": "array",
        "description": "List of regex patterns to match against the input text.\n",
        "items": {
          "type": "string"
        }
      },
      "TextDetectionHAPDetector": {
        "type": "object",
        "description": "The definition of a `Hate and profanity` (HAP) text detector.\n",
        "properties": {
          "threshold": {
            "$ref": "#/components/schemas/TextDetectionPropertyThreshold"
          }
        },
        "additionalProperties": {}
      },
      "TextDetectionPromptSafetyRiskDetector": {
        "type": "object",
        "description": "The definition of two level prompt injection text detector.\n",
        "properties": {
          "system_prompt": {
            "$ref": "#/components/schemas/TextDetectionPropertySystemPrompt"
          },
          "enable_two_level_detection": {
            "$ref": "#/components/schemas/TextDetectionPropertyEnableTwoLevel"
          }
        },
        "required": [
          "system_prompt"
        ],
        "additionalProperties": {}
      },
      "TextDetectionPIIDetector": {
        "type": "object",
        "description": "The definition of a `Personal identifiable information` (PII) text detector.\n",
        "additionalProperties": {}
      },
      "TextDetectionGGDetector": {
        "type": "object",
        "description": "The definition of a `Granite Guardian` text detector.\n",
        "properties": {
          "threshold": {
            "$ref": "#/components/schemas/TextDetectionPropertyThreshold"
          },
          "risk_name": {
            "$ref": "#/components/schemas/TextDetectionPropertyRiskName"
          }
        },
        "additionalProperties": {}
      },
      "TextDetectionContextGGDetector": {
        "type": "object",
        "description": "The definition of a `Granite Guardian` text detector.\n",
        "properties": {
          "threshold": {
            "$ref": "#/components/schemas/TextDetectionPropertyThreshold"
          },
          "risk_name": {
            "$ref": "#/components/schemas/TextDetectionPropertyContextRiskName"
          }
        },
        "required": [
          "risk_name"
        ]
      },
      "TextDetectionContextCRDetector": {
        "type": "object",
        "description": "The definition of `context relevance` text detector.\n",
        "properties": {
          "threshold": {
            "$ref": "#/components/schemas/TextDetectionPropertyThreshold"
          },
          "method": {
            "$ref": "#/components/schemas/TextDetectionPropertyContextCRMethod"
          }
        }
      },
      "TextDetectionContextFaithDetector": {
        "type": "object",
        "description": "The definition of `faithfulness`(or `groundedness`) text detector.\n",
        "properties": {
          "threshold": {
            "$ref": "#/components/schemas/TextDetectionPropertyThreshold"
          },
          "method": {
            "$ref": "#/components/schemas/TextDetectionPropertyContextFaithMethod"
          }
        }
      },
      "TextDetectionGeneratedGGDetector": {
        "type": "object",
        "description": "The definition of a `Granite Guardian` text detector.\n",
        "properties": {
          "threshold": {
            "$ref": "#/components/schemas/TextDetectionPropertyThreshold"
          },
          "risk_name": {
            "$ref": "#/components/schemas/TextDetectionPropertyGeneratedRiskName"
          }
        }
      },
      "TextDetectionGeneratedARDetector": {
        "type": "object",
        "description": "The definition of `answer_relevance` text detector.\n",
        "properties": {
          "threshold": {
            "$ref": "#/components/schemas/TextDetectionPropertyThreshold"
          },
          "method": {
            "$ref": "#/components/schemas/TextDetectionPropertyGeneratedARMethod"
          }
        }
      },
      "TextDetectionChatGGDetector": {
        "type": "object",
        "description": "The definition of a `Granite Guardian` text detector.\n",
        "properties": {
          "threshold": {
            "$ref": "#/components/schemas/TextDetectionPropertyThreshold"
          },
          "risk_name": {
            "$ref": "#/components/schemas/TextDetectionPropertyChatRiskName"
          }
        }
      },
      "TextDetectionTopicRelevanceDetector": {
        "type": "object",
        "description": "The definition of a `topic relevance` (off_topic) text detector.\n",
        "properties": {
          "threshold": {
            "$ref": "#/components/schemas/TextDetectionPropertyThreshold"
          },
          "system_prompt": {
            "$ref": "#/components/schemas/TextDetectionPropertySystemPrompt"
          }
        },
        "required": [
          "system_prompt"
        ],
        "additionalProperties": {}
      },
      "TextDetectionKeywordDetector": {
        "type": "object",
        "description": "The definition of a `keyword` text detector.\n",
        "properties": {
          "case_sensitive": {
            "$ref": "#/components/schemas/TextDetectionPropertyCaseSensitive"
          },
          "keywords": {
            "$ref": "#/components/schemas/TextDetectionPropertyKeywordString"
          }
        },
        "required": [
          "keywords"
        ],
        "additionalProperties": {}
      },
      "TextDetectionRegexDetector": {
        "type": "object",
        "description": "The definition of a `regex` text detector.\n",
        "properties": {
          "regex_patterns": {
            "$ref": "#/components/schemas/TextDetectionPropertyRegexPatterns"
          }
        },
        "required": [
          "regex_patterns"
        ],
        "additionalProperties": {}
      },
      "TextDetectionDetectors": {
        "type": "object",
        "description": "The detectors to use, this is a map of `detector-name` with a map of optional key/value pairs.\n",
        "additionalProperties": {
          "$ref": "#/components/schemas/TextDetectionDetector"
        }
      },
      "TextDetectionDetector": {
        "type": "object",
        "description": "The optional key/value pairs for the detector.\n",
        "additionalProperties": {
          "type": "string"
        }
      },
      "TextDetectionContentResponse": {
        "type": "object",
        "description": "The response for text detection.\n",
        "properties": {
          "detections": {
            "type": "array",
            "description": "The text that was detected.\n",
            "items": {
              "$ref": "#/components/schemas/TextDetectionContentItem"
            },
            "minItems": 0
          }
        }
      },
      "TextDetectionContextPosition": {
        "type": "object",
        "description": "The text that was detected.\n",
        "properties": {
          "start": {
            "type": "integer",
            "description": "The position in the content where the detected text starts.\n"
          },
          "end": {
            "type": "integer",
            "description": "The position in the content where the detected text ends.\n"
          }
        },
        "required": [
          "start",
          "end"
        ]
      },
      "TextDetectionChildEvidence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TextDetectionEvidenceObject"
          },
          {
            "type": "object",
            "description": "Child evidence.\n",
            "properties": {
              "evidence": {
                "type": "array",
                "description": "The child evidence details.\n",
                "items": {
                  "$ref": "#/components/schemas/TextDetectionEvidenceObject"
                },
                "minItems": 0,
                "maxItems": 100
              }
            }
          }
        ]
      },
      "TextDetectionEvidenceObject": {
        "type": "object",
        "description": "The details for a given evidence.\n",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name for the evidence.\n"
          },
          "value": {
            "type": "string",
            "description": "The value for the evidence.\n"
          },
          "score": {
            "$ref": "#/components/schemas/TextDetectionScore"
          }
        },
        "required": [
          "name",
          "value",
          "score"
        ]
      },
      "TextDetectionEvidenceReference": {
        "type": "object",
        "description": "Detection evidence.",
        "properties": {
          "evidence": {
            "type": "array",
            "description": "The evidence details. Displayed only when using `context_relevance_model` or `faithfulness_model`",
            "items": {
              "$ref": "#/components/schemas/TextDetectionChildEvidence"
            },
            "minItems": 0,
            "maxItems": 100
          }
        }
      },
      "TextDetectionContextResponse": {
        "type": "object",
        "description": "The response for text context detection.",
        "properties": {
          "detections": {
            "type": "array",
            "description": "The text that was detected.",
            "items": {
              "$ref": "#/components/schemas/TextDetectionContextItem"
            },
            "minItems": 0
          }
        },
        "required": [
          "detections"
        ]
      },
      "TextDetectionContextItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TextDetectionDetectionItem"
          },
          {
            "$ref": "#/components/schemas/TextDetectionEvidenceReference"
          }
        ]
      },
      "TextDetectionContentItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TextDetectionDetectionItem"
          },
          {
            "$ref": "#/components/schemas/TextDetectionContextPosition"
          }
        ]
      },
      "ApiErrorTarget": {
        "type": "object",
        "description": "The target of the error.\n",
        "properties": {
          "type": {
            "description": "The type of the problematic field.\n",
            "type": "string",
            "enum": [
              "field",
              "parameter",
              "header"
            ]
          },
          "name": {
            "description": "The name of the problematic field.\n",
            "type": "string"
          }
        },
        "required": [
          "type",
          "name"
        ]
      },
      "ApiError": {
        "type": "object",
        "description": "An error message.\n",
        "properties": {
          "code": {
            "type": "string",
            "example": "missing_field",
            "description": "A simple code that should convey the general sense of the error.\n"
          },
          "message": {
            "type": "string",
            "example": "The 'name' field is required.",
            "description": "The message that describes the error.\n"
          },
          "target": {
            "$ref": "#/components/schemas/ApiErrorTarget"
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "ApiErrorResponse": {
        "type": "object",
        "description": "The data returned when an error is encountered.\n",
        "properties": {
          "trace": {
            "type": "string",
            "example": "3fd543d2-36e0-4f83-9be3-5c6dd498af4f",
            "description": "An identifier that can be used to trace the request.\n"
          },
          "errors": {
            "type": "array",
            "description": "The list of errors.\n",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        },
        "required": [
          "trace",
          "errors"
        ]
      },
      "UnauthorizedApiErrorResponse": {
        "type": "object",
        "description": "The data returned when an error is encountered.\n",
        "properties": {
          "trace": {
            "type": "string",
            "example": "3fd543d2-36e0-4f83-9be3-5c6dd498af4f",
            "description": "An identifier that can be used to trace the request.\n"
          },
          "status_code": {
            "type": "integer",
            "example": 401
          },
          "errors": {
            "type": "array",
            "description": "The list of errors.\n",
            "items": {
              "$ref": "#/components/schemas/UnauthorizedApiError"
            }
          }
        },
        "required": [
          "trace",
          "errors"
        ]
      },
      "UnauthorizedApiError": {
        "type": "object",
        "description": "An error message.\n",
        "properties": {
          "code": {
            "type": "string",
            "example": "authentication_token_not_valid",
            "description": "A simple code that should convey the general sense of the error.\n"
          },
          "message": {
            "type": "string",
            "example": "Failed to authenticate the request due to invalid token. Failed to parse and verify token",
            "description": "The message that describes the error.\n"
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "InternalServerErrorResponse": {
        "type": "object",
        "description": "The data returned when an error is encountered.\n",
        "properties": {
          "trace": {
            "type": "string",
            "example": "3fd543d2-36e0-4f83-9be3-5c6dd498af4f",
            "description": "An identifier that can be used to trace the request.\n"
          },
          "status_code": {
            "type": "integer",
            "example": 500
          },
          "errors": {
            "type": "array",
            "description": "The list of errors.\n",
            "items": {
              "$ref": "#/components/schemas/InternalServerError"
            }
          }
        },
        "required": [
          "trace",
          "errors"
        ]
      },
      "InternalServerError": {
        "type": "object",
        "description": "An error message.\n",
        "properties": {
          "code": {
            "type": "string",
            "example": "downstream_request_failed",
            "description": "A simple code that should convey the general sense of the error.\n"
          },
          "message": {
            "type": "string",
            "example": "Downstream Caikit request with Detector 'pii failed. <html><body><h1>502 Bad Gateway</h1>\\nThe server returned an invalid or incomplete response.\\n</body></html>\\n",
            "description": "The message that describes the error.\n"
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "CreateDetectorRequest": {
        "type": "object",
        "description": "Request body for creating a detector",
        "required": [
          "name",
          "url",
          "api_key",
          "direction"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Name of the detector"
          },
          "description": {
            "type": "string",
            "minLength": 0,
            "maxLength": 512,
            "description": "Description of the detector"
          },
          "url": {
            "type": "string",
            "format": "url",
            "description": "URL endpoint for the detector",
            "maxLength": 512
          },
          "api_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512,
            "description": "API key for authenticating with the detector endpoint"
          },
          "direction": {
            "type": "array",
            "description": "Direction(s) where the detector applies (input, output, or both)",
            "minItems": 1,
            "maxItems": 2,
            "items": {
              "type": "string",
              "enum": [
                "input",
                "output"
              ]
            }
          },
          "detector_properties": {
            "type": "array",
            "minItems": 0,
            "maxItems": 50,
            "description": "Configurable properties for the detector",
            "items": {
              "$ref": "#/components/schemas/DetectorProperty"
            }
          },
          "parameters": {
            "type": "array",
            "minItems": 0,
            "maxItems": 50,
            "description": "Parameters that can be passed to the detector",
            "items": {
              "$ref": "#/components/schemas/DetectorParameter"
            }
          }
        }
      },
      "Detector": {
        "type": "object",
        "description": "A detector (either built-in or custom)",
        "required": [
          "name",
          "actions",
          "detector_properties",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the detector (string for built-in, UUID for custom)",
            "example": "pii"
          },
          "inventory_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
            "minLength": 36,
            "maxLength": 36,
            "description": "CAMS inventory ID (only for custom detectors)"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Name of the detector",
            "example": "Personally Identifiable Information"
          },
          "description": {
            "type": "string",
            "minLength": 0,
            "maxLength": 1024,
            "description": "Description of what the detector does",
            "example": "Detects personally identifiable or sensitive information such as phone number, email address, age, major credit card numbers."
          },
          "url": {
            "type": "string",
            "format": "url",
            "description": "URL endpoint (only for custom detectors)",
            "maxLength": 512
          },
          "actions": {
            "type": "array",
            "minItems": 0,
            "maxItems": 100,
            "description": "List of supported actions",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50,
              "enum": [
                "block",
                "mask",
                "log"
              ]
            },
            "example": [
              "block",
              "mask"
            ]
          },
          "metadata": {
            "type": "object",
            "description": "Additional metadata (only for custom detectors)",
            "properties": {
              "secret_id": {
                "type": "string",
                "description": "Secret ID for authentication"
              }
            },
            "additionalProperties": {
              "type": "string",
              "minLength": 0,
              "maxLength": 1024
            }
          },
          "detector_properties": {
            "type": "array",
            "minItems": 0,
            "maxItems": 50,
            "description": "Configurable properties for the detector",
            "items": {
              "$ref": "#/components/schemas/DetectorProperty"
            }
          },
          "parameters": {
            "type": "array",
            "minItems": 0,
            "maxItems": 50,
            "description": "Parameters that can be passed to the detector (only for custom detectors)",
            "items": {
              "$ref": "#/components/schemas/DetectorParameter"
            }
          },
          "has_threshold": {
            "type": "boolean",
            "description": "Whether the detector has a threshold property (built-in detectors)",
            "example": false
          },
          "is_input": {
            "type": "boolean",
            "description": "Whether the detector can be applied to input text (built-in detectors)",
            "example": true
          },
          "is_output": {
            "type": "boolean",
            "description": "Whether the detector can be applied to output text (built-in detectors)",
            "example": true
          },
          "status": {
            "type": "object",
            "description": "Status information for the detector",
            "required": [
              "state"
            ],
            "properties": {
              "state": {
                "type": "string",
                "description": "Current state of the detector",
                "enum": [
                  "active",
                  "inactive"
                ],
                "example": "active"
              }
            }
          }
        }
      },
      "DetectorProperty": {
        "type": "object",
        "description": "A configurable property for a detector",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Name of the property"
          },
          "type": {
            "type": "string",
            "enum": [
              "number",
              "bool",
              "text"
            ],
            "description": "Data type of the property"
          },
          "min": {
            "type": "number",
            "format": "double",
            "description": "Minimum value (optional, for number type)"
          },
          "max": {
            "type": "number",
            "format": "double",
            "description": "Maximum value (optional, for number type)"
          },
          "default_value": {
            "description": "Default value for the property (optional, type depends on property type)",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ]
          }
        }
      },
      "DetectorParameter": {
        "type": "object",
        "description": "A parameter that can be passed to a detector",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Name of the parameter"
          },
          "is_optional": {
            "type": "boolean",
            "description": "Whether the parameter is optional"
          }
        }
      },
      "DetectorResponse": {
        "type": "object",
        "description": "Response wrapper for detector operations",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "entity": {
            "$ref": "#/components/schemas/Detector"
          },
          "metadata": {
            "type": "object",
            "description": "Metadata about the detector (empty for built-in detectors, populated for custom detectors)",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                "minLength": 36,
                "maxLength": 36,
                "description": "ID of the detector"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Creation timestamp"
              },
              "created_by": {
                "type": "string",
                "description": "User ID who created the detector"
              },
              "modified_at": {
                "type": "string",
                "format": "date-time",
                "description": "Last modification timestamp"
              },
              "modified_by": {
                "type": "string",
                "description": "User ID who last modified the detector"
              }
            }
          }
        }
      },
      "EnforceRequest": {
        "type": "object",
        "description": "Request body for enforcing a policy",
        "required": [
          "text",
          "direction",
          "detectors_properties"
        ],
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100000,
            "description": "The text content to be analyzed by the policy detectors",
            "example": "Please send the report to john.doe@example.com"
          },
          "direction": {
            "type": "string",
            "enum": [
              "input",
              "output"
            ],
            "description": "Direction of the text flow (input or output)",
            "example": "input"
          },
          "detectors": {
            "type": "array",
            "minItems": 0,
            "maxItems": 50,
            "description": "Optional list of specific detector names to run (if not provided, all policy detectors will run)",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "example": "pii-detector"
            },
            "example": [
              "pii-detector",
              "toxicity-detector"
            ]
          },
          "detectors_properties": {
            "type": "object",
            "description": "Optional properties for detectors, keyed by detector name",
            "additionalProperties": {
              "type": "object",
              "description": "Properties for a specific detector",
              "additionalProperties": true
            },
            "example": {
              "pii-detector": {
                "threshold": 0.8,
                "entity_types": [
                  "email",
                  "phone"
                ]
              }
            }
          }
        }
      },
      "ExecutionStatus": {
        "type": "object",
        "description": "Detailed status information about the execution",
        "required": [
          "overall",
          "summary",
          "details"
        ],
        "properties": {
          "overall": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50,
            "description": "Overall execution status",
            "example": "success"
          },
          "summary": {
            "$ref": "#/components/schemas/ExecutionStatusSummary"
          },
          "details": {
            "$ref": "#/components/schemas/ExecutionStatusDetails"
          }
        }
      },
      "ExecutionStatusSummary": {
        "type": "object",
        "description": "Summary of detector execution results",
        "required": [
          "total_detectors",
          "succeeded",
          "failed",
          "succeeded_without_retry",
          "succeeded_with_retry"
        ],
        "properties": {
          "total_detectors": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 1000,
            "description": "Total number of detectors executed",
            "example": 2
          },
          "succeeded": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 1000,
            "description": "Number of detectors that succeeded",
            "example": 2
          },
          "failed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 1000,
            "description": "Number of detectors that failed",
            "example": 0
          },
          "succeeded_without_retry": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 1000,
            "description": "Number of detectors that succeeded on first attempt",
            "example": 2
          },
          "succeeded_with_retry": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 1000,
            "description": "Number of detectors that succeeded after retry",
            "example": 0
          }
        }
      },
      "ExecutionStatusDetails": {
        "type": "object",
        "description": "Detailed information about detector execution",
        "required": [
          "failed_detectors",
          "succeeded_with_retry"
        ],
        "properties": {
          "failed_detectors": {
            "type": "array",
            "minItems": 0,
            "maxItems": 100,
            "description": "List of detector names that failed",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "example": "custom-detector"
            },
            "example": []
          },
          "succeeded_with_retry": {
            "type": "array",
            "minItems": 0,
            "maxItems": 100,
            "description": "List of detector names that succeeded after retry",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "example": "pii-detector"
            },
            "example": []
          }
        }
      },
      "EnforceResponseEntity": {
        "type": "object",
        "description": "Entity containing the enforcement results",
        "properties": {
          "text": {
            "type": "string",
            "minLength": 0,
            "maxLength": 100000,
            "description": "The processed text (may be modified if masking action was applied)",
            "example": "Please send the report to **********************"
          },
          "action": {
            "type": "string",
            "minLength": 0,
            "maxLength": 50,
            "description": "Action that was applied (e.g., \"block\", \"mask\", \"allow\")",
            "example": "mask"
          },
          "status": {
            "$ref": "#/components/schemas/ExecutionStatus"
          }
        }
      },
      "EnforceResponse": {
        "type": "object",
        "description": "Response wrapper for policy enforcement",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "entity": {
            "$ref": "#/components/schemas/EnforceResponseEntity"
          },
          "metadata": {
            "type": "object",
            "description": "Metadata about the enforcement",
            "required": [
              "id",
              "created_at"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                "minLength": 36,
                "maxLength": 36,
                "description": "Unique ID for this enforcement execution",
                "example": "e66b1da9-9d54-4edf-a103-21d17efffb8b"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the enforcement was executed",
                "example": "2025-12-16T12:01:19.561650Z"
              }
            }
          }
        }
      },
      "PolicyDetectorConfig": {
        "type": "object",
        "description": "Configuration for a detector in a policy",
        "required": [
          "detector",
          "action",
          "detector_properties"
        ],
        "properties": {
          "detector": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.-]+$",
            "minLength": 1,
            "maxLength": 256,
            "description": "Name of the detector to use",
            "example": "pii-detector"
          },
          "action": {
            "type": "string",
            "enum": [
              "block",
              "mask"
            ],
            "description": "Action to take when detector triggers",
            "example": "mask"
          },
          "detector_properties": {
            "type": "array",
            "minItems": 0,
            "maxItems": 50,
            "description": "Properties to configure the detector",
            "items": {
              "type": "object",
              "required": [
                "name",
                "value"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9_.-]+$",
                  "minLength": 1,
                  "maxLength": 256,
                  "description": "Name of the detector property",
                  "example": "threshold"
                },
                "value": {
                  "type": "string",
                  "pattern": "^.*$",
                  "minLength": 0,
                  "maxLength": 1024,
                  "description": "Value of the detector property",
                  "example": "0.8"
                }
              }
            },
            "example": [
              {
                "name": "threshold",
                "value": "0.8"
              },
              {
                "name": "entity_types",
                "value": "email,phone,ssn"
              }
            ]
          }
        }
      },
      "PolicyResponsePrototype": {
        "type": "object",
        "description": "Request body for creating or updating a policy",
        "required": [
          "name",
          "input",
          "output",
          "policy_status"
        ],
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9 _.-]+$",
            "minLength": 1,
            "maxLength": 256,
            "description": "Name of the policy",
            "example": "Content Safety Policy"
          },
          "description": {
            "type": "string",
            "pattern": "^.*$",
            "minLength": 0,
            "maxLength": 512,
            "description": "Description of the policy",
            "example": "Policy to detect and block harmful content in user inputs and model outputs"
          },
          "block_message": {
            "type": "string",
            "pattern": "^.*$",
            "minLength": 0,
            "maxLength": 512,
            "description": "Message to display when content is blocked",
            "example": "This content has been blocked due to policy violations"
          },
          "mask_character": {
            "type": "string",
            "pattern": "^.$",
            "minLength": 0,
            "maxLength": 1,
            "description": "Character to use for masking (e.g., \"*\")",
            "example": "*"
          },
          "input": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "Detector configurations for input direction",
            "items": {
              "$ref": "#/components/schemas/PolicyDetectorConfig"
            }
          },
          "output": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "Detector configurations for output direction",
            "items": {
              "$ref": "#/components/schemas/PolicyDetectorConfig"
            }
          },
          "policy_status": {
            "type": "string",
            "enum": [
              "publish",
              "draft"
            ],
            "description": "Status of the policy (publish for active, draft for inactive)",
            "example": "publish"
          },
          "tags": {
            "type": "array",
            "minItems": 0,
            "maxItems": 50,
            "description": "Tags for categorizing the policy",
            "items": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_.-]+$",
              "minLength": 1,
              "maxLength": 128,
              "example": "content-safety"
            },
            "example": [
              "content-safety",
              "production"
            ]
          }
        }
      },
      "PolicyEntity": {
        "type": "object",
        "description": "Policy entity containing all policy details",
        "required": [
          "inventory_id",
          "name",
          "input",
          "output",
          "policy_status",
          "tags",
          "status"
        ],
        "properties": {
          "inventory_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
            "minLength": 36,
            "maxLength": 36,
            "description": "CAMS inventory ID",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "name": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9 _.-]+$",
            "minLength": 1,
            "maxLength": 256,
            "description": "Name of the policy",
            "example": "Content Safety Policy"
          },
          "description": {
            "type": "string",
            "pattern": "^.*$",
            "minLength": 0,
            "maxLength": 512,
            "description": "Description of the policy",
            "example": "Policy to detect and block harmful content in user inputs and model outputs"
          },
          "block_message": {
            "type": "string",
            "pattern": "^.*$",
            "minLength": 0,
            "maxLength": 512,
            "description": "Message to display when content is blocked",
            "example": "This content has been blocked due to policy violations"
          },
          "mask_character": {
            "type": "string",
            "pattern": "^.$",
            "minLength": 0,
            "maxLength": 1,
            "description": "Character used for masking",
            "example": "*"
          },
          "input": {
            "type": "array",
            "minItems": 0,
            "maxItems": 100,
            "description": "Detector configurations for input direction",
            "items": {
              "$ref": "#/components/schemas/PolicyDetectorConfig"
            }
          },
          "output": {
            "type": "array",
            "minItems": 0,
            "maxItems": 100,
            "description": "Detector configurations for output direction",
            "items": {
              "$ref": "#/components/schemas/PolicyDetectorConfig"
            }
          },
          "policy_status": {
            "type": "string",
            "enum": [
              "publish",
              "draft"
            ],
            "description": "Status of the policy",
            "example": "publish"
          },
          "tags": {
            "type": "array",
            "minItems": 0,
            "maxItems": 50,
            "description": "Tags associated with the policy",
            "items": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_.-]+$",
              "minLength": 1,
              "maxLength": 128,
              "example": "content-safety"
            },
            "example": [
              "content-safety",
              "production"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$",
            "minLength": 20,
            "maxLength": 30,
            "description": "Timestamp when the policy was created",
            "example": "2025-12-11T07:25:25.858Z"
          },
          "modified_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$",
            "minLength": 20,
            "maxLength": 30,
            "description": "Timestamp when the policy was last modified",
            "example": "2025-12-11T07:25:25.858Z"
          },
          "status": {
            "$ref": "#/components/schemas/PolicyStatus"
          }
        }
      },
      "PolicyStatus": {
        "type": "object",
        "description": "Status information for the policy",
        "properties": {
          "state": {
            "type": "string",
            "pattern": "^[a-z_]+$",
            "minLength": 1,
            "maxLength": 50,
            "description": "Current state of the policy",
            "example": "active"
          }
        }
      },
      "PolicyMetadata": {
        "type": "object",
        "description": "Metadata about the policy",
        "required": [
          "id",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
            "minLength": 36,
            "maxLength": 36,
            "description": "Unique identifier for the policy",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$",
            "minLength": 20,
            "maxLength": 30,
            "description": "Creation timestamp",
            "example": "2025-12-11T07:25:25.858Z"
          },
          "modified_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$",
            "minLength": 20,
            "maxLength": 30,
            "description": "Last modification timestamp",
            "example": "2025-12-11T07:25:25.858Z"
          }
        }
      },
      "PolicyResponse": {
        "type": "object",
        "description": "Response wrapper for policy operations",
        "required": [
          "entity",
          "metadata"
        ],
        "properties": {
          "entity": {
            "$ref": "#/components/schemas/PolicyEntity"
          },
          "metadata": {
            "$ref": "#/components/schemas/PolicyMetadata"
          }
        }
      },
      "PolicyResponseCollection": {
        "type": "object",
        "description": "Response wrapper for list of policies",
        "required": [
          "policies"
        ],
        "properties": {
          "policies": {
            "type": "array",
            "minItems": 0,
            "maxItems": 1000,
            "description": "List of policies",
            "items": {
              "$ref": "#/components/schemas/PolicyResponse"
            }
          }
        }
      },
      "GuardrailsErrorResponse": {
        "type": "object",
        "description": "Error response structure for Guardrails Manager",
        "required": [
          "errors",
          "status_code"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "List of error details",
            "items": {
              "type": "object",
              "required": [
                "code",
                "message",
                "parameters"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "description": "Error code",
                  "example": "validation_error"
                },
                "message": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1024,
                  "description": "Human-readable error message",
                  "example": "Validation failed on field 'url' with value '' for condition 'required' and param ''"
                },
                "parameters": {
                  "type": "array",
                  "minItems": 0,
                  "maxItems": 10,
                  "description": "Additional parameters related to the error",
                  "items": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "trace": {
            "type": "string",
            "minLength": 0,
            "maxLength": 256,
            "description": "Trace ID for debugging",
            "example": "abc123-def456-ghi789"
          },
          "status_code": {
            "type": "integer",
            "format": "int32",
            "minimum": 100,
            "maximum": 599,
            "description": "HTTP status code",
            "example": 400
          }
        }
      }
    }
  }
}