Remove the archive marking from a finding instance
client.ZeroTrust.Casb.Posture.Findings.Instances.Unarchive(ctx, findingID, params) (*CasbPostureFindingInstanceUnarchiveResponse, error)
POST/accounts/{account_id}/data-security/posture/findings/{finding_id}/instances/unarchive
Remove the archive marking from one or more finding instances.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Remove the archive marking from a finding instance
package main
import (
"context"
"fmt"
"github.com/cloudflare/cloudflare-go"
"github.com/cloudflare/cloudflare-go/option"
"github.com/cloudflare/cloudflare-go/zero_trust"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
)
response, err := client.ZeroTrust.Casb.Posture.Findings.Instances.Unarchive(
context.TODO(),
"U3RhaW5sZXNzIHJvY2tz",
zero_trust.CasbPostureFindingInstanceUnarchiveParams{
AccountID: cloudflare.F("46148281d8a93d002ef242d8b0d5f9f6"),
CheckInstances: cloudflare.F([]string{"497f6eca-6276-4993-bfeb-53cbbbba6f08"}),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ID)
}
{
"errors": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"messages": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"success": true,
"result": {
"affliction_date": "2025-03-18T17:25:38.700541Z",
"asset": {
"category": {
"service": null,
"type": "file",
"vendor": "Slack",
"id": "1a78cbf3-b98f-4289-b1f2-22db64130f4f"
},
"external_id": "external-file-id-123",
"fields": [
{
"name": "Credential name",
"value": "Test asset 2",
"link": "https://example.com"
}
],
"name": "Public.svg",
"id": "8a043daf-def4-403e-9d28-da2e93d9b824",
"link": "https://slack-files.com/TYJH37DCK-E0238GG6B8-92fd5y5674"
},
"dlp_contexts": [
{
"created": "2025-03-18T17:25:38.695977Z",
"entry_ids": [
"21befc68-a297-4090-ac10-17a051b901cd",
"d6dd1e16-f78c-401a-b564-45c4e44aa467"
],
"profile_id": "ab20a60b-21f2-4b13-ac98-24dcee27ac0e",
"updated": "2025-03-18T17:25:38.695977Z",
"id": "7653ff3a-d25e-4c10-8034-3460937c045b",
"deleted": "2025-03-18T17:25:38.695977Z",
"match_context_max_extent": 512,
"match_context_min_extent": 1,
"match_context_payload": {}
}
],
"remediations": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-03-18T18:30:15.123456Z",
"stale": false,
"status": "pending"
}
],
"webhooks": [
{
"latest_job": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-03-18T18:30:15.123456Z",
"stale": false,
"status": "pending"
},
"webhook_id": "550e8400-e29b-41d4-a716-446655440000",
"webhook_label": "Send to Gmail"
}
],
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_archived": false
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"messages": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://developers.cloudflare.com/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"success": true,
"result": {
"affliction_date": "2025-03-18T17:25:38.700541Z",
"asset": {
"category": {
"service": null,
"type": "file",
"vendor": "Slack",
"id": "1a78cbf3-b98f-4289-b1f2-22db64130f4f"
},
"external_id": "external-file-id-123",
"fields": [
{
"name": "Credential name",
"value": "Test asset 2",
"link": "https://example.com"
}
],
"name": "Public.svg",
"id": "8a043daf-def4-403e-9d28-da2e93d9b824",
"link": "https://slack-files.com/TYJH37DCK-E0238GG6B8-92fd5y5674"
},
"dlp_contexts": [
{
"created": "2025-03-18T17:25:38.695977Z",
"entry_ids": [
"21befc68-a297-4090-ac10-17a051b901cd",
"d6dd1e16-f78c-401a-b564-45c4e44aa467"
],
"profile_id": "ab20a60b-21f2-4b13-ac98-24dcee27ac0e",
"updated": "2025-03-18T17:25:38.695977Z",
"id": "7653ff3a-d25e-4c10-8034-3460937c045b",
"deleted": "2025-03-18T17:25:38.695977Z",
"match_context_max_extent": 512,
"match_context_min_extent": 1,
"match_context_payload": {}
}
],
"remediations": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-03-18T18:30:15.123456Z",
"stale": false,
"status": "pending"
}
],
"webhooks": [
{
"latest_job": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-03-18T18:30:15.123456Z",
"stale": false,
"status": "pending"
},
"webhook_id": "550e8400-e29b-41d4-a716-446655440000",
"webhook_label": "Send to Gmail"
}
],
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_archived": false
}
}