const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyfalsecurl --request GET \
--url https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download \
--header 'Authorization: Bearer <token>'{
"ok": true,
"data": {
"artifact": {
"schemaVersion": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"jobId": "<string>",
"orgId": "<string>",
"scope": {
"dataSubjectId": "<string>",
"windowStart": "2023-11-07T05:31:56Z",
"windowEnd": "2023-11-07T05:31:56Z",
"campaignIds": [
"<string>"
],
"substrates": [
"<string>"
]
},
"sections": [
{
"name": "<string>",
"count": 123,
"totalBeforeFilter": 123,
"items": [
"<unknown>"
]
}
],
"integritySha256": "<string>",
"auditReport": {
"jobId": "<string>",
"orgId": "<string>",
"requestedBy": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"generatedAt": "2023-11-07T05:31:56Z",
"sectionCounts": {},
"totalRecords": 123,
"redactionNotes": [
"<string>"
]
}
}
},
"contractVersion": "<string>"
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}Download a DSAR export
Serve the materialised export artifact. A READY job transitions to DELIVERED on first download (stamping downloadedAt / downloadedBy); a DELIVERED job serves the same artifact idempotently — no state change, no duplicate event. The response carries a deterministic content-disposition attachment header (enfinitos-dsar-export-<jobId>.json) and cache-control: no-store. Expiry is enforced lazily: a READY job whose delivery.expiresAt has passed is swept to EXPIRED before the refusal. EXPIRED (and every other non-READY/DELIVERED state) returns 409; a READY/DELIVERED job whose artifact is no longer in the store returns 412 (re-run regenerates an identical bundle — the builder is deterministic). Requires scope audit:read.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyfalsecurl --request GET \
--url https://sandbox.api.enfinitos.com/v1/compliance/dsar/{jobId}/download \
--header 'Authorization: Bearer <token>'{
"ok": true,
"data": {
"artifact": {
"schemaVersion": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"jobId": "<string>",
"orgId": "<string>",
"scope": {
"dataSubjectId": "<string>",
"windowStart": "2023-11-07T05:31:56Z",
"windowEnd": "2023-11-07T05:31:56Z",
"campaignIds": [
"<string>"
],
"substrates": [
"<string>"
]
},
"sections": [
{
"name": "<string>",
"count": 123,
"totalBeforeFilter": 123,
"items": [
"<unknown>"
]
}
],
"integritySha256": "<string>",
"auditReport": {
"jobId": "<string>",
"orgId": "<string>",
"requestedBy": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"generatedAt": "2023-11-07T05:31:56Z",
"sectionCounts": {},
"totalRecords": 123,
"redactionNotes": [
"<string>"
]
}
}
},
"contractVersion": "<string>"
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}Authorizations
API key sent as Authorization: Bearer <api-key>.
Path Parameters
DSAR job id (prefixed dsar:).