IBM Watson Studio provides you with the environment and tools to solve your business problems by collaboratively working with data.

This blog post is a follow-up to my previous post, “How to Access Watson Studio Assets by API.” In that article, I showed you how to retrieve an access token and access Watson Studio assets via API from the command line. 

One useful scenario is to use this method to cancel a running job scheduled from IBM Watson Studio. It’s quite common for users to schedule a job with a Python Notebook from Watson Studio. In rare cases, users are not able to delete the job from the web console, so I’m going to detail a way to delete the job via the command line.

Step-by-step instructions

  1. Get the access token by following the instructions in “How to Access Watson Studio Assets by API.”
  2. Find the asset_id of the running job from the web console. To find it, we’ll need to use the Developer Tool provided in the Google Chrome browser. To get the job-run’s asset_id, go to the Job Details page, inspect network, and search for “runs”. The asset_id can be found in the metadata field:
  3. Once you have the asset_id, use the following command to verify the details of the running job:
    project_id="<project id>"
    asset_id="<asset id>"
    curl -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H "$(cat wml_token.txt)" \
    -X GET "${end_point}/v2/assets/${asset_id}?project_id=${project_id}"

    It’s a good idea to save the command into a script for future use. Please refer to the instructions in “How to Access Watson Studio Assets by API” to get the details of an asset. Sample output:

  4. Once you’ve confirmed the job details, you can cancel the job by deleting the asset with the following command:
    curl -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H "$(cat wml_token.txt)" \
    -X DELETE "${end_point}/v2/assets/${asset_id}?project_id=${project_id}"

By now, the run job should have been cancelled.


The Watson Data API provides a comprehensive list of functions to manage the assets, and most GUI interface-based functions can also be implemented with the API command line. However, in some cases, users have to use the API to manage certain task, as demonstrated in this post.

You can also follow these guidelines to access other assets in Watson Studio, such as projects, catalogs, buckets, etc. For further information on the API, please refer to the online documentation at IBM Watson Data API.

More from Cloud

Level up your Kafka applications with schemas

4 min read - Apache Kafka is a well-known open-source event store and stream processing platform and has grown to become the de facto standard for data streaming. In this article, developer Michael Burgess provides an insight into the concept of schemas and schema management as a way to add value to your event-driven applications on the fully managed Kafka service, IBM Event Streams on IBM Cloud®. What is a schema? A schema describes the structure of data. For example: A simple Java class…

SSD vs. NVMe: What’s the difference?

7 min read - Recent technological advancements in data storage have prompted businesses and consumers to move away from traditional hard disk drives (HDDs) towards faster, lower-latency solid-state drive (SSD) technology. In this post, we’re going to look at this new technology, as well as the fastest and most popular protocol available to connect it to a computer’s motherboard—non-volatile memory express (NVMe). While the terms SSD and NVMe are often used to describe two different types of drives, they are actually different data storage…

Business leaders highlight the need for a hybrid cloud approach to unlock the power of generative AI

3 min read - In 2023, organizations have faced an unprecedented level of pressure to digitally transform with the rise of generative AI as well as imperatives such as sustainability, labor productivity and security. The “Cloud Transformation Report,” a new global survey from the IBM Institute for Business Value (IBV), found that many leading enterprises share a common foundation to digital transformation—a clear hybrid cloud strategy.¹ These businesses cite several key benefits to using a hybrid cloud approach to fuel business transformation, including modernization,…

An introduction to Wazi as a Service

4 min read - In today's hyper-competitive digital landscape, the rapid development of new digital services is essential for staying ahead of the curve. However, many organizations face significant challenges when it comes to integrating their core systems, including Mainframe applications, with modern technologies. This integration is crucial for modernizing core enterprise applications on hybrid cloud platforms. Shockingly, a staggering 33% of developers lack the necessary skills or resources, hindering their productivity in delivering products and services. Moreover, 36% of developers struggle with the…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters