Organization data
Apply an identifier import
Atomically attach a previously validated batch of customer-owned identifiers
POST
/
identifiers
/
import
/
apply
Apply an identifier import
curl --request POST \
--url https://api.oncanary.com/v1/identifiers/import/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rows": [
{
"target": {
"id": "<string>"
},
"system": "<string>",
"value": "<string>",
"payload": "<string>",
"format_hint": "<string>",
"is_primary": true
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rows: [
{
target: {id: '<string>'},
system: '<string>',
value: '<string>',
payload: '<string>',
format_hint: '<string>',
is_primary: true
}
]
})
};
fetch('https://api.oncanary.com/v1/identifiers/import/apply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oncanary.com/v1/identifiers/import/apply"
payload = { "rows": [
{
"target": { "id": "<string>" },
"system": "<string>",
"value": "<string>",
"payload": "<string>",
"format_hint": "<string>",
"is_primary": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"identifiers": [
{
"id": "<string>",
"system": "<string>",
"value": "<string>",
"source": "canary",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"scan_values": [
{
"id": "<string>",
"payload": "<string>",
"format_hint": "<string>"
}
]
}
]
},
"meta": {
"request_id": "<string>",
"api_version": "<string>"
}
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}Authorizations
Organization API key with an sk_live_ or sk_test_ prefix
Body
application/json
Required array length:
1 - 1000 elementsShow child attributes
Show child attributes
⌘I
Apply an identifier import
curl --request POST \
--url https://api.oncanary.com/v1/identifiers/import/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rows": [
{
"target": {
"id": "<string>"
},
"system": "<string>",
"value": "<string>",
"payload": "<string>",
"format_hint": "<string>",
"is_primary": true
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rows: [
{
target: {id: '<string>'},
system: '<string>',
value: '<string>',
payload: '<string>',
format_hint: '<string>',
is_primary: true
}
]
})
};
fetch('https://api.oncanary.com/v1/identifiers/import/apply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oncanary.com/v1/identifiers/import/apply"
payload = { "rows": [
{
"target": { "id": "<string>" },
"system": "<string>",
"value": "<string>",
"payload": "<string>",
"format_hint": "<string>",
"is_primary": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"identifiers": [
{
"id": "<string>",
"system": "<string>",
"value": "<string>",
"source": "canary",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"scan_values": [
{
"id": "<string>",
"payload": "<string>",
"format_hint": "<string>"
}
]
}
]
},
"meta": {
"request_id": "<string>",
"api_version": "<string>"
}
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}