This is possible via the GitLab jobs API, on Linux with a simple curl:
curl --header "PRIVATE-TOKEN: <personal-access-token>" https://gitlab/api/v4/projects/<project_id>/jobs/<job_id> | jq .
You can get the project_id
from the projects main page, the job_id
from the CI/CD -> jobs page and you can create a personal-access-token
from the profile settings page, ensuring it has API
permissions.
If you want to retrieve all jobs with cancelled status:
curl --header "PRIVATE-TOKEN: <personal-access-token>" https://gitlab/api/v4/projects/<project_id>/jobs?scope[]=canceled | jq .
The user JSON object in the output indicates who cancelled the job, eg:
"user": {
"id": 77,
"name": "John Doe",
"username": "jdoe",
"state": "active",
"avatar_url": "https://gitlab/uploads/-/system/user/avatar/77/avatar.png",
"web_url": "https://gitlab/jdoe",
"created_at": "2017-08-14T13:53:37.796+01:00",
"bio": "",
"location": "",
"public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
"website_url": "",
"organization": ""
}
Cheers
S