python-gitlab id vs iid 对比说明

发布时间: 更新时间: 总字数:124 阅读时间:1m 作者: IP上海 分享 网址

python-gitlab id vs iid 对比说明

说明

Some resources have two similarly-named fields. For example, issues, merge requests, and project milestones. The fields are:

  • id: ID that is unique across all projects.
  • iid: additional, internal ID that is unique in the scope of a single project.
Note: The iid is displayed in the web UI.
If a resource has the iid field and the id field, the iid field is usually used instead of id to fetch the resource.

For example, suppose a project with id: 42 has an issue with id: 46 and iid: 5. In this case:

A valid API call to retrieve the issue is GET /projects/42/issues/5 An invalid API call to retrieve the issue is GET /projects/42/issues/46.

参考

  1. https://docs.gitlab.com/ce/api/README.html#id-vs-iid
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数