var axios = require('axios');
var data = JSON.stringify(
{
"query_type": "labelrow",
"query_method":"POST",
"values": {
"uid": "<label_hash>",
"payload": {
"label_hash": "<label_hash>",
"data_units": {
"data_uid_1": {
...
},
"data_uid_2": {
...
},
},
"object_answers": {},
"classification_answers": {},
"label_status": "LABELLED"
}
}});
var config = {
method: 'post',
url: 'https://api.encord.com/public',
headers: {
'Content-Type': 'application/json',
'ResourceID': '<project_id>',
'Authorization': '<private_key>',
'Accept': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});