Update a Subject Access Request
1 min
POST
https://api.optimizely.com/v2/internal-subject-access-requests/{request_id}
Path Parameters
- request_idinteger<int64>requiredDescriptionFormatint64
Body Parameters
- bodySubjectAccessRequestUpdaterequiredDescription
- completed_at_timestring<date-time>DescriptionFormatdate-time
- export_locationstringExampleDescription
- processing_started_timestring<date-time>DescriptionFormatdate-time
- statusstring<pending | processing | completed | failure>requiredExampleDescriptionAllowedpendingprocessingcompletedfailure
Responses
200
- SubjectAccessRequestInternal
- account_idinteger<int64>DescriptionFormatint64
- completed_at_timestring<date-time>DescriptionFormatdate-time
- data_sourcestring<app_backend | app_backend_infra | data_platform | datawarehouse | external_systems | optimizely | optimizely_on_optimizely | program_management | security | business_systems | marketing | tse>requiredExampleDescriptionAllowedapp_backendapp_backend_infradata_platformdatawarehouseexternal_systemsoptimizelyoptimizely_on_optimizelyprogram_managementsecuritybusiness_systemsmarketingtse
- data_typestring<user | visitor>requiredExampleDescriptionAlloweduservisitor
- expired_at_timestring<date-time>DescriptionFormatdate-time
- export_locationstringExampleDescription
- idinteger<int64>ExampleDescriptionFormatint64
- identifierstringrequiredExampleDescription
- identifier_typestring<email | optimizely_end_user_id | dcp_id | fullstack_id | other>requiredExampleDescriptionAllowedemailoptimizely_end_user_iddcp_idfullstack_idother
- parent_request_idinteger<int64>ExampleDescriptionFormatint64
- processing_started_timestring<date-time>DescriptionFormatdate-time
- request_typestring<access | delete>requiredExampleDescriptionAllowedaccessdelete
- requested_at_timestring<date-time>DescriptionFormatdate-time
- sla_deadline_timestring<date-time>DescriptionFormatdate-time
- statusstring<pending | processing | completed | failure>ExampleDescriptionAllowedpendingprocessingcompletedfailure
400
- Error
- codestring
- messagestring
- messagesobject
- uuidstring<uuid>Formatuuid
401
- Error
- codestring
- messagestring
- messagesobject
- uuidstring<uuid>Formatuuid
403
- Error
- codestring
- messagestring
- messagesobject
- uuidstring<uuid>Formatuuid
404
- Error
- codestring
- messagestring
- messagesobject
- uuidstring<uuid>Formatuuid
default
- Error
- codestring
- messagestring
- messagesobject
- uuidstring<uuid>Formatuuid
curl
curl --request POST \
--url https://api.optimizely.com/v2/internal-subject-access-requests/{request_id} \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"status": "processing"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"status": "processing"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.optimizely.com/v2/internal-subject-access-requests/{request_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.optimizely.com/v2/internal-subject-access-requests/{request_id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"status": "processing"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.optimizely.com/v2/internal-subject-access-requests/{request_id}"
payload = json.dumps({
"status": "processing"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Return the updated Subject Access Request
{
"account_id": "",
"completed_at_time": "",
"data_source": "optimizely",
"data_type": "user",
"expired_at_time": "",
"export_location": "s3://{bucket-name}/{account_id}/{parent_sar_id}/{sar_id}",
"id": 12345,
"identifier": "[email protected]",
"identifier_type": "email",
"parent_request_id": 12345,
"processing_started_time": "",
"request_type": "access",
"requested_at_time": "",
"sla_deadline_time": "",
"status": "pending"
}400
// Invalid ID or request body
{
"code": "",
"message": "",
"messages": {},
"uuid": ""
}401
// Invalid credentials
{
"code": "",
"message": "",
"messages": {},
"uuid": ""
}403
// You do not have permission to edit the specified Subject Access Request
{
"code": "",
"message": "",
"messages": {},
"uuid": ""
}404
// Subject Access Request not found
{
"code": "",
"message": "",
"messages": {},
"uuid": ""
}default
// Unexpected error
{
"code": "",
"message": "",
"messages": {},
"uuid": ""
}