I'am currently trying to get the status of a GitLab job with Javascript on GitLab Pages.
I have tried the following but I always receive an error 404 not found.
fetch('https://gitlab.devops.telekom.de/api/v4/projects/165107/jobs', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'PRIVATE-TOKEN': 'TOKEN'
},
body: JSON.stringify({ "id": 78912 })
}).then(response => response.json()).then(response => console.log(JSON.stringify(response)));