Return an object including a download URL for an existing specific offline backup.
The V4 equivalent is /v4/backup/{feed}, which returns download URLs for advisory feed backups.
curl --request GET \
--url https://api.vulncheck.com/v3/backup/initial-access \
--header 'Accept: application/json' \
--header 'Authorization: Bearer insert_token_here'
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
vulncheck "github.com/vulncheck-oss/sdk-go-v2/v2"
)
func main() {
configuration := vulncheck.NewConfiguration()
configuration.Scheme = "https"
configuration.Host = "api.vulncheck.com"
client := vulncheck.NewAPIClient(configuration)
token := os.Getenv("VULNCHECK_API_TOKEN")
auth := context.WithValue(
context.Background(),
vulncheck.ContextAPIKeys,
map[string]vulncheck.APIKey{
"Bearer": {Key: token},
},
)
resp, httpRes, err := client.EndpointsAPI.BackupIndexGet(auth, "initial-access").Execute()
if err != nil || httpRes.StatusCode != 200 {
log.Fatal(err)
}
prettyJSON, err := json.MarshalIndent(resp.Data, "", " ")
if err != nil {
log.Fatalf("Failed to generate JSON: %v", err)
return
}
fmt.Println(string(prettyJSON))
}
import vulncheck_sdk
configuration = vulncheck_sdk.Configuration(host="https://api.vulncheck.com/v3")
configuration.api_key["Bearer"] = "insert_token_here"
with vulncheck_sdk.ApiClient(configuration) as api_client:
endpoints_client = vulncheck_sdk.EndpointsApi(api_client)
api_response = endpoints_client.backup_index_get("initial-access")
print(api_response.data[0].url)
vulncheck backup download initial-access
{
"_benchmark": 1.306805,
"_meta": {
"timestamp": "2023-08-31T21:54:41.17981965Z",
"index": "initial-access"
},
"data": [
{
"filename": "initial-access-1693513207700526476.zip",
"sha256": "fa79043f2bcbaf96767c78fe3180f73dd48298d1b895ba41cccdaa95d35258d5",
"date_added": "2023-08-31T20:20:07.7Z",
"url": "https://serve.vulncheck.com/latest/initial-access-1693513207700526476.zip?x-vc-req-id=...&Expires=...&Signature=...&Key-Pair-Id=...",
"url_ttl_minutes": 15,
"url_expires": "2023-08-31T22:09:41.17Z"
}
]
}