Mark notification threads as read, pinned or unread on a specific repo
const url = 'https://gitea.com/api/v1/repos/example/example/notifications';const options = {method: 'PUT', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://gitea.com/api/v1/repos/example/example/notifications \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Query Parameters
Section titled “Query Parameters”If true, mark all notifications on this repo. Default value is false
Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.
Status to mark notifications as. Defaults to read.
Describes the last point that notifications were checked. Anything updated since this time will not be updated.
Responses
Section titled “Responses”NotificationThreadList
NotificationThread expose Notification on API
object
ID is the unique identifier for the notification thread
Pinned indicates if the notification is pinned
Repository represents a repository
object
ExternalTracker represents settings for external tracker
object
External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.
External Issue Tracker issue regular expression
External Issue Tracker Number Format, either numeric, alphanumeric, or regexp
URL of external issue tracker.
ExternalWiki represents setting for external wiki
object
URL of external wiki.
InternalTracker represents settings for internal tracker
object
Let only contributors track time (Built-in issue tracker)
Enable dependencies for issues and pull requests (Built-in issue tracker)
Enable time tracking (Built-in issue tracker)
ObjectFormatName of the underlying git repository sha1 ObjectFormatSHA1 sha256 ObjectFormatSHA256
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
The user’s website
Permission represents a set of permissions
object
RepoTransfer represents a pending repo transfer
object
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
The user’s website
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
The user’s website
Team represents a team in an organization
object
Whether the team can create repositories in the organization
The description of the team
The unique identifier of the team
Whether the team has access to all repositories in the organization
The name of the team
Organization represents an organization
object
The URL of the organization’s avatar
The description of the organization
The email address of the organization
The full display name of the organization
The unique identifier of the organization
The location of the organization
The name of the organization
Whether repository administrators can change team access
Username of the organization deprecated
The visibility level of the organization (public, limited, private) public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
The website URL of the organization
object
Team visibility within the organization. “private” teams are only listable by members and org owners; “limited” teams are listable by any organization member; “public” teams are listable by any signed-in user. public TeamVisibilityPublic limited TeamVisibilityLimited private TeamVisibilityPrivate
NotificationSubject contains the notification subject (Issue/Pull/Commit)
object
HTMLURL is the web URL for the notification subject
LatestCommentHTMLURL is the web URL for the latest comment
LatestCommentURL is the API URL for the latest comment
State indicates the current state of the notification subject open NotifySubjectStateOpen is an open subject closed NotifySubjectStateClosed is a closed subject merged NotifySubjectStateMerged is a merged pull request
Title is the title of the notification subject
Type indicates the type of the notification subject Issue NotifySubjectIssue a issue is subject of an notification Pull NotifySubjectPull a pull is subject of an notification Commit NotifySubjectCommit a commit is subject of an notification Repository NotifySubjectRepository a repository is subject of an notification
URL is the API URL for the notification subject
Unread indicates if the notification has been read
UpdatedAt is the time when the notification was last updated
URL is the API URL for this notification thread
Example
[ { "repository": { "object_format_name": "sha1", "owner": { "login_name": "empty", "visibility": "public" }, "repo_transfer": { "doer": { "login_name": "empty", "visibility": "public" }, "recipient": { "login_name": "empty", "visibility": "public" }, "teams": [ { "organization": { "visibility": "public" }, "permission": "none", "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" }, "visibility": "public" } ] } }, "subject": { "state": "open", "type": "Issue" } }]