Skip to content

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

@maaroen

Description

@maaroen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/apiConcerns mainly the APItopic/gitea-actionsrelated to the actions of Giteatype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions