Queries a project based on the project name.
Request syntax
GET / HTTP/1.1
Authorization: <AuthorizationString>
x-log-bodyrawsize: 0
User-Agent: <UserAgent>
x-log-apiversion: 0.6.0
Host: <Project Endpoint>
x-log-signaturemethod: hmac-sha1
Date: <GMT Date>
Content-Type: application/x-protobuf
Connection: Keep-Alive
Request parameters
- Request headers
The GetProject operation does not have operation-specific request headers. For information about the common request headers of Log Service API operations, see Common request headers.
- Parameters
Parameter Type Required Example Description projectName string Yes my-project-test The name of the project. The name is a part of the Host parameter in the header.
Response parameters
- Response headers
The GetProject operation does not have operation-specific response headers. For information about the common response headers of Log Service API operations, see Common response headers.
- Response elements
If the GetProject request succeeds, the HTTP status code 200 is returned. The response body contains the detailed information of the project. The following table describes the parameters of the response body.
Parameter Type Description createTime string The time when the project was created. description string The description of the project. lastModifyTime string The time when the project was last modified. owner string The ID of the account that was used to create the project. projectName string The name of the project. status string The status of the project. region string The region to which the project belongs.
Examples
- Sample requests
GET / HTTP/1.1 Authorization: LOG <yourAccessKeyId>:<yourSignature> x-log-bodyrawsize: 0 User-Agent: sls-java-sdk-v-0.6.1 x-log-apiversion: 0.6.0 Host: my-project-test.cn-shanghai.log.aliyuncs.com x-log-signaturemethod: hmac-sha1 Date: Sun, 27 May 2018 08:25:04 GMT Content-Type: application/x-protobuf Connection: Keep-Alive
- Sample success responses
HTTP/1.1 200 Server: nginx Content-Length: 0 Connection: close Access-Control-Allow-Origin: * Date: Sun, 27 May 2018 08:25:04 GMT x-log-requestid: 5B0A6B60BB6EE39764D458B5
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | ProjectNotExist | The Project does not exist : {Project} | The error message returned because the specified project does not exist. |
500 | InternalServerError | Specified Server Error Message | The error message returned because an internal server error has occurred. |
For more information about the error codes, see Common error codes.