Return an object including a download URL for an existing specific offline backup.
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"
"github.com/vulncheck-oss/sdk-go-v2/vulncheck"
)
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://mjwq58t95817e.mrap.accesspoint.s3-global.amazonaws.com/initial-access-1693513207700526476.zip?X-Amz-Algorithm=AWS4-ECDSA-P256-SHA256&X-Amz-Credential=ASIAZKOAMLED25NXJN7O%2F20230831%2Fs3%2Faws4_request&X-Amz-Date=20230831T215441Z&X-Amz-Expires=900&X-Amz-Region-Set=%2A&X-Amz-Security-Token=IQ3D&X-Amz-SignedHeaders=host&x-id=GetObject&X-Amz-Signature=304402203e96848",
"url_ttl_minutes": 60,
"url_expires": "2023-08-31T21:20:07.7Z"
}
]
}