Updated on 2022-12-08 GMT+08:00

Querying the Enterprise Project List

Function

This API is used to query the list of enterprise projects that can be managed by a user. The user can add resources to an enterprise project in the list.

URI

GET /v1.0/enterprise-projects

Request

  • Parameter description
    Table 1 Parameters in the request

    Name

    Mandatory

    Type

    Location

    Description

    id

    No

    String

    query

    Specifies the ID of an enterprise project. The value 0 indicates enterprise project default.

    limit

    No

    Interger

    query

    Specifies the number of records to be queried. The default value is 1000. The maximum value is 1000, and the minimum value is 1.

    name

    No

    String

    query

    Specifies the enterprise project name. Fuzzy search is supported.

    offset

    No

    Interger

    query

    Specifies the index position, which starts from the next data record specified by offset. The value must be a number and cannot be a negative number. The default value is 0.

    sort_dir

    No

    String

    query

    Specifies the result sorting order. The default value is desc.

    • desc: Results are sorted in descending order.
    • asc: Results are sorted in ascending order.

    sort_key

    No

    String

    query

    Specifies the keyword by which the results to return are sorted. Keywords such as updated_at are supported. By default, the keyword created_at is used.

    status

    No

    Integer

    query

    Specifies the enterprise project status.

    • 1: The enterprise project is enabled.
    • 2: The enterprise project is disabled.
  • Example request
    GET https://{EPS endpoint}/v1.0/enterprise-projects?name=prise_pro

Response

  • Parameter description
    Table 2 Parameters in the response

    Name

    Type

    Description

    enterprise_projects

    List<enterprise_project>

    Specifies the enterprise project list.

    For details, see Table 3.

    total_count

    Integer

    Specifies the total number of enterprise projects that meet the query conditions.

  • enterprise_project field data structure
    Table 3 enterprise_project field data structure description

    Name

    Type

    Description

    id

    String

    Specifies the enterprise project ID.

    name

    String

    Specifies the enterprise project name.

    description

    String

    Specifies the description of the enterprise project.

    status

    Integer

    Specifies the enterprise project status.

    • 1: The enterprise project is enabled.
    • 2: The enterprise project is disabled.

    created_at

    String

    Specifies the time (UTC) when the enterprise project was created.

    Example: 2018-05-18T06:49:06Z

    updated_at

    String

    Specifies the time (UTC) when the enterprise project was modified.

    Example: 2018-05-28T02:21:36Z

  • Example response
    {
        "enterprise_projects": [
            {
                "id": "6fbcf2f3-3164-4d32-9a3e-a8886dc38c24",
                "name": "auto_test",
                "description": "hello world!",
                
                "status": 1,
                "created_at": "2018-05-18T06:49:06Z",
                "updated_at": "2018-05-28T02:21:36Z"
            }
        ],
        "total_count": 1
    }

Status Codes

For details, see Status Code.

Error Codes

For details, see Error Codes.