Querying Workspaces
Function
This API is used to query workspaces.
You can only view workspaces that are accessible within your authorized permissions.
URI
GET /v1/{project_id}/instances/{instance_id}/workspaces
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
Yes |
String |
Instance ID. |
project_id |
Yes |
String |
Project ID. For how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Workspace name. Fuzzy search is supported. Value range: [0, 100] |
offset |
No |
Integer |
Start offset of returned entries. Value range: [0, 2147483647] Default value: 0 |
limit |
No |
Integer |
Number of returned entries. If not transferred, the first 10 records are queried by default. Value range: [0, 2147483647] Default value: 10 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Obtain a user token by calling IAM's API. X-Subject-Token in the response header is the desired user token. For how to obtain a token, see Authentication. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Total number of entries. |
page_data |
Array of objects |
Data on the current page. The element type is WorkspaceVO. For parameter types, see WorkspaceVO. |
Parameter |
Type |
Description |
---|---|---|
configs |
Map<String,String> |
configs. |
create_time |
Long |
Workspace creation time. |
create_user |
String |
Workspace creator. |
description |
String |
Workspace description. |
domain_id |
String |
Domain ID. |
eps_id |
String |
ID of the enterprise project the workspace belongs to. |
id |
String |
Workspace ID. |
instance_id |
String |
Instance ID. |
is_default |
Integer |
Whether to set the workspace as the default one. The value can be 0 or 1. |
name |
String |
Workspace name. |
owner_name |
String |
Workspace owner name. |
project_id |
String |
ID of the project the workspace belongs to. |
update_time |
Long |
Workspace update time. |
update_user |
String |
User who updates the workspace. |
Example Request
Query workspaces under a project.
/v1/{project_id}/instances/{instance_id}/workspaces?offset=0&limit=10name=
Example Response
{ "count" : 17, "page_data" : [ { "configs" : { "mode": "0", "worksAuthorized": "0", "worksPublic": "1", "onlyAdminCreateDatasource": "0", "isPin": "1", "fieldShowType": "0", "worksView": "0" }, "create_time" : 1676984980510, "create_user" : "xxxxxx", "description" : "Description workspace information", "domain_id" : "xxxxxxx", "eps_id" : "xxxxxxxxxx", "id" : "xxxxxxxxxxxxx", "instance_id" : "xxxx7d17c41c414dabaa08f47c7dxxxx", "is_default" : 1, "name" : "Example workspace name", "owner_name" : "xxxxxx", "project_id" : "xxxxxxxb4dac4055888643b3xxxxxx", "update_time" : 1687167926377, "update_user" : "xxxxxxxx" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot