Retrieve the project list under the account - GetProjectList
Overview
Get Project List
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetProjectList . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
IsFinance | string | Is it a financial account? (Yes: Yes, No: No) | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
ProjectCount | int | Total Number of Projects | Yes |
ProjectSet | array[ProjectListInfo] | Instance list of projects in JSON format | Yes |
Data Model
ProjectListInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
ProjectId | string | Project ID | Yes |
ProjectName | string | Project Name | Yes |
CreateTime | int | Creation Time (Unix Timestamp) | Yes |
IsDefault | boolean | Is it the default project? | Yes |
ResourceCount | int | Number of resources under the project (Deprecated, not recommended for use) | Yes |
MemberCount | int | Number of members in the project | Yes |
ParentId | string | Parent Project ID (Deprecated) | No |
ParentName | string | Parent Project Name (Deprecated) | No |
Example
Request Example
https://api.surfercloud.com/?Action=GetProjectList
Response Example
{
"Action": "GetProjectListResponse",
"ProjectCount": 2,
"ProjectSet": [
{
"CreateTime": 1342434682,
"IsDefault": true,
"MemberCount": 1,
"ProjectId": "org-1",
"ProjectName": "ucloud",
"ResourceCount": 52
},
{
"CreateTime": 1468225814,
"IsDefault": false,
"MemberCount": 0,
"ProjectId": "org-2",
"ProjectName": "test",
"ResourceCount": 10
}
],
"RetCode": 0
}