Help Center/ CodeArts Req/ API Reference/ Application Examples/ Example 1: Obtaining the Project List of CodeArts Req
Updated on 2023-06-12 GMT+08:00

Example 1: Obtaining the Project List of CodeArts Req

Scenario

This section uses the test001 user as an example to describe how to use an API to query the project list of the current user.

For details about how to call APIs, see Calling APIs.

Constraints

Ensure that the test001 user has created or participated in a CodeArts Req project.

Involved API

Query project information of the current user based on the user token.

URI: GET /v4/projects

For details about the API document, see "Querying the Project List."

For details about online API Explorer debugging, see "Querying the Project List."

Procedure

  • Request example
    GET  https://projectman-ext.ap-southeast-3.myhuaweicloud.com/v4/projects?project_type=scrum&search=ProjectTestCase&offset=0&limit=1
  • Response example
    {
    "projects": [
            {
    "project_num_id": 3844012,
    "project_id": "ec147b681fb64e019a6bcd73ebdf3597",
    "project_name": "ProjectTestCaseYRXl",
    "description": "fdas",
    "created_time": 1600417972000,
    "updated_time": 1600417972000,
    "project_type": "scrum",
    "creator": {
    "user_num_id": 4090,
    "user_id": "665b542eb4c14b53a15ead449f28b0ba",
    "user_name": "test001",
    "domain_id": "70d11a2d7275425689347ec104af2ad8",
    "domain_name": "projectman_l00382124_01",
    "nick_name": "Captain Britain"
                }
            }
        ],
    "total": 48
    }