repository

List a repository's keys

Changed on
get/repos/{owner}/{repo}/keys

Request

  • Base URL
    https://demo.gitea.com/api/v1
  • Auth
    • HTTP basic
    • or API key in query parameter token
    • or API key in query parameter access_token
    • or API key in header Authorization
    • or API key in query parameter sudo
    • or API key in header Sudo
    • or API key in header X-GITEA-OTP
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Path parameters

ownerstring required

owner of the repo

repostring required

name of the repo

Query parameters

key_idinteger

the key_id to search for

fingerprintstring

fingerprint of the key

pageinteger

page number of results to return (1-based)

limitinteger

page size of results

Response

DeployKeyList

created_atstring date-time

Created is the time when the deploy-key was added

fingerprintstring

Fingerprint is the key's fingerprint

idinteger

ID is the unique identifier for the deploy-key

keystring

Key contains the actual SSH key content

key_idinteger

KeyID is the associated public key ID

key_type'ssh' | 'token'

Type tells whether the key authenticates over SSH or with a token over HTTPS

read_onlyboolean

ReadOnly indicates if the key has read-only access

titlestring

Title is the human-readable name for the key

tokenstring

Token is the plaintext token of an HTTPS key, only returned when it is created

urlstring

URL is the API URL for this deploy-key

Example response

[
  {
    "repository": {
      "repo_transfer": {
        "teams": [
          {
            "units": [
              "repo.code",
              "repo.issues",
              "repo.ext_issues",
              "repo.wiki",
              "repo.pulls",
              "repo.releases",
              "repo.projects",
              "repo.ext_wiki"
            ],
            "units_map": {
              "repo.code": "read",
              "repo.ext_issues": "none",
              "repo.ext_wiki": "none",
              "repo.issues": "write",
              "repo.projects": "none",
              "repo.pulls": "owner",
              "repo.releases": "none",
              "repo.wiki": "admin"
            }
          }
        ]
      }
    }
  }
]

Changes