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"
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. |
errorstring |
Human-readable error string, like 'Invalid image file'. |
ErrorAuthentication
Name | Description |
---|---|
statusstring |
The status of error. |
statusInfostring |
Information about the error. |
ErrorHTML
Name | Description |
---|---|
Errorstring |
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. |
descriptionstring |
Human-readable error description. For example, File size limit exceeded . |
error_idstring |
Codified error string. For example, limit_exceeded . |
Methods
Request
Query Parameters
force update of metadata and db credentials (assumption is that the new database is already prepared and populated)
Name of the data mart
Description of the data mart
Can be omitted if user token is used for authorization
If
true
the internal database managed by AI OpenScale is provided for the userDefault:
false
Database configuration ignored if internal database is requested (
internal_database
istrue
)Indicates if the database was discovered automatically or manually added by user through UI
Allowable values: [
automatic
,manual
]
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
- entity
If
true
the internal database managed by AI OpenScale is provided for the userDatabase configuration ignored if internal database is requested (
internal_database
istrue
)Used by UI to check if database discovery was automatic or manual
Possible values: [
automatic
,manual
]
Status Code
response
Too many requests for internal database. Please try again in a while.
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" ] } ] }
Request
No 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
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" ] } ] } } } } ] }
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
- entity
If
true
the internal database managed by AI OpenScale is provided for the userDatabase configuration ignored if internal database is requested (
internal_database
istrue
)Used by UI to check if database discovery was automatic or manual
Possible values: [
automatic
,manual
]
Status Code
response
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" ] } ] } } } }
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
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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
- entity
If
true
the internal database managed by AI OpenScale is provided for the userDatabase configuration ignored if internal database is requested (
internal_database
istrue
)Used by UI to check if database discovery was automatic or manual
Possible values: [
automatic
,manual
]
Status Code
Data Marts updated successfully
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" ] } ] } } } }
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}'
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
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
Name of the ML service instance
Example:
wml-production-o09
machine learning service type (azure_machine_learning_studio is a preferred alias for azure_machine_learning and should be used in new service bindings)
Allowable values: [
watson_machine_learning
,amazon_sagemaker
,azure_machine_learning
,custom_machine_learning
,spss_collaboration_and_deployment_services
,azure_machine_learning_studio
,azure_machine_learning_service
]Example:
watson_machine_learning
map header name to header value
- request_headers
Reference to Operational Space
Reference to V2 Space ID
Project ID
Access control list of group id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)
Examples:[ "10000", "10001" ]
Access control list of user id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)
Examples:[ "1000330999", "1000331301" ]
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
- entity
Name of the ML service instance
Example:
wml-production-o09
Possible values: [
watson_machine_learning
,amazon_sagemaker
,azure_machine_learning
,custom_machine_learning
,spss_collaboration_and_deployment_services
]Example:
watson_machine_learning
ID of the ML service instance (required for Watson Machine Learning)
Example:
f8059a5f-162e-4526-9c3d-9e67af543491
Additional headers passed to the ML engine API (for example when scoring)
- request_headers
Reference to Operational Space
Reference to V2 Space ID
Project ID
Access control list of group id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)
Examples:[ "10000", "10001" ]
Access control list of user id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)
Examples:[ "1000330999", "1000331301" ]
Status Code
response
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
- entity
Name of the ML service instance
Example:
wml-production-o09
Possible values: [
watson_machine_learning
,amazon_sagemaker
,azure_machine_learning
,custom_machine_learning
,spss_collaboration_and_deployment_services
]Example:
watson_machine_learning
ID of the ML service instance (required for Watson Machine Learning)
Example:
f8059a5f-162e-4526-9c3d-9e67af543491
Additional headers passed to the ML engine API (for example when scoring)
- request_headers
Reference to Operational Space
Reference to V2 Space ID
Project ID
Access control list of group id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)
Examples:[ "10000", "10001" ]
Access control list of user id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)
Examples:[ "1000330999", "1000331301" ]
Status Code
response
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}'
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
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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
- entity
Name of the ML service instance
Example:
wml-production-o09
Possible values: [
watson_machine_learning
,amazon_sagemaker
,azure_machine_learning
,custom_machine_learning
,spss_collaboration_and_deployment_services
]Example:
watson_machine_learning
ID of the ML service instance (required for Watson Machine Learning)
Example:
f8059a5f-162e-4526-9c3d-9e67af543491
Additional headers passed to the ML engine API (for example when scoring)
- request_headers
Reference to Operational Space
Reference to V2 Space ID
Project ID
Access control list of group id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)
Examples:[ "10000", "10001" ]
Access control list of user id of Cloud Pak for Data (Only available for OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)
Examples:[ "1000330999", "1000331301" ]
Status Code
response
service provider successfully updated
[ { "op": "replace", "path": "/name", "value": "NewObjectName" } ]
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
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" ] } ] } } } } ] }
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
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
dad3ed3f-db8d-4b35-b59e-7acad5348a3a
Example:
fc9a952d-6ef7-40c1-907a-0e1a4270f424
- Examples:
{ "name": "Azure scoring endpoint", "deployment_id": "ae62976ad690472eaf4f9797075ed831", "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831", "created_at": "2018-01-11T10:02:00", "deployment_type": "online", "scoring_endpoint": { "url": "https://ussouthcentral.services.azureml.net/subscriptions/744bca722299451cb682ed6fb75fb671/services/ae62976ad690472eaf4f9797075ed831/execute?api-version=2.0&format=swagger", "credentials": { "token": "dhgsfg3uy46rteyfugwerfygueq6wetfguyewf" } } }
Additional asset properties (subject of discovery if not provided when creating the subscription)
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
- entity
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
dad3ed3f-db8d-4b35-b59e-7acad5348a3a
Example:
fc9a952d-6ef7-40c1-907a-0e1a4270f424
- Examples:
{ "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" } } }
Additional asset properties (subject of discovery if not provided when creating the subscription)
Integrated System reference
Status Code
response
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" ] } ] } } } }
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
- entity
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
dad3ed3f-db8d-4b35-b59e-7acad5348a3a
Example:
fc9a952d-6ef7-40c1-907a-0e1a4270f424
- Examples:
{ "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" } } }
Additional asset properties (subject of discovery if not provided when creating the subscription)
Integrated System reference
Status Code
response
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
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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
- entity
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
dad3ed3f-db8d-4b35-b59e-7acad5348a3a
Example:
fc9a952d-6ef7-40c1-907a-0e1a4270f424
- Examples:
{ "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" } } }
Additional asset properties (subject of discovery if not provided when creating the subscription)
Integrated System reference
Status Code
response
subscription is updated successfully
[ { "op": "replace", "path": "/name", "value": "NewObjectName" } ]
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}'
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
Array of score data object. If multiple score data objects are included, the "fields" array (if any) for score purposes will always be taken from the first score data object.
InputDataReference is the same as TrainingDataReference except that neither location nor connection is required. This is needed for the Schemas API and to avoid updating existing APIs.
Examples:{ "type": "file_asset" }
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
File data asset metadata
Examples:{ "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" } }
Status Code
Schemas created successfully
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.
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
- configurations
Status Code
Get current status of config synchronization
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
{
"exclude_monitors": [
"fairness",
"quality"
]
}
monitor_definition_id
Possible values: contains only unique items
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
- configurations
Status Code
Triggered to synchronize configuration.
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
The values associated to the fields
Examples:[ [ "john", 33, "engineer" ] ]
The fields to process debias scoring
Examples:[ "name", "age", "position" ]
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
The fields of the model processed debias scoring.
Examples:[ "name", "age", "position", "prediction", "probability", "debiased_prediction", "debiased_probability", "debiased_decoded_target" ]
The values associated to the fields.
Examples:[ [ "john", 35, "engineer", 0.3, [ 0.754601226993865, 0.24539877300613497 ], 0.4, [ 0.754601226993865, 0.24539877300613497 ], "good" ] ]
Status Code
Accepted
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" ] ] }
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
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" ] } ] } } } } ] }
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
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
dad3ed3f-db8d-4b35-b59e-7acad5348a3a
type of a 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
]Allowable values: [
none
,auto
]
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
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" ] } ] } } } } ] }
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
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" ] } ] } } } }
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'
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
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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
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" ] } ] } } } }
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)
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
]
]
]
}
}
]
Fields and values of the entity matches JSON object's fields and values.
No properties to display
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
Possible values: [
preparing
,active
,deleting
,pending_delete
,disabled
,error
]
Status Code
response
New data_set added successfully
{ "state": "preparing", "deleted_at": "string", "failure": { "trace": "string", "errors": [ { "code": "AISUT0002E", "message": "string", "parameters": [ "string" ] } ] } }
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
parameterExample:
2018-01-01T00:00:00Z
return records with timestamp lower then
end
parameterExample:
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
, orfilter
param withorder=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
andoffset
.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
Number of all rows which satisfy the query. It is calculated and returned when include_total_count query param is set to
true
Status Code
response
{ "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 } } ] } ] }
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
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"
}
]
}
]
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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
Possible values: [
preparing
,active
,deleting
,pending_delete
,disabled
,error
]
Status Code
response
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
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
Add record(s) annotations
[
{
"op": "add",
"path": "/annotations/biased",
"value": {
"fairness_score": 0.62
}
}
]
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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
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
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
- data_set_records
- data_set
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
dad3ed3f-db8d-4b35-b59e-7acad5348a3a
type of a data set
Possible 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
]
- records
- entity
Fields and values of the entity matches JSON object's fields and values.
Status Code
response
{ "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
Possible values: [
preparing
,active
,deleting
,pending_delete
,disabled
,error
]
Status Code
response
Status of a specific request
{ "state": "preparing", "deleted_at": "string", "failure": { "trace": "string", "errors": [ { "code": "AISUT0002E", "message": "string", "parameters": [ "string" ] } ] } }
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
start datetime in ISO format
Example:
2019-02-26T10:00:00.000Z
end datetime in ISO format
Example:
2019-02-26T10:00:00.000Z
type of a 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
]names of columns to be grouped
Examples:[ "Age", "Gender" ]
limit for number of rows, by default it is 50,000 (max possible limit is 50,000)
Example:
100
Filters defined by user in format: {field_name}:{op}:{value}. Partly compatible with filters in "filter" parameter of GET /v2/data_sets/{data_set_id}/records.
Possible filter operators:
- eq - equals (numeric, string)
- gt - greater than (numeric)
- gte - greater than or equal (numeric)
- lt - lower than (numeric)
- lte - lower than or equal (numeric)
- in - value in a set (numeric, string)
- field:null (a no-argument filter) - value is null (any nullable)
- field:exists (a no-argument filter) - value is not null (any column)
Example:
Age:eq:33,Gender:in:[M,F,T]
Definition of aggregations, by default 'count'.
Aggregations can be one of:
- count
- <column_name>:sum
- <column_name>:min
- <column_name>:max
- <column_name>:avg
- <column_name>:stddev
Examples:[ "count", "Age:min", "Age:stddev" ]
max number of bins which will be generated for data
Example:
4
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
The computed data distribution against specified data set.
- entity
start datetime in ISO format
Example:
2019-02-26T10:00:00.000Z
end datetime in ISO format
Example:
2019-02-26T10:00:00.000Z
type of a data set
Possible 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
]names of columns to be grouped
Examples:[ "Age", "Gender" ]
limit for number of rows, by default it is 50,000 (max possible limit is 50,000)
Example:
100
Filters defined by user in format: {field_name}:{op}:{value}. Partly compatible with filters in "filter" parameter of GET /v2/data_sets/{data_set_id}/records.
Possible filter operators:
- eq - equals (numeric, string)
- gt - greater than (numeric)
- gte - greater than or equal (numeric)
- lt - lower than (numeric)
- lte - lower than or equal (numeric)
- in - value in a set (numeric, string)
- field:null (a no-argument filter) - value is null (any nullable)
- field:exists (a no-argument filter) - value is not null (any column)
Example:
Age:eq:33,Gender:in:[M,F,T]
Definition of aggregations, by default 'count'.
Aggregations can be one of:
- count
- <column_name>:sum
- <column_name>:min
- <column_name>:max
- <column_name>:avg
- <column_name>:stddev
Examples:[ "count", "Age:min", "Age:stddev" ]
max number of bins which will be generated for data
Example:
4
The status information for the monitoring run.
number of processed records
Example:
300
was the limit used on data
Example:
true
- Examples:
{ "fields": [ "Age", "Gender", "count" ], "values": [ [ 33, "M", 4 ], [ 33, "F", 5 ] ] }
- distribution
names of the data distribution fields
data distribution rows
Status Code
response
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" ] } } }
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}'
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
The computed data distribution against specified data set.
- entity
start datetime in ISO format
Example:
2019-02-26T10:00:00.000Z
end datetime in ISO format
Example:
2019-02-26T10:00:00.000Z
type of a data set
Possible 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
]names of columns to be grouped
Examples:[ "Age", "Gender" ]
limit for number of rows, by default it is 50,000 (max possible limit is 50,000)
Example:
100
Filters defined by user in format: {field_name}:{op}:{value}. Partly compatible with filters in "filter" parameter of GET /v2/data_sets/{data_set_id}/records.
Possible filter operators:
- eq - equals (numeric, string)
- gt - greater than (numeric)
- gte - greater than or equal (numeric)
- lt - lower than (numeric)
- lte - lower than or equal (numeric)
- in - value in a set (numeric, string)
- field:null (a no-argument filter) - value is null (any nullable)
- field:exists (a no-argument filter) - value is not null (any column)
Example:
Age:eq:33,Gender:in:[M,F,T]
Definition of aggregations, by default 'count'.
Aggregations can be one of:
- count
- <column_name>:sum
- <column_name>:min
- <column_name>:max
- <column_name>:avg
- <column_name>:stddev
Examples:[ "count", "Age:min", "Age:stddev" ]
max number of bins which will be generated for data
Example:
4
The status information for the monitoring run.
number of processed records
Example:
300
was the limit used on data
Example:
true
- Examples:
{ "fields": [ "Age", "Gender", "count" ], "values": [ [ 33, "M", 4 ], [ 33, "F", 5 ] ] }
- distribution
names of the data distribution fields
data distribution rows
Status Code
response
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 ] ] } } }
Request
Query Parameters
comma-separated list of names
Either of
service
oruser
can be specified.service
is corresponding to monitor definitions managed by IBM, anduser
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
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" } } } ] }
Request
Monitor UI label (must be unique).
Example:
Quality extended metrics
A list of metric definition.
Available tags.
Long monitoring description presented in monitoring catalog.
JSON schema that will be used to validate monitoring parameters when enabled
- parameters_schema
The schedule used to control how frequently the target is monitored. The maximum frequency is once every 30 minutes. Defaults to once every hour if not specified.
Examples:{ "repeat_interval": 1, "repeat_unit": "hour", "repeat_type": "hour" }
A set of schedules of online and batch deployment type. If this field is set, schedule field is ignored.
Examples:{ "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" } }
- schedules
Schedule for online deployment type
Examples:{ "repeat_interval": 1, "repeat_unit": "hour", "repeat_type": "hour" }
- online
The interval to monitor the target.
The type of interval to monitor the target.
Allowable values: [
minute
,hour
,day
,week
,month
,year
]Definition of first run time for scheduled activity; either absolute or relative the the moment of activation
Examples:{ "type": "relative", "delay_unit": "minute", "delay": 2 }
The type of interval to monitor the target.
The status of scheduler to trigger new evaluation based on configuration
Allowable values: [
enabled
,disabled
]
Schedule for batch deployment type
Examples:{ "repeat_interval": 1, "repeat_unit": "hour", "repeat_type": "hour" }
- batch
The interval to monitor the target.
The type of interval to monitor the target.
Allowable values: [
minute
,hour
,day
,week
,month
,year
]Definition of first run time for scheduled activity; either absolute or relative the the moment of activation
Examples:{ "type": "relative", "delay_unit": "minute", "delay": 2 }
The type of interval to monitor the target.
The status of scheduler to trigger new evaluation based on configuration
Allowable values: [
enabled
,disabled
]
Field to specify if scheduler should be created or not.
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
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
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
Monitor UI label (must be unique).
Example:
Quality extended metrics
A list of metric definition.
Available tags.
Long monitoring description presented in monitoring catalog.
JSON schema that will be used to validate monitoring parameters when enabled
- parameters_schema
The schedule used to control how frequently the target is monitored. The maximum frequency is once every 30 minutes. Defaults to once every hour if not specified.
Examples:{ "repeat_interval": 1, "repeat_unit": "hour", "repeat_type": "hour" }
A set of schedules of online and batch deployment type. If this field is set, schedule field is ignored.
Examples:{ "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" } }
- schedules
Schedule for online deployment type
Examples:{ "repeat_interval": 1, "repeat_unit": "hour", "repeat_type": "hour" }
- online
The interval to monitor the target.
The type of interval to monitor the target.
Allowable values: [
minute
,hour
,day
,week
,month
,year
]Definition of first run time for scheduled activity; either absolute or relative the the moment of activation
Examples:{ "type": "relative", "delay_unit": "minute", "delay": 2 }
The type of interval to monitor the target.
The status of scheduler to trigger new evaluation based on configuration
Allowable values: [
enabled
,disabled
]
Schedule for batch deployment type
Examples:{ "repeat_interval": 1, "repeat_unit": "hour", "repeat_type": "hour" }
- batch
The interval to monitor the target.
The type of interval to monitor the target.
Allowable values: [
minute
,hour
,day
,week
,month
,year
]Definition of first run time for scheduled activity; either absolute or relative the the moment of activation
Examples:{ "type": "relative", "delay_unit": "minute", "delay": 2 }
The type of interval to monitor the target.
The status of scheduler to trigger new evaluation based on configuration
Allowable values: [
enabled
,disabled
]
Field to specify if scheduler should be created or not.
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
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
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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" } ]'
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}'
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
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" } } ] }
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
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
dad3ed3f-db8d-4b35-b59e-7acad5348a3a
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-z0-9_\-]+
Example:
quality
Monitoring parameters consistent with the
parameters_schema
from the monitor definitionExamples:{ "monitorParam1": "value1", "monitorParam2": 2, "monitorParam3": { "field1": "fieldvalue1" }, "monitorParam4": [ "elem1", "elem2" ] }
- parameters
The schedule used to control how frequently the target is monitored. The maximum frequency is once every 30 minutes. Defaults to once every hour if not specified.
Examples:{ "repeat_interval": 1, "repeat_unit": "hour", "repeat_type": "hour" }
Summary about records count
Summary about records count
- total_records
The type of records time
Allowable values: [
payload_logging
,feedback
]timestamp of last consumed record (only for unprocessed_records)
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
- entity
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
dad3ed3f-db8d-4b35-b59e-7acad5348a3a
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-z0-9_\-]+
Example:
quality
- status
Possible values: [
preparing
,active
,failed
,deleting
,pending_delete
]- activity_status
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
c37c3c7c-67ae-48be-84bd-86cd2b25e618
Example:
/v2/activity_statuses/c37c3c7c-67ae-48be-84bd-86cd2b25e618
Monitoring parameters consistent with the
parameters_schema
from the monitor definitionExamples:{ "monitorParam1": "value1", "monitorParam2": 2, "monitorParam3": { "field1": "fieldvalue1" }, "monitorParam4": [ "elem1", "elem2" ] }
- parameters
The schedule used to control how frequently the target is monitored. The maximum frequency is once every 30 minutes. Defaults to once every hour if not specified.
Examples:{ "repeat_interval": 1, "repeat_unit": "hour", "repeat_type": "hour" }
Summary about records count
Summary about records count
- total_records
The type of records time
Possible values: [
payload_logging
,feedback
]timestamp of last consumed record (only for unprocessed_records)
Status Code
Monitoring enabled successfully
Monitoring configuration started
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
- entity
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
dad3ed3f-db8d-4b35-b59e-7acad5348a3a
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-z0-9_\-]+
Example:
quality
- status
Possible values: [
preparing
,active
,failed
,deleting
,pending_delete
]- activity_status
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
c37c3c7c-67ae-48be-84bd-86cd2b25e618
Example:
/v2/activity_statuses/c37c3c7c-67ae-48be-84bd-86cd2b25e618
Monitoring parameters consistent with the
parameters_schema
from the monitor definitionExamples:{ "monitorParam1": "value1", "monitorParam2": 2, "monitorParam3": { "field1": "fieldvalue1" }, "monitorParam4": [ "elem1", "elem2" ] }
- parameters
The schedule used to control how frequently the target is monitored. The maximum frequency is once every 30 minutes. Defaults to once every hour if not specified.
Examples:{ "repeat_interval": 1, "repeat_unit": "hour", "repeat_type": "hour" }
Summary about records count
Summary about records count
- total_records
The type of records time
Possible values: [
payload_logging
,feedback
]timestamp of last consumed record (only for unprocessed_records)
Status Code
Monitoring details retrieved successfully
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
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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
- entity
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
dad3ed3f-db8d-4b35-b59e-7acad5348a3a
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-z0-9_\-]+
Example:
quality
- status
Possible values: [
preparing
,active
,failed
,deleting
,pending_delete
]- activity_status
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
c37c3c7c-67ae-48be-84bd-86cd2b25e618
Example:
/v2/activity_statuses/c37c3c7c-67ae-48be-84bd-86cd2b25e618
Monitoring parameters consistent with the
parameters_schema
from the monitor definitionExamples:{ "monitorParam1": "value1", "monitorParam2": 2, "monitorParam3": { "field1": "fieldvalue1" }, "monitorParam4": [ "elem1", "elem2" ] }
- parameters
The schedule used to control how frequently the target is monitored. The maximum frequency is once every 30 minutes. Defaults to once every hour if not specified.
Examples:{ "repeat_interval": 1, "repeat_unit": "hour", "repeat_type": "hour" }
Summary about records count
Summary about records count
- total_records
The type of records time
Possible values: [
payload_logging
,feedback
]timestamp of last consumed record (only for unprocessed_records)
Status Code
Monitoring updated successfully
Monitoring update started
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'
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.
An identifier representing the source that triggered the run request (optional). One of: event, scheduler, user, webhook.
Allowable values: [
event
,scheduler
,user
,webhook
,bkpi_manager
]Monitoring parameters consistent with the
parameters_schema
from the monitor definitionExamples:{ "monitorParam1": "value1", "monitorParam2": 2, "monitorParam3": { "field1": "fieldvalue1" }, "monitorParam4": [ "elem1", "elem2" ] }
- parameters
The timestamp when the monitoring run was created with expiry date (in the format YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, matching the date-time format as specified by RFC 3339).
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
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" } }
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.
A page from a collection of monitoring runs.
- Examples:
{ "url": "https://server/path" }
- Examples:
{ "url": "https://server/path" }
- Examples:
{ "url": "https://server/path" }
- Examples:
{ "url": "https://server/path" }
The number of monitoring runs requested to be returned.
The total number of monitoring runs available.
Status Code
Got history of monitoring runs
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
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
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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
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
Example:
2018-11-21T09:37:55.523Z
Metrics grouped for a single measurement
- metrics
ID of the monitoring run which produced the measurement
The sources of the metric
Revision number of the ML model or function used by the monitor
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" } ]'
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
andexists
. Sample filters are:filter=region:in:[us,pl],segment:eq:sales
orfilter=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
- measurements
Beginning of the time range
End of the time range
Maximum number of measurements returned
Example:
10
Offset of measurements returned
Status Code
Measurements data queried successfully. For measurement POSTed with v1, value of
issue_count
andrun_id
property will benull
.
Measurements data queried successfully. For measurement POSTed with v1, value of
issue_count
andrun_id
property will benull
.{ "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
- entity
Metrics grouped for a single measurement
Number of the metrics with issues, which exceeded limits
Example:
2
ID of the monitoring run which produced the measurement
Revision number of the ML model or function used by the monitor
Example:
quality
The sources of the metric
Status Code
Measurement data retrieved successfully
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
andexists
. Sample filters are:monitor_definition_id.filter=region:in:[us,pl],monitor_definition_id.segment:eq:sales
orfilter=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 tocompact
is additive and containssources
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
- measurements
Status Code
Measurements data queried successfully
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 aggregationsAllowable 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
andexists
. Sample filters are:filter=region:in:[us,pl],segment:eq:sales
orfilter=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
Floored to full interval
Ceiled to full interval
- groups
- tags
- metrics
- last
- first
- sum
- avg
- min
- max
- median
- count
- stddev
Status Code
Metric data queried successfully
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" }
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
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" } } ] }
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
The name of the Integrated System.
Allowable values: [
open_pages
,slack
,webhook
,hive
,spark
,jdbc
,custom_metrics_provider
,watson_knowledge_catalog
,generative_ai_evaluator
,embeddings_provider
]The description of the Integrated System.
The credentials for the Integrated System
- credentials
The additional connection information for the Integrated System
Access control list of group id of Cloud Pak for Data (Only available for open_pages type and OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)
Examples:[ "10000", "10001" ]
Access control list of user id of Cloud Pak for Data (Only available for open_pages type and OpenScale on Cloud Pak for Data >= 4.0.6 with ENABLE_GROUP_AUTH being true)
Examples:[ "1000330999", "1000331301" ]
Additional parameters
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
Integrated System definition
Status Code
Integrated System successfully created.
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
Integrated System definition
Status Code
Integrated System details retrieved successfully
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
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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
Integrated System definition
Status Code
Integrated System updated successfully
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}'
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}'
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
The name of the Operational Space.
The description of the Operational Space.
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
Operational Space definition
Status Code
Operational Space successfully created.
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" } }
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
Operational Space definition
Status Code
Operational Space details retrieved successfully
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
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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
Operational Space definition
Status Code
Operational Space updated successfully
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}'
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}'
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
The operation to be performed
Allowable values: [
add
,remove
,replace
,move
,copy
,test
]A JSON-Pointer
The value to be used within the operations.
A string containing a JSON Pointer value.
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" } ]'
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}'
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 '{}'
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}'
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.
IDs of the scoring transaction
Examples:[ "scoring_id1", "scoring_id2" ]
List of scoring transactions
Examples:[ { "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" } ]
- input_rows
Types of explanations to generate
Allowable values: [
lime
,contrastive
]Unique subscription ID
Example:
c37c3c7c-67ae-48be-84bd-86cd2b25e618
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
Metadata of post explanation tasks response
Status Code
Explanation request submitted successfully
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" ] } }
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
Total number of computed explanations
Example:
10
Maximum number of returned explanations
Example:
5
Offset of returned explanations
Example:
2
The list of explanation fields
Examples:[ "explanation_task_id", "scoring_id", "created_at", "finished_at", "status", "prediction", "subscription_id", "deployment_id", "asset_name", "deployment_name" ]
The list of explanation values
Examples:[ [ "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" ] ]
Status Code
Explanations successfully retrieved
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
Metadata of get explanation task response
Entity of get explanation task response
Status Code
Explanation successfully retrieved
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" } }
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
Secret
- credentials
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
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" } }
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
{ "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" } } ] }
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
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" } }
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}'
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" } }'
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
required number of units
Example:
1000
request time
a minimal accepted number of units, if not set, amount is used
Example:
50
a type of usage. If not set, amount is incremented by specified amount. If absolute is set, specified amount will be registered.
Allowable values: [
absolute
,relative
]Default:
relative
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" }'
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
Example:
crn:v1:bluemix:public:aiopenscale:us-south:a/59bcbfa6ea2f006b4ed7094c1a08dcdd:1a0ec336-f391-4091-a6fb-5e084a4c56f4::
Status Code
OK
{ "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
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}'
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}'
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
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}'
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}'
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 {}
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 {}
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}'
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
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
Example:
struct
Spark struct field
- fields
Status Code
The given file was successfully parsed.
{ "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
The unique ID for the MRM evaluation.
The date time stamp in UTC ISO format for the MRM evaluation.
Flag to decide whether to send evaluated metrics to OpenPages.
Comma separated list of monitor tests to run.
Time stamp of the evaluation.
- status
The state of the upload data.
Status Code
Request accepted for risk evaluations.
Bad Request.
Unauthorized.
Internal Server Error.
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
- metadata
Status Code
Risk evaluation run canceled successfully.
Bad Request.
Unauthorized.
Internal Server Error.
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
- metadata
Status Code
Gets the latest risk evaluations runs detail.
Bad Request.
Unauthorized.
Internal Server Error.
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 }'
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}'
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}'
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" }'
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}'
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
The name of the column containing the ground truth or actual labels.
The rank of the environment in which the monitoring is happening. Accepted values are
development
,pre_production
,production
.The task type to monitor for the given prompt template asset.
The input data type.
The classification type
binary
/multiclass
applicable only forclassification
problem (task) type.The list of prompt variables containing the context. Applicable only for Retrieval-Augmented Generation problem type.
The prompt variable containing the question. Applicable only for Retrieval-Augmented Generation problem type.
The list of meta-fields for the prompt.
- monitors
- monitor_definition_id
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
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
1c133af3-5115-4f31-8376-6975434288c8
The date-timestamp when the prompt setup was started.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
c5b95e10-d422-42f9-ba14-566fecfd550c
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
fa883e36-1bdf-445c-b66e-431b3fa49f10
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
075ef77c-3211-4098-bc7f-9ae783df6306
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
348845a2-0099-45d1-a050-5960bb563249
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
c37c3c7c-67ae-48be-84bd-86cd2b25e618
The MRM monitor instance ID.
The date-timestamp when the prompt setup ended.
Status Code
Prompt setup request accepted successfully.
Bad Request.
Unauthorized.
Internal Server Error.
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
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
1c133af3-5115-4f31-8376-6975434288c8
The date-timestamp when the prompt setup was started.
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
c5b95e10-d422-42f9-ba14-566fecfd550c
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
fa883e36-1bdf-445c-b66e-431b3fa49f10
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
075ef77c-3211-4098-bc7f-9ae783df6306
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
348845a2-0099-45d1-a050-5960bb563249
Possible values: 1 ≤ length ≤ 64, Value must match regular expression
[a-z0-9_\-]+
Example:
c37c3c7c-67ae-48be-84bd-86cd2b25e618
The MRM monitor instance ID.
The date-timestamp when the prompt setup ended.
Status Code
The status of the prompt setup returned successfully.
Bad Request.
Unauthorized.
Internal Server Error.
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
- metadata
- entity
Status Code
Notification preferences updated successfully.
Bad Request.
Unauthorized.
Internal Server Error.
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
- metadata
- entity
Status Code
Notification preferences returned successfully.
Bad Request.
Unauthorized.
Internal Server Error.
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
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"
}
}
}
The text to be examined.
The detectors to use, these can be IBM provided
HAP
orPII
detectors or a custom content detector.- detectors
The detectors to use, this is a map of
detector-name
with a map of optional key/value pairs.- any property
The optional key/value pairs for the detector.
- any property
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.
The text that was detected.
Possible values: number of items ≥ 0
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.
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 } ] }