When calling Model Studio apps, such as Agent and Workflow , via an API, you must provide credentials to identify the target app and its workspace:
- App ID: Required for all API calls to identify the target app.
- Workspace ID: Required when calling from the Germany (Frankfurt), China (Beijing), Japan (Tokyo), Singapore, or China (Hong Kong) region, because the Workspace ID is part of the Base URL. For details, see Select region and service scope.
Currently, you can only obtain the App ID and Workspace ID manually from the console. API and CLI queries for these IDs are not supported.
Get the App ID
When you call any app via an API, you must provide its unique App ID.
- Go to the App Management page.
- In the app list, find your target app and copy its
App ID.
Get the Workspace ID
Workspace ID is the unique identifier for a workspace. An API request must include the Workspace ID when calling from the Germany (Frankfurt), China (Beijing), Japan (Tokyo), Singapore, or China (Hong Kong) region, because the Workspace ID is part of the Base URL for these regions.
Get the current workspace ID
This section describes how to quickly find the ID of your current workspace.
- Go to the Model Studio console home page and select the target region.
- Click the
icon in the upper-right corner of the page. - In the dialog box that appears, you can view and copy the Workspace ID.
By default, a RAM sub-account can only view the IDs of the workspaces that it has joined.
Query all workspace IDs
This procedure is for querying or managing all workspaces under a main account. Only a super administrator can perform this task.
- Log in to the Model Studio console using a main account or an authorized sub-account.
- Click the
icon in the top-right corner to go to the Workspace Management page. - In the Workspace ID column, view and copy the ID of the desired workspace.