API endpoint to download logs per step of a workflow #14816

Open
opened 2025-11-02 11:23:40 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @maaroen on GitHub (Jul 29, 2025).

Feature Description

In the current API I only see an endpoint to retrieve all the logs from all the steps actions/jobs/{job_id}/logs. I would be interested in an api endpoint, in which you can see the logs per step, like how the UI does.

I'm experimenting with an Agentic AI system, that is able to extend it's own functionality, and it also generates tests to test it's own logic. This is then run through a Gitea Actions CI pipeline. But if the pipeline fails, I want to automatically retrieve the logs, and send them in an autonomous feedback loop.

The UI is using different endpoint, in which it does a POST, with a logcursor, and by setting a property called "Expanded" to true, it will return the full logs for that step only.

This is what the UI does:

https://my-gitea-instance/{owner}/{repository}/actions/runs/111/jobs/0
And with this payload:

{"logCursors":[{"step":0,"cursor":null,"expanded":true},{"step":1,"cursor":null,"expanded":false},{"step":2,"cursor":null,"expanded":false},{"step":3,"cursor":null,"expanded":false},{"step":4,"cursor":null,"expanded":false}]}

Would it be possible to make an endpoint like this available through the API as well? The current logs endpoint, doesn't show markers to identify logs from failed steps only.

Screenshots

No response

Originally created by @maaroen on GitHub (Jul 29, 2025). ### Feature Description In the current API I only see an endpoint to retrieve all the logs from all the steps `actions/jobs/{job_id}/logs`. I would be interested in an api endpoint, in which you can see the logs per step, like how the UI does. I'm experimenting with an Agentic AI system, that is able to extend it's own functionality, and it also generates tests to test it's own logic. This is then run through a Gitea Actions CI pipeline. But if the pipeline fails, I want to automatically retrieve the logs, and send them in an autonomous feedback loop. The UI is using different endpoint, in which it does a POST, with a logcursor, and by setting a property called "Expanded" to true, it will return the full logs for that step only. This is what the UI does: https://my-gitea-instance/{owner}/{repository}/actions/runs/111/jobs/0 And with this payload: ```json {"logCursors":[{"step":0,"cursor":null,"expanded":true},{"step":1,"cursor":null,"expanded":false},{"step":2,"cursor":null,"expanded":false},{"step":3,"cursor":null,"expanded":false},{"step":4,"cursor":null,"expanded":false}]} ``` Would it be possible to make an endpoint like this available through the API as well? The current logs endpoint, doesn't show markers to identify logs from failed steps only. ### Screenshots _No response_
GiteaMirror added the topic/gitea-actionstopic/apitype/proposal labels 2025-11-02 11:23:40 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14816