Updated on 2023-11-27 GMT+08:00

Querying Resource Packages in a Group (Discarded)

Function

This API is used to query resource information of a package group in a Project.

This API has been discarded and is not recommended.

URI

  • URI format

    GET /v2.0/{project_id}/resources/{resource_name}

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.

    resource_name

    Yes

    String

    Name of the resource package that is uploaded.

    Table 2 query parameter description

    Parameter

    Mandatory

    Type

    Description

    group

    No

    String

    Name of the package group returned when the resource package is uploaded.

    The following is an example of the URL containing the query parameter:

    GET /v2.0/{project_id}/resources/{resource_name}?group={group}

Request

None

Response

Table 3 Response parameters

Parameter

Type

Description

create_time

Long

UNIX time when a resource package is uploaded. The timestamp is expressed in milliseconds.

update_time

Long

UNIX time when the uploaded resource package is uploaded. The timestamp is expressed in milliseconds.

resource_type

String

Resource type.

resource_name

String

Resource name.

status

String

  • Value UPLOADING indicates that the resource package group is being uploaded.
  • Value READY indicates that the resource package has been uploaded.
  • Value FAILED indicates that the resource package fails to be uploaded.

underlying_name

String

Name of the resource packages in a queue.

owner

String

Owner of a resource package.

Example Request

None

Example Response

{
    "create_time": 1522055409139,
    "update_time": 1522228350501,
    "resource_type": "jar",
    "resource_name": "luxor-ommanager-dist.tar.gz",
    "status": "uploading",
    "underlying_name": "7885d26e-c532-40f3-a755-c82c442f19b8_luxor-ommanager-dist.tar.gz"
}

Status Codes

Table 4 describes the status code.

Table 4 Status codes

Status Codes

Description

200

The query is successful.

400

Request error.

500

Internal service error.

Error Codes

If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Codes.