Help Center/ ServiceStage/ API Reference/ Application Management V3 APIs/ Component/ Obtaining Records Based on the Component ID
Updated on 2024-10-16 GMT+08:00

Obtaining Records Based on the Component ID

Function

This API is used to obtain records based on the component ID.

URI

GET /v3/{project_id}/cas/applications/{application_id}/components/{component_id}/records

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant's project ID. See Obtaining a Project ID.

application_id

Yes

String

Application ID. See Obtaining All Applications.

component_id

Yes

String

Component ID. See Obtaining All Components of an Application.

Table 2 Query parameter

Parameter

Mandatory

Type

Description

limit

No

String

Number of records to be queried. Value range: 0–100.

offset

No

String

Offset.

order_by

No

String

Sorting field. By default, query results are sorted by creation time.

Enumerated values: create_time, name, and update_time.

order

No

String

Sorting order.

  • desc (default)
  • asc

Request

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). Default value: application/json;charset=utf8.

X-Auth-Token

Yes

String

API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain a token, see Obtaining a User Token.

Response

Table 4 Response parameters

Parameter

Type

Description

count

Integer

Total number of records.

records

Array of objects

Record list. See Table 5.

Table 5 records parameters

Parameter

Type

Description

begin_time

String

Start time.

end_time

String

End time.

description

Object

Description.

instance_id

String

Instance ID.

version

String

Version number.

current_used

Boolean

Currently used parameter.

status

String

Status.

deploy_type

String

Deployment type.

  • OneBatchRelease
  • RollingRelease
  • GrayRelease

jobs

Array of objects

Task list. See Table 6.

Table 6 jobs

Parameter

Type

Description

sequence

Integer

Execution sequence.

deploy_type

String

Deployment type.

  • OneBatchRelease
  • RollingRelease
  • GrayRelease

job_id

String

Job ID.

job_info

Object

Task information. See Table 7.

Table 7 job_info

Parameter

Type

Description

deploy_type

String

Deployment type.

source_url

String

Component source.

first_batch_weight

Integer

First execution weight.

first_batch_replica

Integer

Component instances deployed first time.

replica

Integer

Total instances.

remaining_batch

Integer

Remaining batch.

Example Request

None

Example Response

{
  "count": 10,
  "records": [
    {
      "begin_time": "string",
      "end_time": "string",
      "description": null,
      "instance_id": "string",
      "version": "string",
      "current_used": true,
      "status": "string",
      "deploy_type": "string",
      "jobs": [
        {
          "sequence": 0,
          "deploy_type": "string",
          "job_id": "string",
          "job_info": {
            "deploy_type": "string",
            "source_url": "string",
            "first_batch_weight": 0,
            "first_batch_replica": 0,
            "replica": 0,
            "remaining_batch": 0
          }
        }
      ]
    }
  ]
}

Status Code

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

The error code format is SVCSTG.00100.[Error_ID], for example, SVCSTG.00100400. For details, see ServiceStage Error Codes.