To access REST APIs for model evaluations, you must have an API key and a data mart ID, also known as a service instance. The Platform API key gives an individual user the ability to access resources in the IBM Cloud.
For enterprise accounts, an administrator can create the data mart, invite users into the account, and give those users access to a specific data mart. A user can then create their own API key, and can access the same data mart without conflict or security risk.
Creating the API key
To create an IBM Cloud API key, complete the following steps:
- Log in to IBM Cloud.
- Select Manage > Access (IAM) > IBM Cloud API Keys
- Click Create an IBM Cloud API key.
- Give your key a name and description and click Create.
Finding service IDs:
Find your data mart, deployment, subscription, or binding IDs, on the Payload logging page, which is shown when you select Configure monitors for a deployment.
- Click the model deployment tile.
- Click Configure monitors
.
- Click Endpoints.
- On the Model information tab, in the Integration details pane, find an ID, such as the Datamart ID.
Creating service instance credentials by using the command console
To create credentials for model evaluations, complete the following steps by using the IBM Cloud command console:
-
Retrieve your API key by running the following command:
ibmcloud login --sso ibmcloud iam api-key-create 'my_key'
The following information displays:
Name my_key Created At 2018-10-09T14:04+0000 API Key Tg4Gxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxQU-nE Locked false UUID ApiKey-xxxxxxxxx-afd7-xxxxx-b0e1-xxxxxxxxxxx
-
Verify the Resource Group that you are using in your IBM Cloud account.
- Go to the Dashboard.
- From the navigation menu, click Resource list.
- From the Group column, click the Filter by group or organization drop-down selection and set the Default checkbox.
If you are not using the
Default
resource group, then run the following command to get your credential for model evaluations:ibmcloud target -g myResourceGroup
Where
myResourceGroup
is the name of the resource group that is associated with your service instance. -
Retrieve your service instance ID by running the following command:
ibmcloud resource service-instance '<Your_Watson_OpenScale_instance_name>'
If you are using the IBM Cloud command console on Windows, replace the single quotation marks (') in the preceding commands with double quotation marks (").
The following information displays:
Name: AI OpenScale-my_instance ID: crn:v1:ibmcloud:public:aiopenscale:us-south:a/c2f2xxxxxxxxxxxx867:: GUID: 03daxxxx-xxxx-xxxx-xxxx-xxxxxxxx38a7 Location: us-south Service Name: aiopenscale Service Plan Name: lite Resource Group Name: Default State: active Type: service_instance Sub Type: Tags: Created at: 2018-09-17T13:58:43Z Updated at:
The
GUID
value is your service instance ID.
Next steps
Defining the input and output schema by using the Python Client or REST API