Help Center> RES> API Reference> API> Workspace> Querying the Enterprise Project List

Querying the Enterprise Project List

Function

This API is used to query the enterprise project list of a user in the current project. An enterprise project ID is required when you create a workspace.

URI

GET /v2.0/{project_id}/enterprise-projects

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details on how to obtain the project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Content type. The value is application/json.

X-Auth-Token

Yes

String

User token. For details on how to obtain the user token, see Obtaining a User Token Through Password Authentication.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

enterprise_projects

Array of enterprise_projects objects

Enterprise project list

is_success

Boolean

Whether the request is successful

message

String

Response message (This field is not returned when the request is successful.)

error_code

String

Error code (This parameter is not returned when the request is successful.)

Table 4 enterprise_projects

Parameter

Type

Description

created_at

String

Creation time

description

String

Description

id

String

Enterprise project ID

name

String

Name of an enterprise project

status

Integer

Status

updated_at

String

Update time

Example Requests

This API is used to query an enterprise project.

/v2.0/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/enterprise-projects

-

Example Responses

Status code: 200

OK

{
  "is_success" : true,
  "enterprise_projects" : [ {
    "id" : "0",
    "name" : "default",
    "status" : 1
  }, {
    "id" : "f785ffdf13bd-4e6cbdf614f2d5ec7f78",
    "name" : "res-developer",
    "description" : "res-developer-test",
    "status" : 1,
    "created_at" : "2019-12-12T06:41:26Z",
    "updated_at" : "2019-12-12T06:41:26Z"
  }, {
    "id" : "5d1c5366e616426a88b70f80c1873f18",
    "name" : "w1",
    "status" : 1,
    "created_at" : "2019-12-10T01:51:08Z",
    "updated_at" : "2019-12-10T01:51:08Z"
  }, {
    "id" : "a82d585fdb934850aedc06e4e534f1b8",
    "name" : "project1",
    "status" : 1,
    "created_at" : "2019-09-25T07:07:11Z",
    "updated_at" : "2019-09-25T07:07:11Z"
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.