gitlab4j-api
gitlab4j-api copied to clipboard
projectFilter.withIdAfter not work
ProjectFilter projectFilter = new ProjectFilter(); projectFilter.withIdAfter(allProjects.stream().mapToInt(Project::getId).max().orElse(0)); List<Project> projects = gitLabApi().getProjectApi().getProjects(projectFilter);
withIdAfter search is not work , projects return all .
gitlab4j-api-4.18.0.jar
4.18.0 seems really old. Can you check with a newer version?
To debug this, you should display the HTTP request sent by the client. You can use:
GitLabApi(..., ....)
.withRequestResponseLogging(Level.INFO);
Then try to understand if the request is wrong (and what should be changed). It could be that GitLab itself has an issue.
4.18.0seems really old. Can you check with a newer version?To debug this, you should display the HTTP request sent by the client. You can use:
GitLabApi(..., ....) .withRequestResponseLogging(Level.INFO);Then try to understand if the request is wrong (and what should be changed). It could be that GitLab itself has an issue.
parameter is in, but return all . Actually is empty result.
Are you sure everything is OK with your authentication?
The docs says:
Get a list of all visible projects across GitLab for the authenticated user. When accessed without authentication, only public projects with simple fields are returned.
source: https://docs.gitlab.com/ee/api/projects.html
For me the id_after works as expected:
curl --location 'https://<server>/api/v4/projects?id_after=2210' \
--header 'PRIVATE-TOKEN: *******'
Without the parameter I see more projects, when I use id_after the projects are filtered.
The only case where I got an empty result array is when my page parameter is too high:
curl --location 'https://<server>/api/v4/projects?id_after=2210&per_page=50&page=39' \
--header 'PRIVATE-TOKEN: *******'
Without the parameter I see more projects, when I use
id_afterthe projects are filtered.
You can give max id try and page=1 . is expect an empty result?