All URIs are relative to http://localhost/api/v2.0
Method | HTTP request | Description |
---|---|---|
CreateRetention | Post /retentions | Create Retention Policy |
DeleteRetention | Delete /retentions/{id} | Delete Retention Policy |
GetRentenitionMetadata | Get /retentions/metadatas | Get Retention Metadatas |
GetRetention | Get /retentions/{id} | Get Retention Policy |
GetRetentionTaskLog | Get /retentions/{id}/executions/{eid}/tasks/{tid} | Get Retention job task log |
ListRetentionExecutions | Get /retentions/{id}/executions | Get Retention executions |
ListRetentionTasks | Get /retentions/{id}/executions/{eid}/tasks | Get Retention tasks |
OperateRetentionExecution | Patch /retentions/{id}/executions/{eid} | Stop a Retention execution |
TriggerRetentionExecution | Post /retentions/{id}/executions | Trigger a Retention Execution |
UpdateRetention | Put /retentions/{id} | Update Retention Policy |
CreateRetention(ctx, policy, optional) Create Retention Policy
Create Retention Policy, you can reference metadatas API for the policy model. You can check project metadatas to find whether a retention policy is already binded. This method should only be called when no retention policy binded to project yet.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
policy | RetentionPolicy | Create Retention Policy successfully. | |
optional | *RetentionApiCreateRetentionOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RetentionApiCreateRetentionOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteRetention(ctx, id, optional) Delete Retention Policy
Delete Retention Policy, you can reference metadatas API for the policy model. You can check project metadatas to find whether a retention policy is already binded. This method should only be called when retention policy has already binded to project.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int64 | Retention ID. | |
optional | *RetentionApiDeleteRetentionOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RetentionApiDeleteRetentionOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RetentionMetadata GetRentenitionMetadata(ctx, optional) Get Retention Metadatas
Get Retention Metadatas.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *RetentionApiGetRentenitionMetadataOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RetentionApiGetRentenitionMetadataOpts struct
Name | Type | Description | Notes |
---|---|---|---|
xRequestId | optional.String | An unique ID for the request |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RetentionPolicy GetRetention(ctx, id, optional) Get Retention Policy
Get Retention Policy.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int64 | Retention ID. | |
optional | *RetentionApiGetRetentionOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RetentionApiGetRetentionOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string GetRetentionTaskLog(ctx, id, eid, tid, optional) Get Retention job task log
Get Retention job task log, tags ratain or deletion detail will be shown in a table.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int64 | Retention ID. | |
eid | int64 | Retention execution ID. | |
tid | int64 | Retention execution ID. | |
optional | *RetentionApiGetRetentionTaskLogOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RetentionApiGetRetentionTaskLogOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request |
string
- Content-Type: application/json
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]RetentionExecution ListRetentionExecutions(ctx, id, optional) Get Retention executions
Get Retention executions, execution status may be delayed before job service schedule it up.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int64 | Retention ID. | |
optional | *RetentionApiListRetentionExecutionsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RetentionApiListRetentionExecutionsOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request | page | optional.Int64| The page number. | pageSize | optional.Int64| The size of per page. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]RetentionExecutionTask ListRetentionTasks(ctx, id, eid, optional) Get Retention tasks
Get Retention tasks, each repository as a task.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int64 | Retention ID. | |
eid | int64 | Retention execution ID. | |
optional | *RetentionApiListRetentionTasksOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RetentionApiListRetentionTasksOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request | page | optional.Int64| The page number. | pageSize | optional.Int64| The size of per page. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OperateRetentionExecution(ctx, id, eid, body, optional) Stop a Retention execution
Stop a Retention execution, only support "stop" action now.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int64 | Retention ID. | |
eid | int64 | Retention execution ID. | |
body | Body1 | The action, only support "stop" now. | |
optional | *RetentionApiOperateRetentionExecutionOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RetentionApiOperateRetentionExecutionOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TriggerRetentionExecution(ctx, id, body, optional) Trigger a Retention Execution
Trigger a Retention Execution, if dry_run is True, nothing would be deleted actually.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int64 | Retention ID. | |
body | Body | ||
optional | *RetentionApiTriggerRetentionExecutionOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RetentionApiTriggerRetentionExecutionOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request |
(empty response body)
- Content-Type: application/json
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateRetention(ctx, id, policy, optional) Update Retention Policy
Update Retention Policy, you can reference metadatas API for the policy model. You can check project metadatas to find whether a retention policy is already binded. This method should only be called when retention policy has already binded to project.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int64 | Retention ID. | |
policy | RetentionPolicy | ||
optional | *RetentionApiUpdateRetentionOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RetentionApiUpdateRetentionOpts struct
Name | Type | Description | Notes |
---|
xRequestId | optional.String| An unique ID for the request |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]