Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #10040

Closed
Open
Created Feb 18, 2016 by Administrator@rootOwner

API doesn't return pagination headers for /api/v3/projects/:id/repository/commits endpoint

Created by: strobe

Just found that latest version doesn't return X-Total-Pages and other headers for some of endpoints which has pagination support.

Sample:

$  curl -i "http://192.168.7.3/api/v3/projects/4/repository/commits?&page=0&per_page=10"
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 18 Feb 2016 03:53:04 GMT
Content-Type: application/json
Content-Length: 2499
Connection: keep-alive
Cache-Control: max-age=0, private, must-revalidate
Etag: W/"9363a8f706ca53938e5f390840f4d4f9"
Status: 200 OK
Vary: Origin
X-Request-Id: 4f862a82-c43e-4d3c-8ba6-68c284fd0ff1
X-Runtime: 0.048007

For different endpoints it's seems works well:

$ curl -i "http://192.168.7.3/api/v3/projects/4/issues/2/notes?&page=0&per_page=2"
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 18 Feb 2016 04:00:34 GMT
Content-Type: application/json
Content-Length: 783
Connection: keep-alive
Cache-Control: max-age=0, private, must-revalidate
Etag: W/"2644593ddd365520cf4aa0fc0b95cfde"
Link: <http://192.168.7.3/api/v3/projects/4/issues/2/notes?page=2&per_page=2>; rel="next", <http://192.168.7.3/api/v3/projects/4/issues/2/notes?page=1&per_page=2>; rel="first", <http://192.168.7.3/api/v3/projects/4/issues/2/notes?page=4&per_page=2>; rel="last"
Status: 200 OK
Vary: Origin
X-Next-Page: 2
X-Page: 1
X-Per-Page: 2
X-Prev-Page: 
X-Request-Id: b7991204-56fa-430b-87bd-6ebc3c09e271
X-Runtime: 0.062908
X-Total: 8
X-Total-Pages: 4

Gitlab installation info:

CentOS Linux release 7.2.1511 (Core)

System information
System:
Current User:   git
Using RVM:  no
Ruby Version:   2.1.8p440
Gem Version:    2.5.1
Bundler Version:1.10.6
Rake Version:   10.5.0
Sidekiq Version:4.0.1

GitLab information
Version:    8.4.4
Revision:   9c31cc6
Directory:  /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL:        http://192.168.7.3
HTTP Clone URL: http://192.168.7.3/some-group/some-project.git
SSH Clone URL:  [email protected]:some-group/some-project.git
Using LDAP: no
Using Omniauth: no

GitLab Shell
Version:    2.6.10
Repositories:   /var/opt/gitlab/git-data/repositories
Hooks:      /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git:        /opt/gitlab/embedded/bin/git

(installed from Omnibus Package)

Application Check

$ sudo gitlab-rake gitlab:check SANITIZE=true
Checking GitLab Shell ...

GitLab Shell version >= 2.6.10 ? ... OK (2.6.10)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
hooks directories in repos are links: ...
1/2 ... ok
1/4 ... ok
1/5 ... ok
1/6 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
    /var/opt/gitlab/git-data/repositories: OK
    /var/opt/gitlab/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.21
Send ping to redis server: PONG
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Reply by email ...

Reply by email is disabled in config/gitlab.yml

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured with autocrlf=input? ... yes
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... skipped (no tmp uploads folder yet)
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ...
1/2 ... yes
1/4 ... yes
1/5 ... yes
1/6 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.1.8)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 1.7.10 ? ... yes (2.6.2)
Active users: 1

Checking GitLab ... Finished
Assignee
Assign to
Time tracking