API Reference / Filter sets
Delete a filter set
Soft-deletes the filter set identified by the given ID so it can no longer be referenced by new contracts. Every live contract and filter set that references it keeps a copy of its rules in place of the reference, saved as an edit by the caller in the same transaction, so they select exactly the same items as before.
/ contracts. v1. Contracts/ DeleteFilterSetRequest body
application/jsonRequired
Request to delete a filter set. Each live contract and filter set referencing it has the reference replaced by a copy of the filter set's rules, as an edit by the caller, so it selects the same items.
filterSetId?stringOpaque 16-byte identifier of the filter set to delete, base64-encoded in JSON.
Format"byte" base64
Response body
application/json
Success
No fields.
application/json
The request was malformed, such as a missing required field or an unparseable cursor.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The requested resource does not exist in this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request was rate limited. Slow down and retry later.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/contracts.v1.Contracts/DeleteFilterSet" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filterSetId": "EBESExQVFhcYGRobHB0eHw=="
}'const res = await fetch("https://api.goldmine.to/contracts.v1.Contracts/DeleteFilterSet", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"filterSetId": "EBESExQVFhcYGRobHB0eHw=="
}),
});
const data = await res.json();body := strings.NewReader(`{
"filterSetId": "EBESExQVFhcYGRobHB0eHw=="
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/contracts.v1.Contracts/DeleteFilterSet", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/contracts.v1.Contracts/DeleteFilterSet",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"filterSetId": "EBESExQVFhcYGRobHB0eHw=="
},
)
data = res.json(){}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "not_found",
"message": "The requested resource does not exist in this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}