swagger: '2.0' info: description: This documentation describes the Forgejo API. title: Forgejo activitypub user API license: name: This file is distributed under the MIT license for the purpose of interoperability url: http://opensource.org/licenses/MIT version: 16.0.0-dev-465-4b83448b7d+gitea-1.22.0 basePath: /api/v1 schemes: - https - http consumes: - application/json - text/plain produces: - application/json - text/html security: - BasicAuth: [] - AuthorizationHeaderToken: [] - SudoParam: [] - SudoHeader: [] - TOTPHeader: [] tags: - name: user paths: /user: get: produces: - application/json tags: - user summary: Get the authenticated user operationId: userGetCurrent responses: '200': $ref: '#/responses/User' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/actions/runners: get: produces: - application/json tags: - user summary: Get the user's runners operationId: getUserRunners parameters: - type: boolean description: whether to include all visible runners (true) or only those that are directly owned by the user (false) name: visible in: query - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/ActionRunnerList' '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '404': $ref: '#/responses/notFound' post: consumes: - application/json produces: - application/json tags: - user summary: Register a new user-level runner operationId: registerUserRunner parameters: - name: body in: body schema: $ref: '#/definitions/RegisterRunnerOptions' responses: '201': $ref: '#/responses/RegisterRunnerResponse' '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '404': $ref: '#/responses/notFound' /user/actions/runners/jobs: get: produces: - application/json tags: - user summary: Search for user's action jobs according filter conditions operationId: userSearchRunJobs parameters: - type: string description: a comma separated list of run job labels to search for name: labels in: query responses: '200': $ref: '#/responses/RunJobList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/actions/runners/registration-token: get: description: 'This operation has been deprecated in Forgejo 15. Use the web UI or [`/user/actions/runners`](#/user/registerUserRunner) instead. ' produces: - application/json tags: - user summary: Get the user's runner registration token operationId: userGetRunnerRegistrationToken deprecated: true responses: '200': $ref: '#/responses/RegistrationToken' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/actions/runners/{runner_id}: get: produces: - application/json tags: - user summary: Get a particular runner that belongs to the user operationId: getUserRunner parameters: - type: string description: ID of the runner name: runner_id in: path required: true responses: '200': $ref: '#/responses/ActionRunner' '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - user summary: Delete a particular user-level runner operationId: deleteUserRunner parameters: - type: string description: ID of the runner name: runner_id in: path required: true responses: '204': description: runner has been deleted '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '404': $ref: '#/responses/notFound' /user/actions/secrets/{secretname}: put: consumes: - application/json produces: - application/json tags: - user summary: Create or Update a secret value in a user scope operationId: updateUserSecret parameters: - type: string description: name of the secret name: secretname in: path required: true - name: body in: body schema: $ref: '#/definitions/CreateOrUpdateSecretOption' responses: '201': description: response when creating a secret '204': description: response when updating a secret '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: consumes: - application/json produces: - application/json tags: - user summary: Delete a secret in a user scope operationId: deleteUserSecret parameters: - type: string description: name of the secret name: secretname in: path required: true responses: '204': description: delete one secret of the user '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/actions/variables: get: produces: - application/json tags: - user summary: Get the user-level list of variables which is created by current doer operationId: getUserVariablesList parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/VariableList' '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/actions/variables/{variablename}: get: produces: - application/json tags: - user summary: Get a user-level variable which is created by current doer operationId: getUserVariable parameters: - type: string description: name of the variable name: variablename in: path required: true responses: '200': $ref: '#/responses/ActionVariable' '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' put: consumes: - application/json produces: - application/json tags: - user summary: Update a user-level variable which is created by current doer operationId: updateUserVariable parameters: - type: string description: name of the variable name: variablename in: path required: true - name: body in: body schema: $ref: '#/definitions/UpdateVariableOption' responses: '201': description: response when updating a variable '204': description: response when updating a variable '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' post: consumes: - application/json produces: - application/json tags: - user summary: Create a user-level variable operationId: createUserVariable parameters: - type: string description: name of the variable name: variablename in: path required: true - name: body in: body schema: $ref: '#/definitions/CreateVariableOption' responses: '201': description: response when creating a variable '204': description: response when creating a variable '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - user summary: Delete a user-level variable which is created by current doer operationId: deleteUserVariable parameters: - type: string description: name of the variable name: variablename in: path required: true responses: '201': description: response when deleting a variable '204': description: response when deleting a variable '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/activitypub/follow: post: tags: - user summary: Follow a remote activitypub account operationId: userCurrentActivityPubFollow parameters: - name: body in: body schema: $ref: '#/definitions/APRemoteFollowOption' responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/applications/oauth2: get: produces: - application/json tags: - user summary: List the authenticated user's oauth2 applications operationId: userGetOAuth2Applications parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/OAuth2ApplicationList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' post: produces: - application/json tags: - user summary: Creates a new OAuth2 application operationId: userCreateOAuth2Application parameters: - name: body in: body required: true schema: $ref: '#/definitions/CreateOAuth2ApplicationOptions' responses: '201': $ref: '#/responses/OAuth2Application' '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/applications/oauth2/{id}: get: produces: - application/json tags: - user summary: Get an OAuth2 application operationId: userGetOAuth2Application parameters: - type: integer format: int64 description: Application ID to be found name: id in: path required: true responses: '200': $ref: '#/responses/OAuth2Application' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - user summary: Delete an OAuth2 application operationId: userDeleteOAuth2Application parameters: - type: integer format: int64 description: token to be deleted name: id in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' patch: produces: - application/json tags: - user summary: Update an OAuth2 application, this includes regenerating the client secret operationId: userUpdateOAuth2Application parameters: - type: integer format: int64 description: application to be updated name: id in: path required: true - name: body in: body required: true schema: $ref: '#/definitions/CreateOAuth2ApplicationOptions' responses: '200': $ref: '#/responses/OAuth2Application' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/avatar: post: produces: - application/json tags: - user summary: Update avatar of the current user operationId: userUpdateAvatar parameters: - name: body in: body schema: $ref: '#/definitions/UpdateUserAvatarOption' responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' delete: produces: - application/json tags: - user summary: Delete avatar of the current user. It will be replaced by a default one operationId: userDeleteAvatar responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/block/{username}: put: produces: - application/json tags: - user summary: Blocks a user from the doer operationId: userBlockUser parameters: - type: string description: username of the user name: username in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /user/emails: get: produces: - application/json tags: - user summary: List all email addresses of the current user operationId: userListEmails responses: '200': $ref: '#/responses/EmailList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' post: produces: - application/json tags: - user summary: Add an email addresses to the current user's account operationId: userAddEmail parameters: - name: body in: body schema: $ref: '#/definitions/CreateEmailOption' responses: '201': $ref: '#/responses/EmailList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '422': $ref: '#/responses/validationError' delete: produces: - application/json tags: - user summary: Delete email addresses from the current user's account operationId: userDeleteEmail parameters: - name: body in: body schema: $ref: '#/definitions/DeleteEmailOption' responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/followers: get: produces: - application/json tags: - user summary: List the authenticated user's followers operationId: userCurrentListFollowers parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/UserList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/following: get: produces: - application/json tags: - user summary: List the users that the authenticated user is following operationId: userCurrentListFollowing parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/UserList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/following/{username}: get: tags: - user summary: Check whether a user is followed by the authenticated user operationId: userCurrentCheckFollowing parameters: - type: string description: username of followed user name: username in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' put: tags: - user summary: Follow a user operationId: userCurrentPutFollow parameters: - type: string description: username of user to follow name: username in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: tags: - user summary: Unfollow a user operationId: userCurrentDeleteFollow parameters: - type: string description: username of user to unfollow name: username in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/gpg_key_token: get: produces: - text/plain tags: - user summary: Get a Token to verify operationId: getVerificationToken responses: '200': $ref: '#/responses/string' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/gpg_key_verify: post: consumes: - application/json produces: - application/json tags: - user summary: Verify a GPG key operationId: userVerifyGPGKey parameters: - name: body in: body schema: $ref: '#/definitions/VerifyGPGKeyOption' responses: '201': $ref: '#/responses/GPGKey' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /user/gpg_keys: get: produces: - application/json tags: - user summary: List the authenticated user's GPG keys operationId: userCurrentListGPGKeys parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/GPGKeyList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' post: consumes: - application/json produces: - application/json tags: - user summary: Add a GPG public key to current user's account operationId: userCurrentPostGPGKey parameters: - name: Form in: body schema: $ref: '#/definitions/CreateGPGKeyOption' responses: '201': $ref: '#/responses/GPGKey' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /user/gpg_keys/{id}: get: produces: - application/json tags: - user summary: Get a GPG key operationId: userCurrentGetGPGKey parameters: - type: integer format: int64 description: id of key to get name: id in: path required: true responses: '200': $ref: '#/responses/GPGKey' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - user summary: Remove a GPG public key from current user's account operationId: userCurrentDeleteGPGKey parameters: - type: integer format: int64 description: id of key to delete name: id in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/hooks: get: produces: - application/json tags: - user summary: List the authenticated user's webhooks operationId: userListHooks parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/HookListWithoutPagination' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' post: consumes: - application/json produces: - application/json tags: - user summary: Create a hook operationId: userCreateHook parameters: - name: body in: body required: true schema: $ref: '#/definitions/CreateHookOption' responses: '201': $ref: '#/responses/Hook' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/hooks/{id}: get: produces: - application/json tags: - user summary: Get a hook operationId: userGetHook parameters: - type: integer format: int64 description: id of the hook to get name: id in: path required: true responses: '200': $ref: '#/responses/Hook' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' delete: produces: - application/json tags: - user summary: Delete a hook operationId: userDeleteHook parameters: - type: integer format: int64 description: id of the hook to delete name: id in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' patch: consumes: - application/json produces: - application/json tags: - user summary: Update a hook operationId: userEditHook parameters: - type: integer format: int64 description: id of the hook to update name: id in: path required: true - name: body in: body schema: $ref: '#/definitions/EditHookOption' responses: '200': $ref: '#/responses/Hook' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/keys: get: produces: - application/json tags: - user summary: List the authenticated user's public keys operationId: userCurrentListKeys parameters: - type: string description: fingerprint of the key name: fingerprint in: query - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/PublicKeyList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' post: consumes: - application/json produces: - application/json tags: - user summary: Create a public key operationId: userCurrentPostKey parameters: - name: body in: body schema: $ref: '#/definitions/CreateKeyOption' responses: '201': $ref: '#/responses/PublicKey' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '422': $ref: '#/responses/validationError' /user/keys/{id}: get: produces: - application/json tags: - user summary: Get a public key operationId: userCurrentGetKey parameters: - type: integer format: int64 description: id of key to get name: id in: path required: true responses: '200': $ref: '#/responses/PublicKey' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - user summary: Delete a public key operationId: userCurrentDeleteKey parameters: - type: integer format: int64 description: id of key to delete name: id in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/list_blocked: get: produces: - application/json tags: - user summary: List the authenticated user's blocked users operationId: userListBlockedUsers parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/BlockedUserList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/quota: get: produces: - application/json tags: - user summary: Get quota information for the authenticated user operationId: userGetQuota responses: '200': $ref: '#/responses/QuotaInfo' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/quota/artifacts: get: produces: - application/json tags: - user summary: List the artifacts affecting the authenticated user's quota operationId: userListQuotaArtifacts parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/QuotaUsedArtifactList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/quota/attachments: get: produces: - application/json tags: - user summary: List the attachments affecting the authenticated user's quota operationId: userListQuotaAttachments parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/QuotaUsedAttachmentList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/quota/check: get: produces: - application/json tags: - user summary: Check if the authenticated user is over quota for a given subject operationId: userCheckQuota parameters: - type: string description: subject of the quota name: subject in: query required: true responses: '200': description: Returns true if the action is accepted. schema: type: boolean '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '422': $ref: '#/responses/validationError' /user/quota/packages: get: produces: - application/json tags: - user summary: List the packages affecting the authenticated user's quota operationId: userListQuotaPackages parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/QuotaUsedPackageList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/repos: get: produces: - application/json tags: - user summary: List the repos that the authenticated user owns operationId: userCurrentListRepos parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query - enum: - name - id - newest - oldest - recentupdate - leastupdate - reversealphabetically - alphabetically - reversesize - size - reversegitsize - gitsize - reverselfssize - lfssize - moststars - feweststars - mostforks - fewestforks type: string description: order the repositories name: order_by in: query responses: '200': $ref: '#/responses/RepositoryList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '422': $ref: '#/responses/validationError' post: consumes: - application/json produces: - application/json tags: - user summary: Create a repository operationId: createCurrentUserRepo parameters: - name: body in: body schema: $ref: '#/definitions/CreateRepoOption' responses: '201': $ref: '#/responses/Repository' '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '409': description: The repository with the same name already exists. '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/validationError' /user/settings: get: produces: - application/json tags: - user summary: Get current user's account settings operationId: getUserSettings responses: '200': $ref: '#/responses/UserSettings' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' patch: produces: - application/json tags: - user summary: Update settings in current user's account operationId: updateUserSettings parameters: - name: body in: body schema: $ref: '#/definitions/UserSettingsOptions' responses: '200': $ref: '#/responses/UserSettings' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/starred: get: produces: - application/json tags: - user summary: The repos that the authenticated user has starred operationId: userCurrentListStarred parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/RepositoryList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/starred/{owner}/{repo}: get: tags: - user summary: Whether the authenticated is starring the repo operationId: userCurrentCheckStarring parameters: - type: string description: owner of the repo name: owner in: path required: true - type: string description: name of the repo name: repo in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' put: tags: - user summary: Star the given repo operationId: userCurrentPutStar parameters: - type: string description: owner of the repo to star name: owner in: path required: true - type: string description: name of the repo to star name: repo in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: tags: - user summary: Unstar the given repo operationId: userCurrentDeleteStar parameters: - type: string description: owner of the repo to unstar name: owner in: path required: true - type: string description: name of the repo to unstar name: repo in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/stopwatches: get: consumes: - application/json produces: - application/json tags: - user summary: Get list of all existing stopwatches operationId: userGetStopWatches parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/StopWatchList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/subscriptions: get: produces: - application/json tags: - user summary: List repositories watched by the authenticated user operationId: userCurrentListSubscriptions parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/RepositoryList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/teams: get: produces: - application/json tags: - user summary: List all the teams a user belongs to operationId: userListTeams parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/TeamList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/times: get: produces: - application/json tags: - user summary: List the current user's tracked times operationId: userCurrentTrackedTimes parameters: - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query - type: string format: date-time description: Only show times updated after the given time. This is a timestamp in RFC 3339 format name: since in: query - type: string format: date-time description: Only show times updated before the given time. This is a timestamp in RFC 3339 format name: before in: query responses: '200': $ref: '#/responses/TrackedTimeList' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' /user/unblock/{username}: put: produces: - application/json tags: - user summary: Unblocks a user from the doer operationId: userUnblockUser parameters: - type: string description: username of the user name: username in: path required: true responses: '204': $ref: '#/responses/empty' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /users/search: get: produces: - application/json tags: - user summary: Search for users operationId: userSearch parameters: - type: string description: keyword name: q in: query - type: integer format: int64 description: ID of the user to search for name: uid in: query - enum: - oldest - newest - alphabetically - reversealphabetically - recentupdate - leastupdate type: string description: sort order of results name: sort in: query - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': description: SearchResults of a successful search schema: type: object title: UserSearchResults properties: data: type: array items: $ref: '#/definitions/User' ok: type: boolean /users/{username}: get: produces: - application/json tags: - user summary: Get a user operationId: userGet parameters: - type: string description: username of user to get name: username in: path required: true responses: '200': $ref: '#/responses/User' '404': $ref: '#/responses/notFound' /users/{username}/activities/feeds: get: produces: - application/json tags: - user summary: List a user's activity feeds operationId: userListActivityFeeds parameters: - type: string description: username of user name: username in: path required: true - type: boolean description: if true, only show actions performed by the requested user name: only-performed-by in: query - type: string format: date description: the date of the activities to be found name: date in: query - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/ActivityFeedsList' '404': $ref: '#/responses/notFound' /users/{username}/followers: get: produces: - application/json tags: - user summary: List the given user's followers operationId: userListFollowers parameters: - type: string description: username of user name: username in: path required: true - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/UserList' '404': $ref: '#/responses/notFound' /users/{username}/following: get: produces: - application/json tags: - user summary: List the users that the given user is following operationId: userListFollowing parameters: - type: string description: username of user name: username in: path required: true - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/UserList' '404': $ref: '#/responses/notFound' /users/{username}/following/{target}: get: tags: - user summary: Check if one user is following another user operationId: userCheckFollowing parameters: - type: string description: username of following user name: username in: path required: true - type: string description: username of followed user name: target in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' /users/{username}/gpg_keys: get: produces: - application/json tags: - user summary: List the given user's GPG keys operationId: userListGPGKeys parameters: - type: string description: username of user name: username in: path required: true - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/GPGKeyList' '404': $ref: '#/responses/notFound' /users/{username}/heatmap: get: produces: - application/json tags: - user summary: Get a user's heatmap operationId: userGetHeatmapData parameters: - type: string description: username of user to get name: username in: path required: true responses: '200': $ref: '#/responses/UserHeatmapData' '404': $ref: '#/responses/notFound' /users/{username}/keys: get: produces: - application/json tags: - user summary: List the given user's public keys operationId: userListKeys parameters: - type: string description: username of user name: username in: path required: true - type: string description: fingerprint of the key name: fingerprint in: query - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/PublicKeyList' '404': $ref: '#/responses/notFound' /users/{username}/repos: get: produces: - application/json tags: - user summary: List the repos owned by the given user operationId: userListRepos parameters: - type: string description: username of user name: username in: path required: true - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/RepositoryList' '404': $ref: '#/responses/notFound' /users/{username}/starred: get: produces: - application/json tags: - user summary: The repos that the given user has starred operationId: userListStarred parameters: - type: string description: username of user name: username in: path required: true - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/RepositoryList' '404': $ref: '#/responses/notFound' /users/{username}/subscriptions: get: produces: - application/json tags: - user summary: List the repositories watched by a user operationId: userListSubscriptions parameters: - type: string description: username of the user name: username in: path required: true - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/RepositoryList' '404': $ref: '#/responses/notFound' /users/{username}/tokens: get: produces: - application/json tags: - user summary: List the specified user's access tokens operationId: userGetTokens parameters: - type: string description: username of user name: username in: path required: true - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results name: limit in: query responses: '200': $ref: '#/responses/AccessTokenList' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' post: consumes: - application/json produces: - application/json tags: - user summary: Generate an access token for the specified user operationId: userCreateToken parameters: - type: string description: username of user name: username in: path required: true - name: body in: body schema: $ref: '#/definitions/CreateAccessTokenOption' responses: '201': $ref: '#/responses/AccessToken' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /users/{username}/tokens/{token}: delete: produces: - application/json tags: - user summary: Delete an access token from the specified user's account operationId: userDeleteAccessToken parameters: - type: string description: username of user name: username in: path required: true - type: string description: token to be deleted, identified by ID and if not available by name name: token in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/error' definitions: Team: description: Team represents a team in an organization type: object properties: can_create_org_repo: type: boolean x-go-name: CanCreateOrgRepo description: type: string x-go-name: Description id: type: integer format: int64 x-go-name: ID includes_all_repositories: type: boolean x-go-name: IncludesAllRepositories name: type: string x-go-name: Name organization: $ref: '#/definitions/Organization' permission: type: string enum: - none - read - write - admin - owner x-go-name: Permission units: type: array items: type: string x-go-name: Units example: - repo.code - repo.issues - repo.ext_issues - repo.wiki - repo.pulls - repo.releases - repo.projects - repo.ext_wiki units_map: type: object additionalProperties: type: string x-go-name: UnitsMap example: repo.actions: none repo.code: read repo.ext_issues: none repo.ext_wiki: none repo.issues: write repo.packages: none repo.projects: none repo.pulls: owner repo.releases: none repo.wiki: admin x-go-package: forgejo.org/modules/structs APIUnauthorizedError: type: object properties: message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/services/context APIValidationError: type: object properties: message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/services/context DeleteEmailOption: description: DeleteEmailOption options when deleting email addresses type: object properties: emails: description: email addresses to delete type: array items: type: string x-go-name: Emails x-go-package: forgejo.org/modules/structs Issue: description: Issue represents an issue in a repository type: object properties: assets: type: array items: $ref: '#/definitions/Attachment' x-go-name: Attachments assignee: $ref: '#/definitions/User' assignees: type: array items: $ref: '#/definitions/User' x-go-name: Assignees body: type: string x-go-name: Body closed_at: type: string format: date-time x-go-name: Closed comments: type: integer format: int64 x-go-name: Comments created_at: type: string format: date-time x-go-name: Created due_date: type: string format: date-time x-go-name: Deadline html_url: type: string x-go-name: HTMLURL id: type: integer format: int64 x-go-name: ID is_locked: type: boolean x-go-name: IsLocked labels: type: array items: $ref: '#/definitions/Label' x-go-name: Labels milestone: $ref: '#/definitions/Milestone' number: type: integer format: int64 x-go-name: Index original_author: type: string x-go-name: OriginalAuthor original_author_id: type: integer format: int64 x-go-name: OriginalAuthorID pin_order: type: integer format: int64 x-go-name: PinOrder pull_request: $ref: '#/definitions/PullRequestMeta' ref: type: string x-go-name: Ref repository: $ref: '#/definitions/RepositoryMeta' state: $ref: '#/definitions/StateType' title: type: string x-go-name: Title updated_at: type: string format: date-time x-go-name: Updated url: type: string x-go-name: URL user: $ref: '#/definitions/User' x-go-package: forgejo.org/modules/structs Milestone: description: Milestone milestone is a collection of issues on one repository type: object properties: closed_at: type: string format: date-time x-go-name: Closed closed_issues: type: integer format: int64 x-go-name: ClosedIssues created_at: type: string format: date-time x-go-name: Created description: type: string x-go-name: Description due_on: type: string format: date-time x-go-name: Deadline id: type: integer format: int64 x-go-name: ID open_issues: type: integer format: int64 x-go-name: OpenIssues state: $ref: '#/definitions/StateType' title: type: string x-go-name: Title updated_at: type: string format: date-time x-go-name: Updated x-go-package: forgejo.org/modules/structs TimeStamp: description: TimeStamp defines a timestamp type: integer format: int64 x-go-package: forgejo.org/modules/timeutil ExternalWiki: description: ExternalWiki represents setting for external wiki type: object properties: external_wiki_url: description: URL of external wiki. type: string x-go-name: ExternalWikiURL x-go-package: forgejo.org/modules/structs QuotaUsedPackage: description: QuotaUsedPackage represents a package counting towards a user's quota type: object properties: html_url: description: HTML URL to the package version type: string x-go-name: HTMLURL name: description: Name of the package type: string x-go-name: Name size: description: Size of the package version type: integer format: int64 x-go-name: Size type: description: Type of the package type: string x-go-name: Type version: description: Version of the package type: string x-go-name: Version x-go-package: forgejo.org/modules/structs QuotaUsedSizeGit: description: QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user type: object properties: LFS: description: Storage size of the user's Git LFS objects type: integer format: int64 x-go-package: forgejo.org/modules/structs InternalTracker: description: InternalTracker represents settings for internal tracker type: object properties: allow_only_contributors_to_track_time: description: Let only contributors track time (Built-in issue tracker) type: boolean x-go-name: AllowOnlyContributorsToTrackTime enable_issue_dependencies: description: Enable dependencies for issues and pull requests (Built-in issue tracker) type: boolean x-go-name: EnableIssueDependencies enable_time_tracker: description: Enable time tracking (Built-in issue tracker) type: boolean x-go-name: EnableTimeTracker x-go-package: forgejo.org/modules/structs QuotaUsedSizeAssetsPackages: description: QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user type: object properties: all: description: Storage suze used for the user's packages type: integer format: int64 x-go-name: All x-go-package: forgejo.org/modules/structs CreateOrUpdateSecretOption: type: object title: CreateOrUpdateSecretOption defines the properties of the secret to create or update. required: - data properties: data: description: 'Data of the secret. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained.' type: string x-go-name: Data x-go-package: forgejo.org/modules/structs CreateHookOption: description: CreateHookOption options when create a hook type: object required: - type - config properties: active: type: boolean default: false x-go-name: Active authorization_header: type: string x-go-name: AuthorizationHeader branch_filter: type: string x-go-name: BranchFilter config: $ref: '#/definitions/CreateHookOptionConfig' events: type: array items: type: string x-go-name: Events type: type: string enum: - forgejo - dingtalk - discord - gitea - gogs - msteams - slack - telegram - feishu - wechatwork - packagist x-go-name: Type x-go-package: forgejo.org/modules/structs CreateHookOptionConfig: description: 'CreateHookOptionConfig has all config options in it required are "content_type" and "url" Required' type: object additionalProperties: type: string x-go-package: forgejo.org/modules/structs GPGKey: description: GPGKey a user GPG key to sign commit and tag in repository type: object properties: can_certify: type: boolean x-go-name: CanCertify can_encrypt_comms: type: boolean x-go-name: CanEncryptComms can_encrypt_storage: type: boolean x-go-name: CanEncryptStorage can_sign: type: boolean x-go-name: CanSign created_at: type: string format: date-time x-go-name: Created emails: type: array items: $ref: '#/definitions/GPGKeyEmail' x-go-name: Emails expires_at: type: string format: date-time x-go-name: Expires id: type: integer format: int64 x-go-name: ID key_id: type: string x-go-name: KeyID primary_key_id: type: string x-go-name: PrimaryKeyID public_key: type: string x-go-name: PublicKey subkeys: type: array items: $ref: '#/definitions/GPGKey' x-go-name: SubsKey verified: type: boolean x-go-name: Verified x-go-package: forgejo.org/modules/structs CreateKeyOption: description: CreateKeyOption options when creating a key type: object required: - title - key properties: key: description: An armored SSH key to add type: string uniqueItems: true x-go-name: Key read_only: description: Describe if the key has only read access or read/write type: boolean x-go-name: ReadOnly title: description: Title of the key to add type: string uniqueItems: true x-go-name: Title x-go-package: forgejo.org/modules/structs PullRequestMeta: description: PullRequestMeta PR info if an issue is a PR type: object properties: draft: type: boolean x-go-name: IsWorkInProgress html_url: type: string x-go-name: HTMLURL merged: type: boolean x-go-name: HasMerged merged_at: type: string format: date-time x-go-name: Merged x-go-package: forgejo.org/modules/structs Repository: description: Repository represents a repository type: object properties: allow_fast_forward_only_merge: type: boolean x-go-name: AllowFastForwardOnly allow_merge_commits: type: boolean x-go-name: AllowMerge allow_rebase: type: boolean x-go-name: AllowRebase allow_rebase_explicit: type: boolean x-go-name: AllowRebaseMerge allow_rebase_update: type: boolean x-go-name: AllowRebaseUpdate allow_squash_merge: type: boolean x-go-name: AllowSquash archived: type: boolean x-go-name: Archived archived_at: type: string format: date-time x-go-name: ArchivedAt avatar_url: type: string x-go-name: AvatarURL clone_url: type: string x-go-name: CloneURL created_at: type: string format: date-time x-go-name: Created default_allow_maintainer_edit: type: boolean x-go-name: DefaultAllowMaintainerEdit default_branch: type: string x-go-name: DefaultBranch default_delete_branch_after_merge: type: boolean x-go-name: DefaultDeleteBranchAfterMerge default_merge_style: type: string x-go-name: DefaultMergeStyle default_update_style: type: string x-go-name: DefaultUpdateStyle description: type: string x-go-name: Description empty: type: boolean x-go-name: Empty external_tracker: $ref: '#/definitions/ExternalTracker' external_wiki: $ref: '#/definitions/ExternalWiki' fork: type: boolean x-go-name: Fork forks_count: type: integer format: int64 x-go-name: Forks full_name: type: string x-go-name: FullName globally_editable_wiki: type: boolean x-go-name: GloballyEditableWiki has_actions: type: boolean x-go-name: HasActions has_issues: type: boolean x-go-name: HasIssues has_packages: type: boolean x-go-name: HasPackages has_projects: type: boolean x-go-name: HasProjects has_pull_requests: type: boolean x-go-name: HasPullRequests has_releases: type: boolean x-go-name: HasReleases has_wiki: description: is the wiki enabled type: boolean x-go-name: HasWiki has_wiki_contents: description: have wiki pages ever been created type: boolean x-go-name: HasWikiContents html_url: type: string x-go-name: HTMLURL id: type: integer format: int64 x-go-name: ID ignore_whitespace_conflicts: type: boolean x-go-name: IgnoreWhitespaceConflicts internal: type: boolean x-go-name: Internal internal_tracker: $ref: '#/definitions/InternalTracker' language: type: string x-go-name: Language languages_url: type: string x-go-name: LanguagesURL link: type: string x-go-name: Link mirror: type: boolean x-go-name: Mirror mirror_interval: type: string x-go-name: MirrorInterval mirror_updated: type: string format: date-time x-go-name: MirrorUpdated name: type: string x-go-name: Name object_format_name: description: ObjectFormatName of the underlying git repository type: string enum: - sha1 - sha256 x-go-name: ObjectFormatName open_issues_count: type: integer format: int64 x-go-name: OpenIssues open_pr_counter: type: integer format: int64 x-go-name: OpenPulls original_url: type: string x-go-name: OriginalURL owner: $ref: '#/definitions/User' parent: $ref: '#/definitions/Repository' permissions: $ref: '#/definitions/Permission' private: type: boolean x-go-name: Private release_counter: type: integer format: int64 x-go-name: Releases repo_transfer: $ref: '#/definitions/RepoTransfer' size: type: integer format: int64 x-go-name: Size ssh_url: type: string x-go-name: SSHURL stars_count: type: integer format: int64 x-go-name: Stars template: type: boolean x-go-name: Template topics: type: array items: type: string x-go-name: Topics updated_at: type: string format: date-time x-go-name: Updated url: type: string x-go-name: URL watchers_count: type: integer format: int64 x-go-name: Watchers website: type: string x-go-name: Website wiki_branch: type: string x-go-name: WikiBranch wiki_clone_url: type: string x-go-name: WikiCloneURL wiki_ssh_url: type: string x-go-name: WikiSSHURL x-go-package: forgejo.org/modules/structs User: description: User represents a user type: object properties: active: description: Is user active type: boolean x-go-name: IsActive avatar_url: description: URL to the user's avatar type: string x-go-name: AvatarURL created: type: string format: date-time x-go-name: Created description: description: the user's description type: string x-go-name: Description email: type: string format: email x-go-name: Email followers_count: description: user counts type: integer format: int64 x-go-name: Followers following_count: type: integer format: int64 x-go-name: Following full_name: description: the user's full name type: string x-go-name: FullName html_url: description: URL to the user's profile page type: string x-go-name: HTMLURL id: description: the user's id type: integer format: int64 x-go-name: ID is_admin: description: Is the user an administrator type: boolean x-go-name: IsAdmin language: description: User locale type: string x-go-name: Language last_login: type: string format: date-time x-go-name: LastLogin location: description: the user's location type: string x-go-name: Location login: description: the user's username type: string x-go-name: UserName login_name: description: the user's authentication sign-in name. type: string default: empty x-go-name: LoginName prohibit_login: description: Is user login prohibited type: boolean x-go-name: ProhibitLogin pronouns: description: the user's pronouns type: string x-go-name: Pronouns restricted: description: Is user restricted type: boolean x-go-name: Restricted source_id: description: The ID of the user's Authentication Source type: integer format: int64 x-go-name: SourceID starred_repos_count: type: integer format: int64 x-go-name: StarredRepos visibility: description: 'User visibility level option: public, limited, private' type: string x-go-name: Visibility website: description: the user's website type: string x-go-name: Website x-go-package: forgejo.org/modules/structs StopWatch: description: StopWatch represent a running stopwatch type: object properties: created: type: string format: date-time x-go-name: Created duration: type: string x-go-name: Duration issue_index: type: integer format: int64 x-go-name: IssueIndex issue_title: type: string x-go-name: IssueTitle repo_name: type: string x-go-name: RepoName repo_owner_name: type: string x-go-name: RepoOwnerName seconds: type: integer format: int64 x-go-name: Seconds x-go-package: forgejo.org/modules/structs QuotaUsedPackageList: description: QuotaUsedPackageList represents a list of packages counting towards a user's quota type: array items: $ref: '#/definitions/QuotaUsedPackage' x-go-package: forgejo.org/modules/structs Activity: type: object properties: act_user: $ref: '#/definitions/User' act_user_id: type: integer format: int64 x-go-name: ActUserID comment: $ref: '#/definitions/Comment' comment_id: type: integer format: int64 x-go-name: CommentID content: type: string x-go-name: Content created: type: string format: date-time x-go-name: Created id: type: integer format: int64 x-go-name: ID is_private: type: boolean x-go-name: IsPrivate op_type: description: the type of action type: string enum: - create_repo - rename_repo - star_repo - watch_repo - commit_repo - create_issue - create_pull_request - transfer_repo - push_tag - comment_issue - merge_pull_request - close_issue - reopen_issue - close_pull_request - reopen_pull_request - delete_tag - delete_branch - mirror_sync_push - mirror_sync_create - mirror_sync_delete - approve_pull_request - reject_pull_request - comment_pull - publish_release - pull_review_dismissed - pull_request_ready_for_review - auto_merge_pull_request x-go-name: OpType ref_name: type: string x-go-name: RefName repo: $ref: '#/definitions/Repository' repo_id: type: integer format: int64 x-go-name: RepoID user_id: type: integer format: int64 x-go-name: UserID x-go-package: forgejo.org/modules/structs QuotaUsedArtifactList: description: QuotaUsedArtifactList represents a list of artifacts counting towards a user's quota type: array items: $ref: '#/definitions/QuotaUsedArtifact' x-go-package: forgejo.org/modules/structs APINotFound: type: object properties: errors: type: array items: type: string x-go-name: Errors message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/services/context ActionRunner: description: ActionRunner represents a runner type: object properties: description: description: Description provides optional details about this runner. type: string x-go-name: Description ephemeral: description: Indicates if runner is ephemeral runner type: boolean x-go-name: Ephemeral id: description: ID uniquely identifies this runner. type: integer format: int64 x-go-name: ID labels: description: Labels is a list of labels attached to this runner. type: array items: type: string x-go-name: Labels name: description: Name of the runner; not unique. type: string x-go-name: Name owner_id: description: 'OwnerID is the identifier of the user or organization this runner belongs to. O if the runner is owned by a repository.' type: integer format: int64 x-go-name: OwnerID repo_id: description: 'RepoID is the identifier of the repository this runner belongs to. 0 if the runner belongs to a user or organization.' type: integer format: int64 x-go-name: RepoID status: description: Status indicates whether this runner is offline, or active, for example. type: string enum: - offline - idle - active x-go-name: Status uuid: description: UUID uniquely identifies this runner. type: string x-go-name: UUID version: description: Version is the self-reported version string of Forgejo Runner. type: string x-go-name: Version x-go-package: forgejo.org/modules/structs QuotaUsedAttachment: description: QuotaUsedAttachment represents an attachment counting towards a user's quota type: object properties: api_url: description: API URL for the attachment type: string x-go-name: APIURL contained_in: description: 'Context for the attachment: URLs to the containing object' type: object properties: api_url: description: API URL for the object that contains this attachment type: string x-go-name: APIURL html_url: description: HTML URL for the object that contains this attachment type: string x-go-name: HTMLURL x-go-name: ContainedIn name: description: Filename of the attachment type: string x-go-name: Name size: description: Size of the attachment (in bytes) type: integer format: int64 x-go-name: Size x-go-package: forgejo.org/modules/structs Email: description: Email an email address belonging to a user type: object properties: email: type: string format: email x-go-name: Email primary: type: boolean x-go-name: Primary user_id: type: integer format: int64 x-go-name: UserID username: type: string x-go-name: UserName verified: type: boolean x-go-name: Verified x-go-package: forgejo.org/modules/structs GPGKeyEmail: description: GPGKeyEmail an email attached to a GPGKey type: object properties: email: type: string x-go-name: Email verified: type: boolean x-go-name: Verified x-go-package: forgejo.org/modules/structs RepoTargetOption: type: object required: - owner - name properties: name: description: Name of repository type: string x-go-name: Name owner: description: Name of user or organisation that owns the repository type: string x-go-name: Owner x-go-package: forgejo.org/modules/structs RegisterRunnerOptions: type: object title: RegisterRunnerOptions declares the accepted options for registering runners. required: - name properties: description: description: Description of the runner to register. type: string x-go-name: Description ephemeral: description: Register as ephemeral runner https://forgejo.org/docs/latest/admin/actions/security/#ephemeral-runner type: boolean x-go-name: Ephemeral name: description: Name of the runner to register. The name of the runner does not have to be unique. type: string x-go-name: Name x-go-package: forgejo.org/modules/structs CreateVariableOption: type: object title: CreateVariableOption defines the properties of the variable to create. required: - value properties: value: description: 'Value of the variable to create. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained.' type: string x-go-name: Value x-go-package: forgejo.org/modules/structs UserSettingsOptions: description: UserSettingsOptions represents options to change user settings type: object properties: description: type: string x-go-name: Description diff_view_style: type: string x-go-name: DiffViewStyle enable_repo_unit_hints: type: boolean x-go-name: EnableRepoUnitHints full_name: type: string x-go-name: FullName hide_activity: type: boolean x-go-name: HideActivity hide_email: description: Privacy type: boolean x-go-name: HideEmail hide_pronouns: type: boolean x-go-name: HidePronouns language: type: string x-go-name: Language location: type: string x-go-name: Location pronouns: type: string x-go-name: Pronouns theme: type: string x-go-name: Theme website: type: string x-go-name: Website x-go-package: forgejo.org/modules/structs QuotaUsedSize: description: QuotaUsedSize represents the size-based quota usage of a user type: object properties: assets: $ref: '#/definitions/QuotaUsedSizeAssets' git: $ref: '#/definitions/QuotaUsedSizeGit' repos: $ref: '#/definitions/QuotaUsedSizeRepos' x-go-package: forgejo.org/modules/structs QuotaUsedArtifact: description: QuotaUsedArtifact represents an artifact counting towards a user's quota type: object properties: html_url: description: HTML URL to the action run containing the artifact type: string x-go-name: HTMLURL name: description: Name of the artifact type: string x-go-name: Name size: description: Size of the artifact (compressed) type: integer format: int64 x-go-name: Size x-go-package: forgejo.org/modules/structs APRemoteFollowOption: type: object properties: target: type: string x-go-name: Target x-go-package: forgejo.org/modules/structs Hook: description: Hook a hook is a web hook when one repository changed type: object properties: active: type: boolean x-go-name: Active authorization_header: type: string x-go-name: AuthorizationHeader branch_filter: type: string x-go-name: BranchFilter config: description: 'Deprecated: use Metadata instead' type: object additionalProperties: type: string x-go-name: Config content_type: type: string x-go-name: ContentType created_at: type: string format: date-time x-go-name: Created events: type: array items: type: string x-go-name: Events id: type: integer format: int64 x-go-name: ID metadata: x-go-name: Metadata type: type: string x-go-name: Type updated_at: type: string format: date-time x-go-name: Updated url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs QuotaGroup: description: QuotaGroup represents a quota group type: object properties: name: description: Name of the group type: string x-go-name: Name rules: description: Rules associated with the group type: array items: $ref: '#/definitions/QuotaRuleInfo' x-go-name: Rules x-go-package: forgejo.org/modules/structs EditHookOption: description: EditHookOption options when modify one hook type: object properties: active: type: boolean x-go-name: Active authorization_header: type: string x-go-name: AuthorizationHeader branch_filter: type: string x-go-name: BranchFilter config: type: object additionalProperties: type: string x-go-name: Config events: type: array items: type: string x-go-name: Events x-go-package: forgejo.org/modules/structs RegistrationToken: description: RegistrationToken is a string used to register a runner with a server type: object properties: token: type: string x-go-name: Token x-go-package: forgejo.org/routers/api/v1/shared UserHeatmapData: description: UserHeatmapData represents the data needed to create a heatmap type: object properties: contributions: type: integer format: int64 x-go-name: Contributions timestamp: $ref: '#/definitions/TimeStamp' x-go-package: forgejo.org/models/activities Organization: description: Organization represents an organization type: object properties: avatar_url: type: string x-go-name: AvatarURL created: type: string format: date-time x-go-name: Created description: type: string x-go-name: Description email: type: string x-go-name: Email full_name: type: string x-go-name: FullName id: type: integer format: int64 x-go-name: ID location: type: string x-go-name: Location name: type: string x-go-name: Name repo_admin_change_team_access: type: boolean x-go-name: RepoAdminChangeTeamAccess username: description: deprecated type: string x-go-name: UserName visibility: type: string x-go-name: Visibility website: type: string x-go-name: Website x-go-package: forgejo.org/modules/structs VerifyGPGKeyOption: description: VerifyGPGKeyOption options verifies user GPG key type: object required: - key_id properties: armored_signature: type: string x-go-name: Signature key_id: description: An Signature for a GPG key token type: string x-go-name: KeyID x-go-package: forgejo.org/modules/structs QuotaRuleInfo: description: QuotaRuleInfo contains information about a quota rule type: object properties: limit: description: The limit set by the rule type: integer format: int64 x-go-name: Limit name: description: Name of the rule (only shown to admins) type: string x-go-name: Name subjects: description: Subjects the rule affects type: array items: type: string x-go-name: Subjects x-go-package: forgejo.org/modules/structs QuotaUsedAttachmentList: description: QuotaUsedAttachmentList represents a list of attachment counting towards a user's quota type: array items: $ref: '#/definitions/QuotaUsedAttachment' x-go-package: forgejo.org/modules/structs CreateEmailOption: description: CreateEmailOption options when creating email addresses type: object properties: emails: description: email addresses to add type: array items: type: string x-go-name: Emails x-go-package: forgejo.org/modules/structs RepositoryMeta: description: RepositoryMeta basic repository information type: object properties: full_name: type: string x-go-name: FullName id: type: integer format: int64 x-go-name: ID name: type: string x-go-name: Name owner: type: string x-go-name: Owner x-go-package: forgejo.org/modules/structs Attachment: description: Attachment a generic attachment type: object properties: browser_download_url: type: string x-go-name: DownloadURL created_at: type: string format: date-time x-go-name: Created download_count: type: integer format: int64 x-go-name: DownloadCount id: type: integer format: int64 x-go-name: ID name: type: string x-go-name: Name size: type: integer format: int64 x-go-name: Size type: type: string enum: - attachment - external x-go-name: Type uuid: type: string x-go-name: UUID x-go-package: forgejo.org/modules/structs CreateGPGKeyOption: description: CreateGPGKeyOption options create user GPG key type: object required: - armored_public_key properties: armored_public_key: description: An armored GPG key to add type: string uniqueItems: true x-go-name: ArmoredKey armored_signature: type: string x-go-name: Signature x-go-package: forgejo.org/modules/structs UserSettings: description: UserSettings represents user settings type: object properties: description: type: string x-go-name: Description diff_view_style: type: string x-go-name: DiffViewStyle enable_repo_unit_hints: type: boolean x-go-name: EnableRepoUnitHints full_name: type: string x-go-name: FullName hide_activity: type: boolean x-go-name: HideActivity hide_email: description: Privacy type: boolean x-go-name: HideEmail hide_pronouns: type: boolean x-go-name: HidePronouns language: type: string x-go-name: Language location: type: string x-go-name: Location pronouns: type: string x-go-name: Pronouns theme: type: string x-go-name: Theme website: type: string x-go-name: Website x-go-package: forgejo.org/modules/structs QuotaGroupList: description: QuotaGroupList represents a list of quota groups type: array items: $ref: '#/definitions/QuotaGroup' x-go-package: forgejo.org/modules/structs CreateRepoOption: description: CreateRepoOption options when creating repository type: object required: - name properties: auto_init: description: Whether the repository should be auto-initialized? type: boolean x-go-name: AutoInit default_branch: description: DefaultBranch of the repository (used when initializes and in template) type: string x-go-name: DefaultBranch description: description: Description of the repository to create type: string x-go-name: Description gitignores: description: Gitignores to use type: string x-go-name: Gitignores issue_labels: description: Label-Set to use type: string x-go-name: IssueLabels license: description: License to use type: string x-go-name: License name: description: Name of the repository to create type: string uniqueItems: true x-go-name: Name object_format_name: description: ObjectFormatName of the underlying git repository type: string enum: - sha1 - sha256 x-go-name: ObjectFormatName private: description: Whether the repository is private type: boolean x-go-name: Private readme: description: Readme of the repository to create type: string x-go-name: Readme template: description: Whether the repository is template type: boolean x-go-name: Template trust_model: description: TrustModel of the repository type: string enum: - default - collaborator - committer - collaboratorcommitter x-go-name: TrustModel x-go-package: forgejo.org/modules/structs QuotaUsed: description: QuotaUsed represents the quota usage of a user type: object properties: size: $ref: '#/definitions/QuotaUsedSize' x-go-package: forgejo.org/modules/structs RepoTransfer: description: RepoTransfer represents a pending repo transfer type: object properties: doer: $ref: '#/definitions/User' recipient: $ref: '#/definitions/User' teams: type: array items: $ref: '#/definitions/Team' x-go-name: Teams x-go-package: forgejo.org/modules/structs QuotaUsedSizeAssetsAttachments: description: QuotaUsedSizeAssetsAttachments represents the size-based attachment quota usage of a user type: object properties: issues: description: Storage size used for the user's issue & comment attachments type: integer format: int64 x-go-name: Issues releases: description: Storage size used for the user's release attachments type: integer format: int64 x-go-name: Releases x-go-package: forgejo.org/modules/structs StateType: description: StateType issue state type type: string x-go-package: forgejo.org/modules/structs OAuth2Application: type: object title: OAuth2Application represents an OAuth2 application. properties: client_id: type: string x-go-name: ClientID client_secret: type: string x-go-name: ClientSecret confidential_client: type: boolean x-go-name: ConfidentialClient created: type: string format: date-time x-go-name: Created id: type: integer format: int64 x-go-name: ID name: type: string x-go-name: Name redirect_uris: type: array items: type: string x-go-name: RedirectURIs x-go-package: forgejo.org/modules/structs BlockedUser: type: object title: BlockedUser represents a blocked user. properties: block_id: type: integer format: int64 x-go-name: BlockID created_at: type: string format: date-time x-go-name: Created x-go-package: forgejo.org/modules/structs CreateAccessTokenOption: description: CreateAccessTokenOption options when create access token type: object required: - name properties: name: type: string x-go-name: Name repositories: description: If provided and not-empty, creates an access token with access only to specified repositories. type: array items: $ref: '#/definitions/RepoTargetOption' x-go-name: Repositories scopes: type: array items: type: string x-go-name: Scopes example: - all - read:activitypub - read:issue - write:misc - read:notification - read:organization - read:package - read:repository - read:user x-go-package: forgejo.org/modules/structs Permission: description: Permission represents a set of permissions type: object properties: admin: type: boolean x-go-name: Admin pull: type: boolean x-go-name: Pull push: type: boolean x-go-name: Push x-go-package: forgejo.org/modules/structs APIForbiddenError: type: object properties: message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/services/context UpdateUserAvatarOption: description: UpdateUserAvatarUserOption options when updating the user avatar type: object properties: image: description: image must be base64 encoded type: string x-go-name: Image x-go-package: forgejo.org/modules/structs ActionRunJob: description: ActionRunJob represents a job of a run type: object properties: attempt: description: How many times the job has been attempted including the current attempt. type: integer format: int64 x-go-name: Attempt handle: description: Opaque identifier that uniquely identifies a single attempt of a job. type: string x-go-name: Handle id: description: Identifier of this job. type: integer format: int64 x-go-name: ID name: description: the action run job name type: string x-go-name: Name needs: description: the action run job needed ids type: array items: type: string x-go-name: Needs owner_id: description: the owner id type: integer format: int64 x-go-name: OwnerID repo_id: description: the repository id type: integer format: int64 x-go-name: RepoID run_id: description: Identifier of the workflow run this job belongs to. type: integer format: int64 x-go-name: RunID runs_on: description: the action run job labels to run on type: array items: type: string x-go-name: RunsOn status: description: the action run job status type: string x-go-name: Status task_id: description: the action run job latest task id type: integer format: int64 x-go-name: TaskID x-go-package: forgejo.org/modules/structs PublicKey: description: PublicKey publickey is a user key to push code to repository type: object properties: created_at: type: string format: date-time x-go-name: Created fingerprint: type: string x-go-name: Fingerprint id: type: integer format: int64 x-go-name: ID key: type: string x-go-name: Key key_type: type: string x-go-name: KeyType read_only: type: boolean x-go-name: ReadOnly title: type: string x-go-name: Title updated_at: type: string format: date-time x-go-name: Updated url: type: string x-go-name: URL user: $ref: '#/definitions/User' verified: type: boolean x-go-name: Verified x-go-package: forgejo.org/modules/structs TrackedTime: description: TrackedTime worked time for an issue / pr type: object properties: created: type: string format: date-time x-go-name: Created id: type: integer format: int64 x-go-name: ID issue: $ref: '#/definitions/Issue' issue_id: description: deprecated (only for backwards compatibility) type: integer format: int64 x-go-name: IssueID time: description: Time in seconds type: integer format: int64 x-go-name: Time user_id: description: deprecated (only for backwards compatibility) type: integer format: int64 x-go-name: UserID user_name: type: string x-go-name: UserName x-go-package: forgejo.org/modules/structs ActionVariable: description: ActionVariable return value of the query API type: object properties: data: description: the value of the variable type: string x-go-name: Data name: description: the name of the variable type: string x-go-name: Name owner_id: description: the owner to which the variable belongs type: integer format: int64 x-go-name: OwnerID repo_id: description: the repository to which the variable belongs type: integer format: int64 x-go-name: RepoID x-go-package: forgejo.org/modules/structs CreateOAuth2ApplicationOptions: description: CreateOAuth2ApplicationOptions holds options to create an oauth2 application type: object properties: confidential_client: type: boolean x-go-name: ConfidentialClient name: type: string x-go-name: Name redirect_uris: type: array items: type: string x-go-name: RedirectURIs x-go-package: forgejo.org/modules/structs RegisterRunnerResponse: type: object title: RegisterRunnerResponse contains the details of the just registered runner. properties: id: type: integer format: int64 x-go-name: ID token: type: string x-go-name: Token uuid: type: string x-go-name: UUID x-go-package: forgejo.org/modules/structs QuotaUsedSizeAssets: description: QuotaUsedSizeAssets represents the size-based asset usage of a user type: object properties: artifacts: description: Storage size used for the user's artifacts type: integer format: int64 x-go-name: Artifacts attachments: $ref: '#/definitions/QuotaUsedSizeAssetsAttachments' packages: $ref: '#/definitions/QuotaUsedSizeAssetsPackages' x-go-package: forgejo.org/modules/structs QuotaInfo: description: QuotaInfo represents information about a user's quota type: object properties: groups: $ref: '#/definitions/QuotaGroupList' used: $ref: '#/definitions/QuotaUsed' x-go-package: forgejo.org/modules/structs Label: description: Label a label to an issue or a pr type: object properties: color: type: string x-go-name: Color example: 00aabb description: type: string x-go-name: Description exclusive: type: boolean x-go-name: Exclusive example: false id: type: integer format: int64 x-go-name: ID is_archived: type: boolean x-go-name: IsArchived example: false name: type: string x-go-name: Name url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs ExternalTracker: description: ExternalTracker represents settings for external tracker type: object properties: external_tracker_format: description: External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. type: string x-go-name: ExternalTrackerFormat external_tracker_regexp_pattern: description: External Issue Tracker issue regular expression type: string x-go-name: ExternalTrackerRegexpPattern external_tracker_style: description: External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` type: string x-go-name: ExternalTrackerStyle external_tracker_url: description: URL of external issue tracker. type: string x-go-name: ExternalTrackerURL x-go-package: forgejo.org/modules/structs Comment: description: Comment represents a comment on a commit or issue type: object properties: assets: description: The attachments to the comment type: array items: $ref: '#/definitions/Attachment' x-go-name: Attachments body: description: The body of the comment type: string x-go-name: Body created_at: description: The time of the comment's creation type: string format: date-time x-go-name: Created html_url: description: The HTML URL of the comment type: string x-go-name: HTMLURL id: description: The identifier of the comment type: integer format: int64 x-go-name: ID issue_url: description: The HTML URL of the issue if the comment is posted on an issue, else empty string type: string x-go-name: IssueURL original_author: description: The original author that posted the comment if it was not posted locally, else empty string type: string x-go-name: OriginalAuthor original_author_id: description: The ID of the original author that posted the comment if it was not posted locally, else 0 type: integer format: int64 x-go-name: OriginalAuthorID pull_request_url: description: The HTML URL of the pull request if the comment is posted on a pull request, else empty string type: string x-go-name: PRURL updated_at: description: The time of the comment's update type: string format: date-time x-go-name: Updated user: $ref: '#/definitions/User' x-go-package: forgejo.org/modules/structs QuotaUsedSizeRepos: description: QuotaUsedSizeRepos represents the size-based repository quota usage of a user type: object properties: private: description: Storage size of the user's private repositories type: integer format: int64 x-go-name: Private public: description: Storage size of the user's public repositories type: integer format: int64 x-go-name: Public x-go-package: forgejo.org/modules/structs APIError: description: APIError is an api error with a message type: object properties: message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs UpdateVariableOption: type: object title: UpdateVariableOption defines the properties of the variable to update. required: - value properties: name: description: 'New name for the variable. If the field is empty, the variable name won''t be updated. Forgejo will convert it to uppercase.' type: string x-go-name: Name value: description: 'Value of the variable to update. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained.' type: string x-go-name: Value x-go-package: forgejo.org/modules/structs AccessToken: type: object title: AccessToken represents an API access token. properties: created_at: type: string format: date-time x-go-name: Created id: type: integer format: int64 x-go-name: ID name: type: string x-go-name: Name repositories: description: 'Indicates that an access token only has access to the specified repositories. Will be null if the access token is not limited to a set of specified repositories.' type: array items: $ref: '#/definitions/RepositoryMeta' x-go-name: Repositories scopes: type: array items: type: string x-go-name: Scopes sha1: type: string x-go-name: Token token_last_eight: type: string x-go-name: TokenLastEight x-go-package: forgejo.org/modules/structs responses: VariableList: description: VariableList schema: type: array items: $ref: '#/definitions/ActionVariable' headers: X-Total-Count: type: integer format: int64 description: The total number of variables quotaExceeded: description: QuotaExceeded headers: message: type: string user_id: type: integer format: int64 username: type: string UserSettings: description: UserSettings schema: $ref: '#/definitions/UserSettings' ActionRunnerList: description: ActionRunnerList is a list of Forgejo Action runners schema: type: array items: $ref: '#/definitions/ActionRunner' headers: Link: type: string description: Links to other pages, if any X-Total-Count: type: integer format: int64 description: Total number of runners matching the search criteria (excluding page and limit) RepositoryList: description: RepositoryList schema: type: array items: $ref: '#/definitions/Repository' headers: X-Total-Count: type: integer format: int64 description: The total number of repositories User: description: User schema: $ref: '#/definitions/User' PublicKey: description: PublicKey schema: $ref: '#/definitions/PublicKey' RegisterRunnerResponse: description: RegisterRunnerResponse contains the details of the just registered runner. schema: $ref: '#/definitions/RegisterRunnerResponse' ActivityFeedsList: description: ActivityFeedsList schema: type: array items: $ref: '#/definitions/Activity' headers: X-Total-Count: type: integer format: int64 description: The total number of activity feeds string: description: APIString is a string response schema: type: string UserList: description: UserList schema: type: array items: $ref: '#/definitions/User' OAuth2Application: description: OAuth2Application schema: $ref: '#/definitions/OAuth2Application' OAuth2ApplicationList: description: OAuth2ApplicationList schema: type: array items: $ref: '#/definitions/OAuth2Application' headers: X-Total-Count: type: integer format: int64 description: The total number of OAuth2 applications Hook: description: Hook schema: $ref: '#/definitions/Hook' TrackedTimeList: description: TrackedTimeList schema: type: array items: $ref: '#/definitions/TrackedTime' headers: X-Total-Count: type: integer format: int64 description: The total number of tracked times UserHeatmapData: description: UserHeatmapData schema: type: array items: $ref: '#/definitions/UserHeatmapData' validationError: description: APIValidationError is error format response related to input validation schema: $ref: '#/definitions/APIValidationError' TeamList: description: TeamList schema: type: array items: $ref: '#/definitions/Team' headers: X-Total-Count: type: integer format: int64 description: The total number of teams QuotaUsedAttachmentList: description: QuotaUsedAttachmentList schema: $ref: '#/definitions/QuotaUsedAttachmentList' AccessTokenList: description: AccessTokenList schema: type: array items: $ref: '#/definitions/AccessToken' headers: X-Total-Count: type: integer format: int64 description: The total number of access tokens ActionVariable: description: ActionVariable schema: $ref: '#/definitions/ActionVariable' empty: description: APIEmpty is an empty response BlockedUserList: description: BlockedUserList schema: type: array items: $ref: '#/definitions/BlockedUser' RunJobList: description: RunJobList is a list of action run jobs schema: type: array items: $ref: '#/definitions/ActionRunJob' RegistrationToken: description: RegistrationToken is a string used to register a runner with a server schema: $ref: '#/definitions/RegistrationToken' unauthorized: description: APIUnauthorizedError is a unauthorized error response schema: $ref: '#/definitions/APIUnauthorizedError' QuotaInfo: description: QuotaInfo schema: $ref: '#/definitions/QuotaInfo' notFound: description: APINotFound is a not found error response schema: $ref: '#/definitions/APINotFound' AccessToken: description: AccessToken represents an API access token. schema: $ref: '#/definitions/AccessToken' Repository: description: Repository schema: $ref: '#/definitions/Repository' StopWatchList: description: StopWatchList schema: type: array items: $ref: '#/definitions/StopWatch' headers: X-Total-Count: type: integer format: int64 description: The total number of stop watches error: description: APIError is error format response schema: $ref: '#/definitions/APIError' forbidden: description: APIForbiddenError is a forbidden error response schema: $ref: '#/definitions/APIForbiddenError' GPGKeyList: description: GPGKeyList schema: type: array items: $ref: '#/definitions/GPGKey' PublicKeyList: description: PublicKeyList schema: type: array items: $ref: '#/definitions/PublicKey' QuotaUsedArtifactList: description: QuotaUsedArtifactList schema: $ref: '#/definitions/QuotaUsedArtifactList' ActionRunner: description: ActionRunner represents a runner schema: $ref: '#/definitions/ActionRunner' HookListWithoutPagination: description: HookListWithoutPagination - Hooks without pagination headers schema: type: array items: $ref: '#/definitions/Hook' EmailList: description: EmailList schema: type: array items: $ref: '#/definitions/Email' GPGKey: description: GPGKey schema: $ref: '#/definitions/GPGKey' QuotaUsedPackageList: description: QuotaUsedPackageList schema: $ref: '#/definitions/QuotaUsedPackageList' securityDefinitions: AuthorizationHeaderToken: description: API tokens must be prepended with "token" followed by a space. type: apiKey name: Authorization in: header BasicAuth: type: basic SudoHeader: description: Sudo API request as the user provided as the key. Admin privileges are required. type: apiKey name: Sudo in: header SudoParam: description: Sudo API request as the user provided as the key. Admin privileges are required. type: apiKey name: sudo in: query TOTPHeader: description: Must be used in combination with BasicAuth if two-factor authentication is enabled. type: apiKey name: X-FORGEJO-OTP in: header