Enhance API Consistency and Flexibility

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

Currently, GitLab's APIs, specifically the REST API and GraphQL API, exhibit inconsistencies in field selection, returned results, and flexibility in data retrieval. (Example: Issue #462613)

Proposal

Enhance the APIs to ensure better alignment and provide users with a more consistent and flexible experience across both platforms. In other words, be able to reduce fields and have the option to choose what with GraphQL for example.

  • Alignment of returned fields:
    • Ensure that the fields returned by both the REST API and GraphQL API are equivalent or closely aligned. Users should receive a similar set of fields when making requests through either API.
  • Consistent return values:
    • Guarantee consistency in return values between the REST API and GraphQL API. Regardless of the chosen API, users should expect to see identical or similar results.
  • Field reduction capability for REST API:
    • Introduce functionality within the REST API that allows users to reduce the number of returned fields. This feature will empower users to retrieve only the specific data they require, enhancing efficiency and reducing unnecessary data transfer.
  • Enhanced data selection with GraphQL:
    • Align the RESTful and GraphQL APIs to provide users with similar capabilities in data selection. By leveraging GraphQL's flexibility, users should be able to cherry-pick the data they need, streamlining the retrieval process.

Expected Benefits:

  • Improved consistency and alignment across both APIs.
  • Enhanced flexibility for users in selecting and retrieving data.
  • Simplified development process and improved user experience.

Does this feature require an audit event?

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖