May not be known, or may change over time. The user’s or administrator’s password or token The user’s password or one of their personal access tokens.Use impersonation tokens as an alternative to: They can be created only by an administrator, and are used to authenticate with the Impersonation tokens are a type of personal access token. List of projects without explicitly passing an access token. The web frontend can use the API as the authenticated user to get a The primary user of this authentication method is the web frontend of GitLab Generate a new session cookie isn’t supported. TheĪPI uses this cookie for authentication if it’s present. Signing in to the main GitLab application sets a _gitlab_session cookie. If authentication information is not valid or is missing, GitLab returns an errorĬurl -header "JOB-TOKEN: $CI_JOB_TOKEN " "" Session cookie If you are an administrator, you or your application can authenticate as a specific user. Self-managed GitLab: Free, Premium, and Ultimate.GitLab CI/CD job token (Specific endpoints only).You can authenticate with the GitLab API in several ways: projects/:id endpoint does not require authentication. When authentication is not required, the documentationįor each endpoint specifies this. Most API requests require authentication, or only return public data whenĪuthentication isn’t provided. The HTTP exit code can help you diagnose the success or failure of your REST request. The following is a basic example of a request to the fictional endpoint:Ĭurl: (22 ) The requested URL returned error: 404 The APIįor example, the root of the v4 API is at /api/v4. How to use the APIĪPI requests must include both api and the API version. Major API version changes, and removal of entire API versions, are done in tandemĪll deprecations and changes between versions are in the documentation. Apartįrom incidental patch and security releases, new minor versions of GitLab are released every New features and bug fixes are released in tandem with GitLab. New features can be added to the API in the same The minor version isn’t explicit, which allows for a stable APIĮndpoint. Symbolizes the major version number, as described by SemVer.īecause of this, backward-incompatible changes require this version number to The HTTP API is versioned with a single number, which is 4. It is often a good choice forĭevelopers who are more comfortable with traditional API architecture. May make them more familiar to some developers. The REST APIs have been around for a longer time compared to GraphQL APIs, which Resolve requests detected as spam REST API.Encoding API parameters of array and hash types.File path, branches, and tags name encoding.API request that includes the exit code.API request to expose HTTP response headers.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |