IBM Cloud API Docs

Introduction

IBM Watson OpenScale 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.

For details about using IBM Watson OpenScale, see the docs.

Authentication

You 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.

IAM authentication. Replace {token} with the bearer token returned by the IAM authentication service.

curl -X GET --header "Authorization: Bearer {Token}" "https://api.aiopenscale.cloud.ibm.com/<SERVICE_INSTANCE_ID>/v2/data_marts"

Security scheme

Authentication to this API's methods uses one of the following security schemes.

IAM

Value
  • API Key
  • Authorization
  • Header

ICP4D

Value
  • API Key
  • Authorization
  • Header

Versioning

API 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 way, we release a new version date.

Send 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.

This documentation describes the current version of IBM Watson OpenScale, 2021-02-10. In some cases, differences in earlier versions are noted in the descriptions of parameters and response models.

Error handling

The IBM Watson OpenScale 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.

ErrorResponse

Name Description
code
integer
HTTP error code.
error
string
Human-readable error string, like 'Invalid image file'.

ErrorAuthentication

Name Description
status
string
The status of error.
statusInfo
string
Information about the error.

ErrorHTML

Name Description
Error
string
HTML description of the error.

ErrorInfo

Information about what might have caused a failure, such as an image that is too large. Not returned when there is no error.

Name Description
code
integer
HTTP error code.
description
string
Human-readable error description. For example, File size limit exceeded.
error_id
string
Codified error string. For example, limit_exceeded.

Methods

Create a new data mart

Create a new data mart with the given database connection

POST /v2/data_marts

Request

Query Parameters

  • force update of metadata and db credentials (assumption is that the new database is already prepared and populated)

  • curl -X 'POST' 'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_marts?force=false&project_id={project_id}&space_id={space_id}' -H 'accept: application/json' -H 'Authorization: Bearer {Token}' -H 'Content-Type: application/json' -d '{
    "name": "string",
    "description": "string",
    "service_instance_crn": "string",
    "internal_database": false,
    "database_configuration": {
      "database_type": "postgresql",
      "name": "string",
      "instance_id": "string",
      "credentials": {
        "hostname": "aaa.bbb.ccc.ddd",
        "username": "xxxxxxxx",
        "password": "yyyyyyyy", # pragma: allowlist secret
        "db": "SAMPLE",
        "port": 50000,
        "ssl": false
      },
      "location": {
        "schema_name": "string"
      }
    },
    "database_discovery": "automatic"
    }'

Response

Status Code

  • response

  • Too many requests for internal database. Please try again in a while.

Example responses
  • Created DataMart successfully

    {
      "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"
                ]
              }
            ]
          }
        }
      }
    }
  • Too many requests for internal database. Please try again in a while.

    {
      "trace": "string",
      "errors": [
        {
          "code": "AISUT0002E",
          "message": "string",
          "parameters": [
            "string"
          ]
        }
      ]
    }

List all data marts

The method returns the data mart configurations as an object.

GET /v2/data_marts

Request

No Request Parameters

This method does not accept any request parameters.

  • curl -X 'GET' 'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_marts?project_id={project_id}&space_id={space_id}' -H 'accept: application/json' -H 'Authorization: Bearer {Token}'

Response

Status Code

  • response

Example responses
  • Listing all the data marts

    {
      "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"
                    ]
                  }
                ]
              }
            }
          }
        }
      ]
    }

Get data mart with the given id

GET /v2/data_marts/{data_mart_id}

Request

Path Parameters

  • ID of the data mart

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: dad3ed3f-db8d-4b35-b59e-7acad5348a3a

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET' 'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_marts/{data_mart_id}?project_id={project_id}&space_id={space_id}' -H 'accept: application/json' -H 'Authorization: Bearer {Token}'

Response

Status Code

  • response

Example responses
  • Showing data mart for the given data_mart id

    {
      "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"
                ]
              }
            ]
          }
        }
      }
    }

Update a data mart

PATCH /v2/data_marts/{data_mart_id}

Request

Path Parameters

  • ID of the data mart

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: dad3ed3f-db8d-4b35-b59e-7acad5348a3a

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

  • curl -X 'PATCH'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_marts/{data_mart_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: Bearer {Token}'   -H 'Content-Type: application/json-patch+json'   -d '[
      {
        "op": "add",
        "path": "string",
        "value": {},
        "from": "string"
      }
    ]'

Response

Status Code

  • Data Marts updated successfully

Example responses
  • Data Marts updated successfully

    {
      "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"
                ]
              }
            ]
          }
        }
      }
    }

Delete a data mart

DELETE /v2/data_marts/{data_mart_id}

Request

Path Parameters

  • ID of the data mart

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: dad3ed3f-db8d-4b35-b59e-7acad5348a3a

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Force hard delete

  • curl -X 'DELETE'   '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}'   -H 'accept: application/json'   -H 'Authorization: Bearer {Token}'

Response

Status Code

  • Accepted

Example responses

List service providers

List associated Machine Learning service instances

GET /v2/service_providers

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • show also resources pending delete

  • Type of service

  • comma-separated list of IDs

  • comma-separated list of IDs

  • comma-separated list of IDs

  • comma-separated list of IDs

  • curl -X 'GET' '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}' -H 'accept: application/json' -H 'Authorization: Bearer {Token}'

Response

Status Code

  • response

Example responses
  • Listing all service providers.

    {
      "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"
                    ]
                  }
                ]
              }
            }
          }
        }
      ]
    }

Add service provider

Associate external Machine Learning service instance with the OpenScale DataMart

POST /v2/service_providers

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/service_providers?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: Bearer {Token}'   -H 'Content-Type: application/json'   -d '{
      "name": "wml-production-o09",
      "description": "string",
      "service_type": "watson_machine_learning",
      "credentials": {
        "instance_id": "<instance_id>",
        "apikey": "<API_KEY>", # pragma: allowlist secret
        "username": "some_user",
        "password": "passwd", # pragma: allowlist secret
        "url": "https://us-south.wml.cloud.ibm.com"
      },
      "request_headers": {
        "additionalProp1": {}
      },
      "operational_space_id": "string",
      "deployment_space_id": "string",
      "integrated_project_id": "string",
      "group_ids": [
        "10000",
        "10001"
      ],
      "user_ids": [
        "1000330999",
        "1000331301"
      ]
    }'

Response

Status Code

  • response

Example responses
  • Service provider added successfully

    {
      "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"
                ]
              }
            ]
          }
        }
      }
    }

Get a specific service provider

Get the associated Machine Learning service provider details

GET /v2/service_providers/{service_provider_id}

Request

Path Parameters

  • ID of the ML service provider

    Example: 446bae08-6ca9-459e-bf6b-fece996cc173

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/service_providers/{service_provider_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: Bearer {Token}'

Response

Status Code

  • response

Example responses
  • Getting specific service provider

    {
      "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"
                ]
              }
            ]
          }
        }
      }
    }

Delete a service provider

Detach Machine Learning service provider

DELETE /v2/service_providers/{service_provider_id}

Request

Path Parameters

  • ID of the ML service provider

    Example: 446bae08-6ca9-459e-bf6b-fece996cc173

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Force hard delete

  • curl -X 'DELETE' '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}' -H 'accept: application/json' -H 'Authorization: Bearer {Token}'

Response

Status Code

  • Accepted

Example responses

Update a service provider

Update existing service provider

PATCH /v2/service_providers/{service_provider_id}

Request

Path Parameters

  • ID of the ML service provider

    Example: 446bae08-6ca9-459e-bf6b-fece996cc173

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

  • curl -X 'PATCH' 'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/service_providers/{service_provider_id}?project_id={project_id}&space_id={space_id}' -H 'accept: application/json' -H 'Authorization: Bearer {Token}' -H 'Content-Type: application/json' -d '[
    {
      "op": "add",
      "path": "string",
      "value": {},
      "from": "string"
    }
    ]'

Response

Status Code

  • response

Example responses
  • service provider successfully updated

    [
      {
        "op": "replace",
        "path": "/name",
        "value": "NewObjectName"
      }
    ]

List subscriptions

List subscriptions

GET /v2/subscriptions

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • comma-separated list of IDs

  • comma-separated list of IDs

  • comma-separated list of IDs

  • comma-separated list of types

  • comma-separated list of IDs

  • comma-separated list of IDs

  • comma-separated list of types

  • comma-separated list of IDs

  • comma-separated list of IDs

  • comma-separated list of states

  • comma-separated list of operational space ids (property of service provider object)

  • comma-separated list of deployment space ids (property of service provider object)

  • comma-separated list of integrated project ids (property of service provider object)

  • comma-separated list of IDs

  • curl -X 'GET' '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}' -H 'accept: application/json' -H 'Authorization: Bearer {Token}'

Response

Status Code

  • response

Example responses
  • Listing all subscriptions

    {
      "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"
                    ]
                  }
                ]
              }
            }
          }
        }
      ]
    }

Add a new subscription

Add a new subscription to the model deployment

POST /v2/subscriptions

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: Bearer {Token}'   -H 'Content-Type: application/json'   -d '{
      "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"
      },
      "asset_properties": {
        "training_data_reference": {
          "type": "file_asset"
        },
        "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", # pragma: allowlist secret
        "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"
          }
        }
      },
      "risk_evaluation_status": {
        "state": "pending_evaluation",
        "comment": "string",
        "evaluated_by": "string",
        "evaluated_at": "string"
      },
      "analytics_engine": {
        "type": "string",
        "integrated_system_id": "string",
        "credentials": {}, # pragma: allowlist secret
        "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"
                  ]
                }
              ]
            }
          }
        }
      ]
    }'

Response

Status Code

  • response

Example responses
  • Successfully added a new 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-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"
                ]
              }
            ]
          }
        }
      }
    }

Get a specific subscription

Get a specific subscription

GET /v2/subscriptions/{subscription_id}

Request

Path Parameters

  • Unique subscription ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET' 'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}?project_id={project_id}&space_id={space_id}' -H 'accept: application/json' -H 'Authorization: Bearer {Token}'

Response

Status Code

  • response

Example responses
  • Getting a specific subscription details

    {
      "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"
                ]
              }
            ]
          }
        }
      }
    }

Update a subscription

Update existing asset (from ML service instance) subscription

PATCH /v2/subscriptions/{subscription_id}

Request

Path Parameters

  • Unique subscription ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

  • curl -X 'PATCH'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: Bearer {Token}'   -H 'Content-Type: application/json'   -d '[
      {
        "op": "add",
        "path": "string",
        "value": {},
        "from": "string"
      }
    ]'

Response

Status Code

  • response

Example responses
  • subscription is updated successfully

    [
      {
        "op": "replace",
        "path": "/name",
        "value": "NewObjectName"
      }
    ]

Delete a subscription

Delete a subscription

DELETE /v2/subscriptions/{subscription_id}

Request

Path Parameters

  • Unique subscription ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Force hard delete. All data for records and metrics associated to the subscription will be deleted.

  • curl -X 'DELETE' 'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}?force=false&project_id={project_id}&space_id={space_id}' -H 'accept: application/json' -H 'Authorization: Bearer {Token}'

Response

Status Code

  • Stops monitoring of an asset and deletes all collected observations

No Sample Response

This method does not specify any sample responses.

Derive model schemas from the training data.

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.

POST /v2/subscriptions/{subscription_id}/schemas

Request

Path Parameters

  • Unique subscription ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

Schema inference request - either input_data or training_data_reference must be provided

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/schemas?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: Bearer {Token}'   -H 'Content-Type: application/json'   -d '{
      "input_data": [
        {
          "fields": [
            "age",
            "profession"
          ],
          "values": [
            [
              "28",
              "engineer"
            ],
            [
              "33",
              "teacher"
            ]
          ]
        }
      ],
      "training_data_reference": {
        "type": "file_asset"
      }
    }'

Response

Schema inference response

Status Code

  • Schemas created successfully

Example responses
  • Schemas created successfully

    {
      "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"
                  ]
                }
              ]
            }
          }
        }
      }
    }

Create a table for specified data set type

Current supported dataset_type is feedback. The body of request should be json object (an empty object {} is fine).

POST /v2/subscriptions/{subscription_id}/tables/{dataset_type}

Request

Path Parameters

  • Unique subscription ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

  • data set type of subscription

    Allowable values: [feedback]

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

Example: {}

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/tables/feedback?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: Bearer {Token}'   -H 'Content-Type: application/json'   -d '{}'

Response

Status Code

  • Creating dataset table is posted successfully.

Example responses
  • Creating dataset table is posted successfully.

    {
      "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"
      }
    }

getConfigurationSynchrozation

Get status of triggered configuration synchronization

GET /v2/subscriptions/{subscription_id}/configuration_synchronization

Request

Path Parameters

  • Unique subscription ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/configuration_synchronization'   -H 'accept: application/json'   -H 'Authorization: Bearer {Token}'

Response

Status Code

  • Get current status of config synchronization

Example responses
  • Get current status of config synchronization

    {
      "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"
            }
          }
        }
      ]
    }

Trigger configuration synchronization from pre-production to production model

Trigger configuration synchronization based on pre_production_reference_id in subscription.

PUT /v2/subscriptions/{subscription_id}/configuration_synchronization

Request

Path Parameters

  • Unique subscription ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

Query Parameters

  • a flag to synchronize forcely

    Default: false

monitor definition id to be excluded from configuration synchronization should be passed as array

Examples:
{
  "exclude_monitors": [
    "fairness",
    "quality"
  ]
}
  • curl -X 'PUT'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/configuration_synchronization?force=false'   -H 'accept: application/json'   -H 'Authorization: Bearer {Token}'   -H 'Content-Type: application/json'   -d '{
      "exclude_monitors": [
        "fairness",
        "quality"
      ]
    }'

Response

Status Code

  • Triggered to synchronize configuration.

Example responses
  • Triggered to synchronize configuration Successful.

    {
      "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"
            }
          }
        }
      ]
    }

Computes the bias mitigation/remediation for the specified model

Computes the bias mitigation/remediation for the specified model. The fairness monitoring debias request payload details must be valid.

POST /v2/subscriptions/{subscription_id}/predictions

Request

Path Parameters

  • Unique subscription ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'POST'     'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/predictions?project_id={project_id}&space_id={space_id}'     -H 'accept: application/json'     -H 'Authorization: Bearer {Token}'     -H 'Content-Type: application/json'     -d '{
        "fields": [
          "name",
          "age",
          "position"
        ],
        "values": [
          [
            "john",
            33,
            "engineer"
          ]
        ]
      }'

Response

Status Code

  • Accepted

Example responses
  • Accepted

    {
      "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"
        ]
      ]
    }

List all data sets specified by the parameters

GET /v2/data_sets

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • ID of the data set target (e.g. subscription ID.. )

  • type of the target

    Allowable values: [subscription,instance,data_mart,project,space]

  • type of the data set

    Allowable values: [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]

  • ID of the managing entity (e.g. data mart id)

  • curl -X 'GET' '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}' -H 'accept: application/json'

Response

Status Code

  • response

Example responses
  • Listing all data sets

    {
      "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"
                    ]
                  }
                ]
              }
            }
          }
        }
      ]
    }

Create a new data set

Create a new data set

POST /v2/data_sets

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Content-Type: application/json'   -d '{
      "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"
    }'

Response

Status Code

  • response

Example responses
  • Successfully created new data set

    {
      "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"
                    ]
                  }
                ]
              }
            }
          }
        }
      ]
    }

Get data set with the given id

GET /v2/data_sets/{data_set_id}

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'

Response

Status Code

  • response

Example responses
  • Listing data set for given id

    {
      "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"
                ]
              }
            ]
          }
        }
      }
    }

Delete a data set

DELETE /v2/data_sets/{data_set_id}

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Force hard delete. Table associated with the data set will be dropped.

  • curl -X 'DELETE' '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}' -H 'accept: application/json'

Response

Status Code

  • Accepted

Example responses

Update a data set

Update the data set

PATCH /v2/data_sets/{data_set_id}

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

  • curl -X 'PATCH'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Content-Type: application/json'   -d '[
      {
        "op": "add",
        "path": "string",
        "value": {},
        "from": "string"
      }
    ]'

Response

Status Code

  • response

Example responses
  • Dataset updated successfully

    {
      "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"
                ]
              }
            ]
          }
        }
      }
    }

Add new data set records

Add new data set records

POST /v2/data_sets/{data_set_id}/records

Request

Custom Headers

  • Allowable values: [application/json,text/csv,multipart/form-data]

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • if not provided service will attempt to automatically detect header in the first line

  • skip number of rows from input

  • limit for number of processed input rows

  • delimiter character for data provided as csv

  • expected behaviour on error

    Allowable values: [stop,continue]

  • maximum length of single line in bytes (default 10MB)

Examples:

dict format

[
  {
    "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 format

[
  {
    "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"
      ]
    ]
  }
]

Native scoring payload format (e.g. WML)

[
  {
    "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
          ]
        ]
      ]
    }
  }
]
  • curl -X 'POST'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '[
      {
        "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"
          ]
        ]
      }
    ]'

Response

Status Code

  • response

Example responses
  • New data_set added successfully

    {
      "state": "preparing",
      "deleted_at": "string",
      "failure": {
        "trace": "string",
        "errors": [
          {
            "code": "AISUT0002E",
            "message": "string",
            "parameters": [
              "string"
            ]
          }
        ]
      }
    }

List data set records

List data set records

GET /v2/data_sets/{data_set_id}/records

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • return records with timestamp greater then or equal to start parameter

    Example: 2018-01-01T00:00:00Z

  • return records with timestamp lower then end parameter

    Example: 2018-01-31T00:00:00Z

  • limit for number of returned records. If the value is greater than 1000 than it will be truncated.

    Default: 100

  • offset of returned records

  • return records with only specified columns. Parameter must be specified as comma separated string.

    Example: AGE,GENDER

  • return record annotations with given names

    Examples:
    [
      "annotation1",
      "annotation2"
    ]
  • If there is no need to fetch annotations at all, set this parameter as true. There should be better performance.

    Allowable values: [true,false]

    Default: false

  • Only return records that match given filters. There are two types of filters, separated by commas:

    • normal filter (multiple are possible), {field_name}:{op}:{value} — filter records directly
    • joining filter (only a single one is possible), {data_set_id}.{field_name}:{op}:{value} — join a data set by transaction_id (the user must ensure it's provided!) and filter by this data set's records' field. Will fail if the user hasn't provided transaction_id for both data sets' records. Filters of different types can be mixed. They are partly compatible with the ones in POST /v2/data_sets/{data_set_id}/distributions.

    Available operators: | op | meaning | example | code equivalent | |:----:|:---------------------------:|:------------------:|:------------------------:| | eq | equality | field:eq:value | field == value | | gt | greater than | field:gt:value | field > value | | gte | greater or equal | field:gte:value | field >= value | | lt | less than | field:lt:value | field < value | | lte | less or equal | field:lte:value | field <= value | | like | matching a simple pattern* | field:like:pattern | pattern.match(field) | | in | is contained in list | field:in:a;b;c | [a,b,c].contains(field) | | null | is null | field:null | field value == null | | nonnull | is not null | field:nonnull | field value != null |

      • "%" means "one or more character", "_" means "any single character", other characters have their usual, literal meaning (e.g. "|" means character "|")
    Examples:

    Multiple normal filters

    age:gte:18,gender:eq:female

    A single joined filter

    c06d3756-1f43-4ea1-9727-2085ae3ff21d.channel:eq:facebook

    A mix of normal filters and a joined filter

    age:ge:20,age:ls:30,c06d3756-1f43-4ea1-9727-2085ae3ff21d.channel:eq:facebook,age:gte:20,age:ls:30
  • If total_count should be included. It can have performance impact if total_count is calculated.

  • return records in order specified. There are two patterns. The first is random sampling, the other is sorting per column.

    Examples:

    records are randomly picked from given filter. You have to use one of start, end, or filter param with order=random.

    random

    <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.

    AGE:desc,GENDER:asc
  • 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.

    Example: 0.51

  • What JSON format to use on output.

    Allowable values: [dict,list]

    Default: dict

  • 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.

    Allowable values: [reference]

  • curl -X 'GET' '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}' -H 'accept: application/json'

Response

dict format

Status Code

  • response

Example responses
  • {
      "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
              }
            }
          }
        }
      ]
    }
  • {
      "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
              }
            }
          ]
        }
      ]
    }

Update data set records

Update data set records

PATCH /v2/data_sets/{data_set_id}/records

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

Examples:

Patch records values

[
  {
    "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
  }
]

Add records annotations

[
  {
    "op": "add",
    "path": "/records/0039f1ad-4b87-420f-ab24-34943f7b3d41/annotations/biased",
    "value": [
      {
        "fairness_probability": 0.5,
        "fairness_prediction": "Age"
      }
    ]
  }
]
  • curl -X 'PATCH'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/records?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Content-Type: application/json'   -d '[
      {
        "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
      }
    ]'

Response

Status Code

  • response

Example responses
  • Dataset successfully updated

    {
      "state": "preparing",
      "deleted_at": "string",
      "failure": {
        "trace": "string",
        "errors": [
          {
            "code": "AISUT0002E",
            "message": "string",
            "parameters": [
              "string"
            ]
          }
        ]
      }
    }

Get a specific data set record with the given id

Get a specific record in a data set

GET /v2/data_sets/{data_set_id}/records/{record_id}

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

  • ID of the record

    Example: 4165a2fb-3b57-4b19-8a2b-037b9b0f7b08

Query Parameters

  • 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.

    Allowable values: [reference]

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET' '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}' -H 'accept: application/json'

Response

Status Code

  • response

Example responses
  • Listing the specific record in a data set

    {
      "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
          }
        }
      }
    }

Update a specific record in a data set

Update a specific record in a data set

PATCH /v2/data_sets/{data_set_id}/records/{record_id}

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

  • ID of the record

    Example: 4165a2fb-3b57-4b19-8a2b-037b9b0f7b08

Query Parameters

  • 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.

    Allowable values: [reference]

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

Examples:

Add record(s) annotations

[
  {
    "op": "add",
    "path": "/annotations/biased",
    "value": {
      "fairness_score": 0.62
    }
  }
]
  • curl -X 'PATCH'   '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}'   -H 'accept: application/json'   -H 'Content-Type: application/json'   -d '[
      {
        "op": "add",
        "path": "/annotations/biased",
        "value": {
          "fairness_score": 0.62
        }
      }
    ]'

Response

Status Code

  • response

Example responses
  • Successfully updated data set for specific record

    {
      "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
          }
        }
      }
    }

Get value of a field in a given record

Get value of a field in a given record

GET /v2/data_sets/{data_set_id}/records/{record_id}/{field_name}

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

  • ID of the record

    Example: 4165a2fb-3b57-4b19-8a2b-037b9b0f7b08

  • field_name should map to db column name which value is to be retrieved

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET' '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}' -H 'accept: application/json'

Response

Status Code

  • 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}

  • if either record_id or field_name is invalid

Example responses

Get data set records using record_id or transaction_id

Get data set records with specific record_id or transaction_id

GET /v2/data_set_records

Request

Query Parameters

  • a (single) data set type

    Allowable values: [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]

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • one or more record id values that should be matched

  • one or more transaction id values that should be matched

  • beginning of the time range

  • end of the time range

  • offset of returned explanations

  • Maximum number of elements returned

    Possible values: 1 ≤ value ≤ 1000

    Default: 100

  • curl -X 'GET' '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}' -H 'accept: application/json'

Response

Status Code

  • response

Example responses
  • {
      "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
                }
              }
            }
          ]
        }
      ]
    }

Get status of a specific request

Get status of a specific request

GET /v2/data_sets/{data_set_id}/requests/{request_id}

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

  • ID of the request

    Example: 77593143-15e8-443a-9e30-fe927aaa9d5d

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • response

Example responses
  • Status of a specific request

    {
      "state": "preparing",
      "deleted_at": "string",
      "failure": {
        "trace": "string",
        "errors": [
          {
            "code": "AISUT0002E",
            "message": "string",
            "parameters": [
              "string"
            ]
          }
        ]
      }
    }

add new data distributions

add new data distributions

POST /v2/data_sets/{data_set_id}/distributions

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • force columns data refresh

    Default: false

Data distribution creation request

  • curl -X 'POST'    '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}'    -H 'accept: application/json'    -H 'Authorization: {Bearer token}'    -H 'Content-Type: application/json'    -d '{
       "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
     }'

Response

Data distribution details response

Status Code

  • response

Example responses
  • New data distributions added

    {
      "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"
          ]
        }
      }
    }

Delete data distributions

Delete data distribution

DELETE /v2/data_sets/{data_set_id}/distributions

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'DELETE' 'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/data_sets/{data_set_id}/distributions?project_id={project_id}&space_id={space_id}' -H 'accept: application/json' -H 'Authorization: {Bearer token}'

Response

Status Code

  • Deleted

Example responses

Get a specific data distribution

Get a specific data distribution

GET /v2/data_sets/{data_set_id}/distributions/{data_distribution_id}

Request

Path Parameters

  • ID of the data set

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 59e92703-febe-4eda-abfa-09261c48f3dd

  • ID of the data distribution requested to be calculated

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Data distribution details response

Status Code

  • response

Example responses
  • Get a specific data distribution

    {
      "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
            ]
          ]
        }
      }
    }

List available monitors

List available monitors

GET /v2/monitor_definitions

Request

Query Parameters

  • comma-separated list of names

  • 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.

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions?name={name}&type={type}&project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • response

Example responses
  • Listing all available monitors

    {
      "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"
            }
          }
        }
      ]
    }

Add custom monitor

Add custom monitor

POST /v2/monitor_definitions

Request

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
      "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": {}
      },
      "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"
      }
    }'

Response

Status Code

  • response

Example responses
  • Monitor is created successfully

    {
      "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"
      }
    }

Get a specific monitor definition

Get a specific monitor definition

GET /v2/monitor_definitions/{monitor_definition_id}

Request

Path Parameters

  • Unique monitor definition ID

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression [a-z0-9_\-]+

    Example: quality

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET' 'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions/{monitor_definition_id}?project_id={project_id}&space_id={space_id}' -H 'accept: application/json' -H 'Authorization: {Bearer token}'

Response

Status Code

  • response

Example responses
  • Getting a specific monitor definition successful

    {
      "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"
        }
      }
    }

Update the monitor definition

Update a monitor definition

PUT /v2/monitor_definitions/{monitor_definition_id}

Request

Path Parameters

  • Unique monitor definition ID

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression [a-z0-9_\-]+

    Example: quality

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'PUT'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions/{monitor_definition_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
      "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": {}
      },
      "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"
      }
    }'

Response

Status Code

  • response

Example responses
  • Monitor definition is updated successfully

    {
      "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"
      }
    }

Update a monitor definition

Update a monitor definition

PATCH /v2/monitor_definitions/{monitor_definition_id}

Request

Path Parameters

  • Unique monitor definition ID

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression [a-z0-9_\-]+

    Example: quality

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

  • curl -X 'PATCH'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions/{monitor_definition_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json-patch+json'   -d '[
      {
        "op": "add",
        "path": "string",
        "value": {},
        "from": "string"
      }
    ]'

Response

Status Code

  • Monitor updated successfully

Example responses
  • Monitor updated successfully

    [
      {
        "op": "replace",
        "path": "/name",
        "value": "NewObjectName"
      }
    ]

Delete a monitor definition

Delete a monitor definition, backing up table specific to monitor

DELETE /v2/monitor_definitions/{monitor_definition_id}

Request

Path Parameters

  • Unique monitor definition ID

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression [a-z0-9_\-]+

    Example: quality

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Force hard delete. Table specific to this monitor will be dropped from data mart.

  • curl -X 'DELETE'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Removes the Custom Monitor

Example responses

List monitor instances

List monitor instances

GET /v2/monitor_instances

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • comma-separated list of IDs

  • comma-separated list of IDs

  • comma-separated list of IDs

  • comma-separated list of types

  • curl -X 'GET'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Monitor instances listed successfully

Example responses
  • Monitor instances listed successfully

    {
      "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"
          }
        }
      ]
    }

Create a new monitor instance

Create a new monitor instance

POST /v2/monitor_instances

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • prevent schedule creation for this monitor instance

    Default: false

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances?skip_scheduler=false&project_id={project_id}&space_id={space_id}'   -H 'accept: '   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
      "data_mart_id": "dad3ed3f-db8d-4b35-b59e-7acad5348a3a",
      "monitor_definition_id": "quality",
      "target": {
        "target_type": "subscription",
        "target_id": "4b133ea1-3097-4175-82a1-4fd80759de26"
      },
      "parameters": {
        "monitorParam1": "value1",
        "monitorParam2": 2,
        "monitorParam3": {
          "field1": "fieldvalue1"
        },
        "monitorParam4": [
          "elem1",
          "elem2"
        ]
      },
      "thresholds": [
        {
          "metric_id": "string",
          "type": "lower_limit",
          "value": 0,
          "specific_values": [
            {
              "value": 0,
              "applies_to": [
                {
                  "type": "tag",
                  "key": "string",
                  "value": "string"
                }
              ]
            }
          ]
        }
      ],
      "schedule": {
        "repeat_interval": 1,
        "repeat_unit": "hour",
        "repeat_type": "hour"
      },
      "schedule_id": "string",
      "managed_by": "string",
      "unprocessed_records": {
        "count": 0,
        "type": "payload_logging",
        "timestamp": "2025-01-13T15:15:12.799Z",
        "failure": {
          "trace": "string",
          "errors": [
            {
              "code": "AISUT0002E",
              "message": "string",
              "parameters": [
                "string"
              ]
            }
          ]
        }
      },
      "total_records": {
        "count": 0,
        "type": "payload_logging",
        "timestamp": "2025-01-13T15:15:12.799Z",
        "failure": {
          "trace": "string",
          "errors": [
            {
              "code": "AISUT0002E",
              "message": "string",
              "parameters": [
                "string"
              ]
            }
          ]
        },
        "value": "string"
      }
    }'

Response

Status Code

  • Monitoring enabled successfully

  • Monitoring configuration started

Example responses
  • Monitoring configuration started

    {
      "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"
      }
    }

Get monitor instance details

Get monitor instance details

GET /v2/monitor_instances/{monitor_instance_id}

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • comma-separated list of fields (supported fields are unprocessed_records and total_records)

  • curl -X 'GET'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Monitoring details retrieved successfully

Example responses
  • Monitoring details retrieved successfully

    {
      "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"
      }
    }

Update a monitor instance

Update a monitor instance

PATCH /v2/monitor_instances/{monitor_instance_id}

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Flag that allows to control if the underlying actions related to the monitor reconfiguration should be triggered

    Default: false

A JSONPatch document as defined by RFC 6902

  • curl -X 'PATCH'     '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}'     -H 'accept: application/json'     -H 'Content-Type: application/json'     -d '[
        {
          "op": "add",
          "path": "string",
          "value": {},
          "from": "string"
        }
      ]'

Response

Status Code

  • Monitoring updated successfully

  • Monitoring update started

Example responses
  • Monitoring updated successfully

    {
      "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"
      }
    }
  • Monitoring update started

    [
      {
        "op": "replace",
        "path": "/name",
        "value": "NewObjectName"
      }
    ]

Delete a monitor instance

Delete a monitor instance

DELETE /v2/monitor_instances/{monitor_instance_id}

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Force hard delete. All metrics for this monitor instance will be deleted from the data mart

  • curl -X 'DELETE'   '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}'   -H 'accept: application/json'

Response

Status Code

  • Monitoring disabled successfully

Example responses

Trigger monitoring run

Trigger monitoring run

POST /v2/monitor_instances/{monitor_instance_id}/runs

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

Monitoring run options.

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}/runs?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Content-Type: application/json'   -d '{
      "triggered_by": "event",
      "parameters": {
        "monitorParam1": "value1",
        "monitorParam2": 2,
        "monitorParam3": {
          "field1": "fieldvalue1"
        },
        "monitorParam4": [
          "elem1",
          "elem2"
        ]
      },
      "expiration_date": "2025-01-14T10:01:45.180Z"
    }'

Response

Status Code

  • Monitoring run triggered

Example responses
  • Monitoring run triggered

    {
      "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"
      }
    }

List monitoring runs

List monitoring runs

GET /v2/monitor_instances/{monitor_instance_id}/runs

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • The page token indicating where to start paging from.

  • The limit of the number of items to return, for example limit=50. If not specified a default of 100 will be used.

    Possible values: value ≥ 1

    Default: 100

  • curl -X 'GET'   '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}'   -H 'accept: application/json'

Response

A page from a collection of monitoring runs.

Status Code

  • Got history of monitoring runs

Example responses
  • Got history of monitoring runs

    {
      "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
    }

Get monitoring run details

Get monitoring run details

GET /v2/monitor_instances/{monitor_instance_id}/runs/{monitoring_run_id}

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

  • Unique monitoring run ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: 4d213d6d-92b0-46dd-8d9f-010ab78f4902

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_definitions/{monitor_definition_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Got monitoring run details

Example responses
  • Got monitoring run details

    {
      "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"
      }
    }

Update existing monitoring run details

Update existing monitoring run details

PATCH /v2/monitor_instances/{monitor_instance_id}/runs/{monitoring_run_id}

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

  • Unique monitoring run ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: 4d213d6d-92b0-46dd-8d9f-010ab78f4902

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

  • curl -X 'PATCH'    '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}'    -H 'accept: application/json'    -H 'Content-Type: application/json-patch+json'    -d '[
       {
         "op": "add",
         "path": "string",
         "value": {},
         "from": "string"
       }
     ]'

Response

Status Code

  • Monitoring run updated successfully

Example responses
  • Monitoring run updated successfully

    {
      "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"
      }
    }

Publish measurement data to OpenScale

Publish measurement data to OpenScale

POST /v2/monitor_instances/{monitor_instance_id}/measurements

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/monitor_instances/{monitor_instance_id}/measurements?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Content-Type: application/json'   -d '[
      {
        "timestamp": "2018-11-21T09:37:55.523Z",
        "run_id": "string",
        "metrics": [
          {
            "quality": 0.89
          }
        ],
        "sources": [
          {
            "id": "confusion_matrix_1",
            "type": "confusion_matrix",
            "metric_ids": [
              [
                "area_under_roc",
                "area_under_pr"
              ]
            ],
            "data": {
              "labels": [
                "NoRisk",
                "Risk"
              ],
              "values": [
                [
                  0.97,
                  0.01
                ],
                [
                  0.03,
                  0.96
                ]
              ]
            }
          }
        ],
        "asset_revision": "string"
      }
    ]'

Response

Status Code

  • Asset observation registered successfully

Example responses

Query measurements from OpenScale DataMart.

Query measurements from OpenScale DataMart. It is required to either provide a start end or run_id parameter.

GET /v2/monitor_instances/{monitor_instance_id}/measurements

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

Query Parameters

  • Beginning of the time range

  • End of the time range

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Comma delimited list of measurement run_id

  • 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. Supported filters are: in, eq, null and exists. Sample filters are: filter=region:in:[us,pl],segment:eq:sales or filter=region:null,segment:exists.

  • Maximum number of measurements returned

    Possible values: 1 ≤ value ≤ 1000

    Default: 100

  • Offset of measurements returned

    Possible values: value ≥ 0

    Default: 0

  • curl -X 'GET'   '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}'   -H 'accept: application/json'

Response

Status Code

  • Measurements data queried successfully. For measurement POSTed with v1, value of issue_count and run_id property will be null.

Example responses
  • Measurements data queried successfully. For measurement POSTed with v1, value of issue_count and run_id property will be null.

    {
      "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"
    }

Get measurement data from OpenScale DataMart.

Get measurement data from OpenScale DataMart. If metric_id is specified, sources associated with given metric id are filtered.

GET /v2/monitor_instances/{monitor_instance_id}/measurements/{measurement_id}

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

  • Unique measurement ID

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression [a-z0-9_\-]+

    Example: 123e4567-e89b-12d3-a456-426655440000

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Comma delimited list of metric_id.

  • curl -X 'GET'   '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}'   -H 'accept: application/json'

Response

Status Code

  • Measurement data retrieved successfully

Example responses
  • Measurement data retrieved successfully

    {
      "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"
      }
    }

Query for the recent measurement

Query for the recent measurement grouped by the monitoring target (subscription).

GET /v2/measurements

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Comma separated ID of the monitoring target (subscription)

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: 4b133ea1-3097-4175-82a1-4fd80759de26

  • Type of the monitoring target (subscription)

    Allowable values: [subscription,instance,data_mart,project,space]

  • Comma separated ID of the monitor definition

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression [a-z0-9_\-]+

    Example: quality

  • 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. Supported 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. Every monitor_definition_id can have own set of filters.

  • Number of measurements (per target) to be returned

    Possible values: 1 ≤ value ≤ 20

    Default: 1

  • Format of the returned data. full format compared to compact is additive and contains sources part.

    Allowable values: [compact,full]

    Default: compact

  • curl -X 'GET' '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}' -H 'accept: application/json'

Response

Status Code

  • Measurements data queried successfully

Example responses
  • Measurements data queried successfully

    {
      "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"
          }
        }
      ]
    }

Query monitor instance metrics from OpenScale DataMart.

Query monitor instance metrics from OpenScale DataMart. See Metrics Query Language documentation.

GET /v2/monitor_instances/{monitor_instance_id}/metrics

Request

Path Parameters

  • Unique monitor instance ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

Query Parameters

  • Calculations inclusive, internally floored to achieve full interval. If interval is vulnerable to time zone, the calculated value depends on a backend db engine: PostgreSQL respects time zone and DB2 use UTC time. Calculated value is returned in response.

  • Calculations exclusive, internally ceiled to achieve full interval. If interval is vulnerable to time zone, the calculated value depends on a backend db engine: PostgreSQL respects time zone and DB2 use UTC time. Calculated value is returned in response.

  • Comma delimited function list constructed from metric name and function, e.g. agg=metric_name:count,:last that defines aggregations

    Allowable values: [last,first,max,min,sum,avg,count,stddev,median]

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • Time unit in which metrics are grouped and aggregated, interval by interval

    Allowable values: [minute,hour,day,week,month,year]

    Default: hour

  • 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. Supported filters are: in, eq, null and exists. Sample filters are: filter=region:in:[us,pl],segment:eq:sales or filter=region:null,segment:exists.

  • Comma delimited list constructed from metric tags, e.g. group=region,segment to group metrics before aggregations

  • curl -X 'GET'   '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}' -H 'accept: application/json'

Response

Status Code

  • Metric data queried successfully

Example responses
  • Metric data queried successfully

    {
      "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"
    }

List integrated systems

List integrated systems

GET /v2/integrated_systems

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • comma-separated list of type for the integrated system

    Allowable values: [open_pages,slack,webhook,hive,spark,jdbc,custom_metrics_provider,watson_knowledge_catalog,generative_ai_evaluator,embeddings_provider]

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/integrated_systems?type=slack&project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Integrated Systems returned successfully

Example responses
  • Integrated Systems returned successfully

    {
      "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"
          }
        }
      ]
    }

Create a new integrated system

Create a new integrated system

POST /v2/integrated_systems

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

Integrated System definition

  • curl -X 'POST'     'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/integrated_systems?project_id={project_id}&space_id={space_id}'     -H 'accept: application/json'     -H 'Authorization: {Bearer token}'     -H 'Content-Type: application/json'     -d '{
        "name": "string",
        "type": "open_pages",
        "description": "string",
        "credentials": {
          "additionalProp1": {}
        },
        "connection": {},
        "group_ids": [
          "10000",
          "10001"
        ],
        "user_ids": [
          "1000330999",
          "1000331301"
        ],
        "parameters": {}
      }'

Response

Status Code

  • Integrated System successfully created.

Example responses
  • Integrated System successfully created.

    {
      "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"
      }
    }

Get a specific integrated system

Get a specific integrated system

GET /v2/integrated_systems/{integrated_system_id}

Request

Path Parameters

  • Unique integrated system ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: 4d213d6d-92b0-46dd-8d9f-010ab78f4902

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/integrated_systems/{integrated_system_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Integrated System details retrieved successfully

Example responses
  • Integrated System details retrieved successfully

    {
      "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"
      }
    }

Update an integrated system

Update an integrated system

PATCH /v2/integrated_systems/{integrated_system_id}

Request

Path Parameters

  • Unique integrated system ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: 4d213d6d-92b0-46dd-8d9f-010ab78f4902

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

  • curl -X 'PATCH'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/integrated_systems/{integrated_system_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json-patch+json'   -d '[
      {
        "op": "add",
        "path": "string",
        "value": {},
        "from": "string"
      }
    ]'

Response

Status Code

  • Integrated System updated successfully

Example responses
  • Integrated System updated successfully

    {
      "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"
      }
    }

Delete an integrated system

Delete an integrated system

DELETE /v2/integrated_systems/{integrated_system_id}

Request

Path Parameters

  • Unique integrated system ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: 4d213d6d-92b0-46dd-8d9f-010ab78f4902

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'DELETE'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/integrated_systems/{integrated_system_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Integrated System deleted successfully.

Example responses
  • Integrated System deleted successfully.

    (no example available)

List Operational Spaces

List Operational Spaces

GET /v2/operational_spaces

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/operational_spaces?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Operational Spaces returned successfully

Example responses
  • Operational Spaces returned successfully

    {
      "operational_spaces": [
        {
          "description": "string",
          "name": "string"
        }
      ]
    }

Create an operational space

Create an operational space

POST /v2/operational_spaces

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

Operational Space definition

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/operational_spaces?project_id={project_id}&space_id={project_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
      "name": "string",
      "description": "string"
    }'

Response

Status Code

  • Operational Space successfully created.

Example responses
  • Operational Space successfully created.

    {
      "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"
      }
    }

Get an operational space

Get an operational space

GET /v2/operational_spaces/{operational_space_id}

Request

Path Parameters

  • Unique Operational Space ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: 4d213d6d-92b0-46dd-8d9f-010ab78f4902

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/operational_spaces/{operational_space_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Operational Space details retrieved successfully

Example responses
  • Operational Space details retrieved successfully

    {
      "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"
      }
    }

Update an operational space

Update an operational space

PATCH /v2/operational_spaces/{operational_space_id}

Request

Path Parameters

  • Unique Operational Space ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: 4d213d6d-92b0-46dd-8d9f-010ab78f4902

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

  • curl -X 'PATCH'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/operational_spaces/{operational_space_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json-patch+json'   -d '[
      {
        "op": "add",
        "path": "string",
        "value": {},
        "from": "string"
      }
    ]'

Response

Status Code

  • Operational Space updated successfully

Example responses
  • Operational Space updated successfully

    {
      "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"
      }
    }

Delete an operational space

Delete an operational space

DELETE /v2/operational_spaces/{operational_space_id}

Request

Path Parameters

  • Unique Operational Space ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

    Example: 4d213d6d-92b0-46dd-8d9f-010ab78f4902

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'DELETE'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/operational_spaces/{operational_space_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Operational Space deleted successfully.

Example responses
  • Operational Space deleted successfully.

    (no example available)

Get User Preferences

Get User Preferences

GET /v2/user_preferences

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/user_preferences?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • response

Example responses
  • Got User Preferences

    {}

Update User Preferences

Update User Preferences

PATCH /v2/user_preferences

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

A JSONPatch document as defined by RFC 6902

  • curl -X 'PATCH'     'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/user_preferences?project_id={project_id}&space_id={space_id}'     -H 'accept: application/json'     -H 'Authorization: {Bearer token}'     -H 'Content-Type: application/json-patch+json'     -d '[
        {
          "op": "add",
          "path": "string",
          "value": {},
          "from": "string"
        }
      ]'

Response

Status Code

  • User Preferences updated successfully

Example responses
  • User Preferences updated successfully

    {}

Get a specific user preference

Get a specific user preference

GET /v2/user_preferences/{user_preference_key}

Request

Path Parameters

  • key in user preferences

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/user_preferences/{user_preference_key}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

user preference object value

Status Code

  • response

Example responses
  • Got a specific user preference

    {no example available}

Update the user preference

Update the user preference

PUT /v2/user_preferences/{user_preference_key}

Request

Path Parameters

  • key in user preferences

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

user preference object value

  • curl -X 'PUT'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/user_preferences/{user_preference_key}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{}'

Response

Status Code

  • key in User Preferences updated successfully

Example responses
  • key in User Preferences updated successfully

    {}

Delete the user preference

Delete the user preference

DELETE /v2/user_preferences/{user_preference_key}

Request

Path Parameters

  • key in user preferences

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'DELETE'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/user_preferences/{user_preference_key%20}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Deleted

Example responses
  • Delete the user preference

    (no example available)

Compute explanations

Submit tasks for computing explanation of predictions

POST /v2/explanation_tasks

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

Explanation task request to submit for computing explanation. One of scoring_ids and input_rows is mandatory.

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/explanation_tasks?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
      "scoring_ids": [
        "scoring_id1",
        "scoring_id2"
      ],
      "input_rows": [
        {
          "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"
        }
      ],
      "explanation_types": [
        "lime"
      ],
      "subscription_id": "c37c3c7c-67ae-48be-84bd-86cd2b25e618"
    }'

Response

Post explanation tasks response

Status Code

  • Explanation request submitted successfully

Example responses
  • Explanation request submitted successfully

    {
      "metadata": {
        "created_at": "2018-11-01 09:16:45.783596",
        "created_by": "IBMid-123456",
        "explanation_task_ids": [
          "explanation_task_id1",
          "explanation_task_id2"
        ]
      }
    }

List all explanations

List of all the computed explanations

GET /v2/explanation_tasks

Request

Query Parameters

  • Unique subscription ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • offset of the explanations to return

  • Maximum number of explanations to return

    Possible values: 1 ≤ value ≤ 100

    Default: 50

  • ID of the scoring transaction

  • Status of the explanation task

    Allowable values: [in_progress,finished,error]

  • curl -X 'GET'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

List all explanations response

Status Code

  • Explanations successfully retrieved

Example responses
  • Explanations successfully retrieved

    {
      "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
    }

Get explanation

Get explanation for the given explanation task id

GET /v2/explanation_tasks/{explanation_task_id}

Request

Path Parameters

  • ID of the explanation task

    Example: 9fdaa46c-c124-4700-b794-6d6a5262c3aa

Query Parameters

  • Unique subscription ID

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Get explanation task response

Status Code

  • Explanation successfully retrieved

Example responses
  • Explanation successfully retrieved

    {
      "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"
      }
    }

Add secret

Add new secret and prepare id for them

POST /v2/secrets

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/secrets?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
      "credentials": {
        "additionalProp1": {}
      }
    }'

Response

Status Code

  • response

Example responses
  • Successfully added new secret

    {
      "entity": {
        "credentials": {
          "additionalProp1": {}
        }
      },
      "metadata": {
        "created_at": "2025-02-12T15:17:14.920Z",
        "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-12T15:17:14.920Z",
        "modified_by": "IBMid-1100011XYZ",
        "url": "string"
      }
    }

Get secrets

Get all secrets for this user.

GET /v2/secrets

Request

Query Parameters

  • comma separated list of secret ids to filter result

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/secrets?id={id}&project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • response

Example responses
  • {
      "secrets": [
        {
          "entity": {
            "credentials": {
              "additionalProp1": {}
            }
          },
          "metadata": {
            "created_at": "2025-02-12T15:18:49.866Z",
            "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-12T15:18:49.866Z",
            "modified_by": "IBMid-1100011XYZ",
            "url": "string"
          }
        }
      ]
    }

Get secret

Get secret

GET /v2/secrets/{secret_id}

Request

Path Parameters

  • ID of secret

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/secrets/{secret_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • response

Example responses
  • Success

    {
      "entity": {
        "credentials": {
          "additionalProp1": {}
        }
      },
      "metadata": {
        "created_at": "2025-02-13T06:32:49.159Z",
        "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:32:49.159Z",
        "modified_by": "IBMid-1100011XYZ",
        "url": "string"
      }
    }

Delete secret

Delete secret

DELETE /v2/secrets/{secret_id}

Request

Path Parameters

  • ID of secret

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'DELETE'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/secrets/{secret_id}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • Deleted

Example responses

Private API

Private API

POST /v2/feedback_tables

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/feedback_tables?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
      "feedback_data_reference": {
        "type": "db2",
        "location": {
          "table_name": "string"
        },
        "connection": {
          "additionalProp1": {}
        },
        "name": "string"
      },
      "feedback_data_schema": {
        "type": "struct",
        "fields": [
          {
            "name": "string",
            "type": "string",
            "nullable": true,
            "metadata": {
              "additionalProp1": {}
            }
          },
          {
            "name": "string",
            "type": {},
            "nullable": true,
            "metadata": {
              "additionalProp1": {}
            }
          }
        ],
        "id": "string",
        "name": "string"
      }
    }'

Response

Status Code

  • Feedback table created

Example responses

Private API

Checks if given instance's data_mart_id is allowed to perform amount of operations on a resource_name in current billing period and returns appropriate status. If only minimal number is granted, the status is truncated.

POST /v2/usage/{resource_name}

Request

Path Parameters

  • a resource name the usage is checked and requested for

    Allowable values: [explained_transactions,explained_records,bias_rows,debias_rows,quality_rows,total_evaluations,models,scoring_payload_records,feedback_payload_records,business_payload_records,evaluation_records,fairness_feedback_rows,global_explanations,free_database_volume,inventory,usecase,usecase_rows]

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'POST'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/usage/{resource_name}?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
      "amount": 1000,
      "timestamp": "2025-01-15T09:25:57.295Z",
      "minimal": 50,
      "type": "relative"
    }'

Response

Status Code

  • OK

Example responses
  • {
      "amount": 1,
      "resource": {
        "limit": 5,
        "name": "models",
        "usage": 3
      },
      "status": "granted"
    }

Returns usage of a given instance's _data_mart_id_ in current billing period.

Returns usage of a given instance's data_mart_id in current billing period.

GET /v2/usage

Request

Query Parameters

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/usage?project_id={project_id}&space_id={space_id}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

Response

Status Code

  • OK

Example responses
  • {
      "crn": "crn:v1:bluemix:public:aiopenscale:us-south:a/59bcbfa6ea2f006b4ed7094c1a08dcdd:1a0ec336-f391-4091-a6fb-5e084a4c56f4::",
      "resources": [
        {
          "limit": 5,
          "name": "models",
          "usage": 3
        }
      ]
    }

Upload drift_v2 archive for a given subscription

This API is used to upload the drift_v2 archive necessary to configure the Drift v2 monitor.

PUT /v2/monitoring_services/drift_v2/archives

Request

Query Parameters

  • The id of the subscription.

    Example: 86131af1-8e7f-4c9e-811b-437730ece50

  • The GUID of the project.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: c5b95e10-d422-42f9-ba14-566fecfd550c

  • The GUID of the space.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

    Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

  • The name of the archive being uploaded.

    Example: user_drift.tar.gz

    Response

    Status Code

    • The archive was uploaded successfully.

    • The user is not authorized to perform the action.

    • Internal server error.

    Example responses

    Get drift v2 archive for a given subscription

    This API is used to download the drift_v2 Archives.

    GET /v2/monitoring_services/drift_v2/archives

    Request

    Query Parameters

    • The id of the subscription.

      Example: 86131af1-8e7f-4c9e-811b-437730ece50

    • The GUID of the project.

      Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

      Example: c5b95e10-d422-42f9-ba14-566fecfd550c

    • The GUID of the space.

      Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

      Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

    • The id of the archive to be downloaded. It will download the latest baseline archive by default.

      Example: baseline

    • curl -X 'GET'   '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}'   -H 'accept: application/octet-stream'   -H 'Authorization: {Bearer token}'

    Response

    Status Code

    • The archive was retrieved successfully.

    • The user is not authorized to perform the action.

    • The archive was not found.

    • Internal server error.

    Example responses

    Get drift archive metadata for a given subscription

    HEAD /v2/monitoring_services/drift_v2/archives

    Request

    Query Parameters

    • The id of the subscription.

      Example: 86131af1-8e7f-4c9e-811b-437730ece50

    • The GUID of the project.

      Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

      Example: c5b95e10-d422-42f9-ba14-566fecfd550c

    • The GUID of the space.

      Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

      Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

    • The id of the archive to be downloaded. It will download the latest baseline archive by default.

      Example: baseline

    • curl -X 'HEAD'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

    Response

    Response Headers

    Status Code

    • The archive was retrieved successfully.

    • The user is not authorized to perform the action.

    • The archive was not found.

    • Internal server error.

    Upload Drift archives.

    API to upload drift archive such as the Drift Detection Model.

    POST /v2/monitoring_services/drift/data_marts/{data_mart_id}/subscriptions/{subscription_id}/archives

    Request

    Path Parameters

    • ID of the data mart

      Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

      Example: dad3ed3f-db8d-4b35-b59e-7acad5348a3a

    • Unique subscription ID

      Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

      Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

    Query Parameters

    • The GUID of the project.

      Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

      Example: c5b95e10-d422-42f9-ba14-566fecfd550c

    • The GUID of the space.

      Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

      Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

    • The name of the archive being uploaded.

      Default: user_drift.tar.gz

    • Flag to enable/disable data drift.

      Default: true

    • Flag to enable/disable model drift.

      Default: true

      Response

      Status Code

      • The archive was uploaded successfully.

      • The user is not authorized to perform the action.

      • Internal server error.

      Example responses

      Retrieves the Drift archives.

      API to retrieve the Drift archives.

      GET /v2/monitoring_services/drift/monitor_instances/{monitor_instance_id}/archives

      Request

      Path Parameters

      • Unique monitor instance ID

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

        Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'GET'   '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}'   -H 'accept: application/octet-stream'   -H 'Authorization: {Bearer token}'

      Response

      Status Code

      • The archive was retrieved successfully.

      • The user is not authorized to perform the action.

      • The archive was not found.

      • Internal server error.

      Example responses

      Retrieves the Drift archive metadata.

      API to retrieve the Drift archive metadata.

      HEAD /v2/monitoring_services/drift/monitor_instances/{monitor_instance_id}/archives

      Request

      Path Parameters

      • Unique monitor instance ID

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

        Example: d901a7ac-4ec4-4e31-8eb2-7df72ec2a458

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'HEAD'   '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}'   -H 'accept: */*'   -H 'Authorization: {Bearer token}'

      Response

      Response Headers

      Status Code

      • The archive metadata was retrieved successfully.

      • The user is not authorized to perform the action.

      • The archive metadata was not found.

      • Internal server error.

      Upload explainability configuration archive.

      API to upload explainability configuration archive containing the explainability artifacts. The api can also be used to update the archive.

      PUT /v2/monitoring_services/explainability/archives

      Request

      Query Parameters

      • Unique subscription ID

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X PUT "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}" -H "accept: */*" -H "Content-Type: application/octet-stream" -d {}

      Response

      Status Code

      • The archive was uploaded successfully.

      • The user is not authorized to perform the action.

      • Internal server error.

      Example responses

      Upload explainability configuration archive.

      API to upload explainability configuration archive containing the explainability artifacts. The api can also be used to update the archive.

      POST /v2/monitoring_services/explainability/archives

      Request

      Query Parameters

      • Unique subscription ID

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X POST "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}" -H "accept: */*" -H "Content-Type: application/octet-stream" -d {}

      Response

      Status Code

      • The archive was uploaded successfully.

      • The user is not authorized to perform the action.

      • Internal server error.

      Example responses

      Download the Explainability configuration archive.

      API to download the Explainability archive.

      GET /v2/monitoring_services/explainability/archives

      Request

      Query Parameters

      • Unique subscription ID

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c37c3c7c-67ae-48be-84bd-86cd2b25e618

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'GET'   '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}'   -H 'accept: application/octet-stream'   -H 'Authorization: {Bearer token}'

      Response

      Status Code

      • The archive was retrieved successfully.

      • The user is not authorized to perform the action.

      • The archive was not found.

      • Internal server error.

      Example responses

      Parse a given file and extract the schema in Spark StructType format.

      API to consume a file such as CSV and returns the schema in Spark StructType format.

      POST /v2/spark_schemas

      Request

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      Examples:
      • curl -X 'POST'     'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/spark_schemas?project_id={project_id}&space_id={space_id}'     -H 'accept: application/json'     -H 'Authorization: {Bearer token}'     -H 'Content-Type: text/csv'     -d 'GENDER,AGE,IS_TENT,PURCHASE_AMOUNT,prediction,probability,string_array
          F,34,true,121.60,false,"[0.9,0.1]","[\"a\",\"b\"]"
          M,35,false,121.61,false,"[0.8,0.2]","[\"a\",\"b\"]"'

      Response

      Status Code

      • The given file was successfully parsed.

      Example responses
      • {
          "fields": [
            {"metadata": {},"name": "GENDER","nullable": true,"type": "string"},
            {"metadata": {},"name": "AGE","nullable": true,"type": "integer"},
            {"metadata": {},"name": "IS_TENT","nullable": true,"type": "boolean"},
            {"metadata": {},"name": "PURCHASE_AMOUNT","nullable": true,"type": "double"},
            {"metadata": {},"name": "prediction","nullable": true,"type": "boolean"},
            {"metadata": {},"name": "probability","nullable": true,
              "type": {
                "containsNull": true,
                "elementType": "double",
                "type": "array"
              }
            },
            {"metadata": {},"name": "string_array","nullable": true,
              "type": {
                "containsNull": true,
                "elementType": "string",
                "type": "array"
              }
            }
          ],
          "type": "struct"
        }
        

      Uploads the test data and triggers a monitor run for risk evaluation.

      Uploads the test data and triggers a monitor run for risk evaluation.

      POST /v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_evaluations

      Request

      Custom Headers

      • Allowable values: [text/csv,application/json,multipart/form-data]

      Path Parameters

      • The monitor instance ID.

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • The name of the test CSV file being uploaded.

      • Flag to decide whether to send evaluated metrics to OpenPages.

      • Flag to decide whether a lineage event should be published to an integrated system.

      • Flag to decide whether Fact metadata should be published to an integrated system.

      • Boolean flag to indicate whether the data being uploaded contains scored output or not.

      • The delimiter to be used for CSV/Dynamic CSV files.

      • Comma separated list of monitor tests to run

        Allowable values: [drift,fairness,quality,explainability]

      • curl -X 'POST'     '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}'     -H 'accept: application/json'     -H 'Authorization: {Bearer token}'     -H 'Content-Type: application/json'     -d '{}'

      Response

      Status Code

      • Request accepted for risk evaluations.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses
      • Request accepted for risk evaluations.

        {
          "evaluation_date": "string",
          "evaluation_id": "string",
          "evaluation_start_time": "string",
          "evaluation_tests": "string",
          "publish_metrics": "string",
          "status": {
            "state": "string"
          }
        }

      Cancels the risk evaluations run.

      Cancels the risk evaluations run.

      PUT /v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_evaluations

      Request

      Path Parameters

      • The monitor instance ID.

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'PUT'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
          "cancel_run": "string"
        }'

      Response

      Status Code

      • Risk evaluation run canceled successfully.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses
      • Risk evaluation run canceled successfully.

        {
          "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"
          }
        }

      Returns the status of the risk evaluation.

      Returns the status of the risk evaluation.

      GET /v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_evaluations

      Request

      Path Parameters

      • The monitor instance ID.

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'GET'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

      Response

      Status Code

      • Gets the latest risk evaluations runs detail.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses
      • Gets the latest risk evaluations runs detail.

        {
          "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"
          }
        }

      Publishes the chosen metrics to the integrated system reference.

      Publishes the chosen metrics to the integrated system reference.

      PUT /v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/runs/{monitoring_run_id}/integrated_system_metrics

      Request

      Path Parameters

      • The monitor instance ID.

      • The monitoring run ID.

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'PUT'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
          "metrics": [
            {
              "type": "string",
              "measures": [
                {}
              ],
              "integrated_metrics": [
                {
                  "integrated_system_type": "string",
                  "mapped_metrics": "string"
                }
              ]
            }
          ],
          "send_report": true
        }'

      Response

      Status Code

      • Request to publish the chosen metrics to the integrated system reference accepted.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses

      Returns the risk evaluation report in a PDF format.

      Returns the risk evaluation report in a PDF format.

      GET /v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/runs/{monitoring_run_id}/risk_evaluation_report

      Request

      Path Parameters

      • The monitor instance ID.

      • The monitoring run ID.

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'GET' '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}' -H 'accept: application/pdf' -H 'Authorization: {Bearer token}'

      Response

      Status Code

      • Successfully returned the risk evaluation report in a PDF format.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses

      Returns the risk evaluation status of all subscriptions in a given service instance.

      Returns the risk evaluation status of all subscriptions in a given service instance.

      GET /v2/subscriptions/risk_evaluation_status

      Request

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • The data mart ID.

      • curl -X 'GET'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

      Response

      Status Code

      • Successfully fetched the risk evaluation status.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses
      • Successfully fetched the risk evaluation status.

        {
          "risk_evaluation_status": [
            {
              "localized_status": "string",
              "status": "string",
              "subscription_id": "string"
            }
          ]
        }

      Updates the risk evaluation status for the given subscription.

      Updates the risk evaluation status for the given subscription.

      PUT /v2/subscriptions/{subscription_id}/risk_evaluation_status

      Request

      Path Parameters

      • The subscription ID.

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'PUT'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/risk_evaluation_status?project_id={project_id}&space_id={space_id}'   -H 'accept: */*'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
          "state": "string"
        }'
          

      Response

      Status Code

      • Updated risk evaluation status of the subscription successfully.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses

      Gets risk evaluation status for the given subscription.

      Gets risk evaluation status for the given subscription.

      GET /v2/subscriptions/{subscription_id}/risk_evaluation_status

      Request

      Path Parameters

      • The subscription ID.

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'GET'   'https://aiopenscale.cloud.ibm.com/openscale/{service-instance-id}/v2/subscriptions/{subscription_id}/risk_evaluation_status?project_id={project_id}&space_id={space_id}'   -H 'accept: */*'   -H 'Authorization: {Bearer token}'

      Response

      Status Code

      • Fetched risk evaluation status of the subscription successfully.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses

      Performs the setup activities in Openscale for a given prompt template asset.

      Performs the service provider creation, subscription creation and monitors configuration for the given prompt template asset.

      POST /v2/prompt_setup

      Request

      Custom Headers

      • Allowable values: [application/json,multipart/form-data]

      Query Parameters

      • The GUID of the prompt template asset.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: 1c133af3-5115-4f31-8376-6975434288c8

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • The GUID of the deployment.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: 075ef77c-3211-4098-bc7f-9ae783df6306

      • curl -X 'POST'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
          "label_column": "string",
          "operational_space_id": "string",
          "problem_type": "string",
          "classification_type": "string",
          "input_data_type": "string",
          "context_fields": [
            "string"
          ],
          "question_field": "string",
          "meta_fields": [
            {
              "name": "string",
              "data_type": [
                "string",
                "double",
                "boolean",
                "integer"
              ]
            }
          ],
          "monitors": {
            "monitor_definition_id": {
              "parameters": {},
              "thresholds": [
                {}
              ]
            }
          }
        }'

      Response

      Status Code

      • Prompt setup request accepted successfully.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses
      • Prompt setup request accepted successfully.

        {
          "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"
        }

      Gets the status of the prompt setup for the given prompt template asset.

      Gets the status of the prompt setup for the given prompt template asset.

      GET /v2/prompt_setup

      Request

      Query Parameters

      • The GUID of the prompt template asset.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: 1c133af3-5115-4f31-8376-6975434288c8

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • The GUID of the deployment.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: 075ef77c-3211-4098-bc7f-9ae783df6306

      • curl -X 'GET'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'

      Response

      Status Code

      • The status of the prompt setup returned successfully.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses
      • The status of the prompt setup returned successfully.

        {
          "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"
        }

      Sets the users email notification preference in the MRM monitor instance of a given model subscription.

      Sets the users email notification preference in the MRM monitor instance of a given model subscription.

      PUT /v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_notifications

      Request

      Path Parameters

      • The monitor instance ID.

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'PUT'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -d '{
          "notification_enabled": true,
          "notification_frequency": "string",
          "notification_emails": [
            "string"
          ]
        }'

      Response

      Status Code

      • Notification preferences updated successfully.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses
      • Notification preferences updated successfully.

        {
          "entity": {
            "notification_emails": [
              "string"
            ],
            "notification_enabled": true,
            "notification_frequency": "string"
          },
          "metadata": {
            "created_at": "string",
            "created_by": "string",
            "id": "string",
            "url": "string"
          }
        }

      Gets the users email notification preferences for a given model subscription.

      Gets the users email notification preferences for a given model subscription.

      GET /v2/monitoring_services/mrm/monitor_instances/{monitor_instance_id}/risk_notifications

      Request

      Path Parameters

      • The monitor instance ID.

      Query Parameters

      • The GUID of the project.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: c5b95e10-d422-42f9-ba14-566fecfd550c

      • The GUID of the space.

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9_\-]+

        Example: fa883e36-1bdf-445c-b66e-431b3fa49f10

      • curl -X 'GET'   '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}'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'
          

      Response

      Status Code

      • Notification preferences returned successfully.

      • Bad Request.

      • Unauthorized.

      • Internal Server Error.

      Example responses
      • Notification preferences returned successfully.

        {
          "entity": {
            "notification_emails": [
              "string"
            ],
            "notification_enabled": true,
            "notification_frequency": "string"
          },
          "metadata": {
            "created_at": "string",
            "created_by": "string",
            "id": "string",
            "url": "string"
          }
        }

      Runs detections on a given input text.

      Text Detection endpoint. Supports natural language inputs and returns the result of enabled detectors. You can specify any combination of HAP, PII, and Granite Guardian detectors. Each detector is configurable independantly and atleast one detector is mandatory in the request.

      POST /ml/v1/text/detection

      Request

      Custom Headers

      • The instance id of watsonx.governance

        Possible values: 1 ≤ length ≤ 64, Value must match regular expression [a-z0-9\-]+

        Example: 4165a2fb-3b57-4b19-8a2b-037b9b0f7b08

      The request for text detection on input content.\n

      Examples:

      text PII detection

      A PII text detection example.

      {
        "input": "my text to check",
        "detectors": {
          "pii": {}
        }
      }

      A HAP text detection example.

      A HAP text detection example.

      {
        "input": "my text to check",
        "detectors": {
          "hap": {
            "threshold": 0.5
          }
        }
      }

      A text detection example using granite guardian model.

      A text detection example using granite guardian model.

      {
        "input": "my text to check",
        "detectors": {
          "granite_guardian": {
            "threshold": 0.5,
            "risk_name": "jailbreak"
          }
        }
      }

      text detection with multiple detectors

      A text detection with multiple detectors.

      {
        "input": "my text to check",
        "detectors": {
          "pii": {},
          "hap": {
            "threshold": 0.6
          },
          "granite_guardian": {
            "threshold": 0.6,
            "risk_name": "social_bias"
          }
        }
      }
      • curl -X 'POST'   'https://us-south.cloud.ibm.com/ml/v1/text/detection'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -H 'x-governance-instance-id: {service_instance_id}'   -d '{
              "detectors": {
                 "hap": {
                  "threshold": 0.5
                 }
              },
              "input": "my text to check"
          }'
      • curl -X 'POST'   'https://us-south.cloud.ibm.com/ml/v1/text/detection'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -H 'x-governance-instance-id: {service_instance_id}'   -d '{
              "detectors": {
                "pii": {}
              },
              "input": "my text to check"
          }'
      • curl -X 'POST'   'https://us-south.cloud.ibm.com/ml/v1/text/detection'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -H 'x-governance-instance-id: {service_instance_id}'   -d '{
              "detectors": {
                "granite_guardian": {
                  "risk_name": "harm",
                  "threshold": 0.6
                }
              },
              "input": "my text to check"
          }'
      • curl -X 'POST'   'https://us-south.cloud.ibm.com/ml/v1/text/detection'   -H 'accept: application/json'   -H 'Authorization: {Bearer token}'   -H 'Content-Type: application/json'   -H 'x-governance-instance-id: {service_instance_id}'   -d '{
              "detectors": {
                "hap": {
                  "threshold": 0.5
                },
                "pii": {},
                "granite_guardian": {
                  "risk_name": "harm",
                  "threshold": 0.6
                }
              },
              "input": "my text to check"
          }'

      Response

      The response for text detection.

      Status Code

      • success.

      • Bad request, the response body should contain the reason.

      • Unauthorized.

      • Forbidden, an authentication error including trying to access an unauthorized watsonx.gov service instance.

      • The specified resource was not found.

      • Internal Server Error.

      Example responses
      • A PII text detection example

        {
          "detections": [
            {
              "start": 20,
              "end": 24,
              "detection_type": "pii",
              "detection": "xxxx",
              "score": 0.846
            }
          ]
        }
      • A HAP text detection example.\n

        {
          "detections": [
            {
              "start": 122,
              "end": 239,
              "detection_type": "hap",
              "detection": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
              "score": 0.846
            }
          ]
        }
      • A text detection example using Granite Guardian.\n

        {
          "detections": [
            {
              "start": 0,
              "end": 57,
              "text": "my input text",
              "detection_type": "risk",
              "detection": "Yes",
              "score": 0.97
            }
          ]
        }
      • A text detection with multiple detectors.\n

        {
          "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
            }
          ]
        }
      id=curlclassName=tab-item-selected