TrylleDocs
API ReferenceOpenAPI 3 reference

Profiles and discovery

GET
/v1/explore/repositories

Public discovery of public repositories. Optional auth; only public repositories are ever returned.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

q?string

Free-text query matched against repository name and description.

sort?string

One of: stars, forks, updated, created, alpha. Empty for relevance.

order?string

asc or desc.

topic_only?boolean

Match the query against repository topics only.

include_archived?boolean

Include archived repositories. Defaults to false.

page?integer

One-indexed page. Handler clamps values below 1 to 1.

Formatint64
Range1 <= value
Default1
per_page?integer

Items per page. Handler defaults to 30 and clamps above 100.

Formatint64
Range1 <= value <= 100
Default30
cursor?string

Base64 cursor encoding page and per_page; overrides page/per_page when valid.

Response Body

application/json

curl -X GET "https://example.com/v1/explore/repositories?q=abc123&sort=abc123&order=abc123&topic_only=false&include_archived=false&page=2&per_page=2&cursor=abc123"
"abc123"
GET
/v1/explore/trending

Public discovery of repositories trending by stars gained within a rolling window. Optional auth; only public repositories are ever returned. Falls back to all-time most-starred when recent activity is insufficient.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

window_days?integer

Rolling trending window in days. Handler defaults to 7.

Formatint64
limit?integer

Maximum repositories to return. Handler defaults to 30.

Formatint64

Response Body

application/json

curl -X GET "https://example.com/v1/explore/trending?window_days=1&limit=1"
"abc123"
GET
/v1/explore/users

Public discovery of users. Optional auth.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

q?string

Free-text keyword matched against username, full name, and email.

sort?string

Forgejo user sort key (newest, oldest, alphabetically, reversealphabetically).

page?integer

One-indexed page. Handler clamps values below 1 to 1.

Formatint64
Range1 <= value
Default1
per_page?integer

Items per page. Handler defaults to 30 and clamps above 100.

Formatint64
Range1 <= value <= 100
Default30
cursor?string

Base64 cursor encoding page and per_page; overrides page/per_page when valid.

Response Body

application/json

curl -X GET "https://example.com/v1/explore/users?q=abc123&sort=abc123&page=2&per_page=2&cursor=abc123"
"abc123"
GET
/v1/profiles/{login}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

login*string

Forgejo login.

Length1 <= length

Response Body

application/json

curl -X GET "https://example.com/v1/profiles/aa"
"abc123"
GET
/v1/profiles/{login}/contributions

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

login*string

Forgejo login.

Length1 <= length

Response Body

application/json

curl -X GET "https://example.com/v1/profiles/aa/contributions"
"abc123"
POST
/v1/profiles/{login}/follow

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

login*string

Forgejo login of the user to follow or unfollow.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/profiles/aa/follow" \  -H "Content-Type: application/json" \  -d '{    "following": false,    "targetId": 2  }'
"abc123"
GET
/v1/profiles/{login}/followers

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

login*string

Forgejo login.

Length1 <= length

Query Parameters

page?integer

One-indexed page. Handler clamps values below 1 to 1.

Formatint64
Range1 <= value
Default1
per_page?integer

Items per page. Handler defaults to 30 and clamps above 100.

Formatint64
Range1 <= value <= 100
Default30

Response Body

application/json

curl -X GET "https://example.com/v1/profiles/aa/followers?page=2&per_page=2"
"abc123"
GET
/v1/profiles/{login}/following

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

login*string

Forgejo login.

Length1 <= length

Query Parameters

page?integer

One-indexed page. Handler clamps values below 1 to 1.

Formatint64
Range1 <= value
Default1
per_page?integer

Items per page. Handler defaults to 30 and clamps above 100.

Formatint64
Range1 <= value <= 100
Default30

Response Body

application/json

curl -X GET "https://example.com/v1/profiles/aa/following?page=2&per_page=2"
"abc123"
GET
/v1/profiles/{login}/pinned-repositories

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

login*string

Forgejo login.

Length1 <= length

Response Body

application/json

curl -X GET "https://example.com/v1/profiles/aa/pinned-repositories"
"abc123"
PUT
/v1/profiles/{login}/pinned-repositories

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

login*string

Forgejo login.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/v1/profiles/aa/pinned-repositories" \  -H "Content-Type: application/json" \  -d '{    "repositories": [      "abc123"    ]  }'
"abc123"
GET
/v1/profiles/{login}/repositories

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

login*string

Forgejo login.

Length1 <= length

Query Parameters

page?integer

One-indexed page. Handler clamps values below 1 to 1.

Formatint64
Range1 <= value
Default1
per_page?integer

Items per page. Handler defaults to 30 and clamps above 100.

Formatint64
Range1 <= value <= 100
Default30
cursor?string

Base64 cursor encoding page and per_page; overrides page/per_page when valid.

Response Body

application/json

curl -X GET "https://example.com/v1/profiles/aa/repositories?page=2&per_page=2&cursor=abc123"
"abc123"