Hi
I have tracked entity instance that I want to update one attribute of this instance using web API
I am using Nodejs
const baseUrl = "http://localhost:8080/api/";
const username = "admin";
const password = "district";
const endpoint = `trackedEntityInstances.json`;
const url = `${baseUrl}${endpoint}`;
const data={
"trackedEntityInstance":"d0hQJiDhJpY",
"attributes":[
{
"attribute": "To4XjKbC43w",
"value": "3241243"
},
]
}
const responseFromDHIS2 = axios.put(url, data, {
auth: { username, password },
})
.then(response => {
// Handle the response here
console.log(response.data);
})
.catch(error => {
// Handle any errors here
console.error(error);
});
I get the following error
message: “Request method ‘PUT’ not supported”
any help or suggestion