pythonrestibm-cloudworkload-scheduler

Bluemix Workload Scheduler REST API


I am trying to use the REST API for the Workload Scheduler.
When I try to list the existing process libraries using HTTP GET, I see the following message:

HTTP Error 401: Unauthorized

I am using basic authentication with the service credentials that are displayed in the Bluemix dashboard. The client I am using to perform this action is Ansible and its URI module.

Additionally, I tried to use the python API, but the swagger_client library cannot be imported because of indentation errors.

So, Is there an issue with using the REST API directly or do I need to use other credentials and where do I get those credentials?

I was able to successfully login once using the Composer and hybrid UI credentials in Ansible. However, I would like to use a technical user and not my own account, which I am currently using for testing purposes only.


Solution

  • you could try to use the REST API directly without the basic authentication and get the userID, password, tenantID, engnineName and engineOwner as displayed in Bluemix dashboard.

    enter image description here

    Moreover, you could also generate a new credential from Service Credential tab in the Workload Scheduler Dashboard, but unfortunately the generated user/password will be always the same.

    enter image description here