mirror of
https://github.com/chenasraf/nextcloud-forum.git
synced 2026-05-18 01:28:58 +00:00
fix: add api list limits
This commit is contained in:
@@ -31,6 +31,8 @@ class BBCodeController extends OCSController {
|
||||
/**
|
||||
* Get all BBCodes (excludes builtin codes)
|
||||
*
|
||||
* @param int<1, 100> $limit Maximum number of BBCodes to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: BBCodes returned
|
||||
@@ -38,9 +40,9 @@ class BBCodeController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[RequirePermission('canAccessAdminTools')]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/bbcodes')]
|
||||
public function index(): DataResponse {
|
||||
public function index(int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$bbcodes = $this->bbCodeMapper->findAllNonBuiltin();
|
||||
$bbcodes = array_slice($this->bbCodeMapper->findAllNonBuiltin(), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($b) => $b->jsonSerialize(), $bbcodes));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching BBCodes: ' . $e->getMessage());
|
||||
@@ -51,15 +53,17 @@ class BBCodeController extends OCSController {
|
||||
/**
|
||||
* Get enabled BBCodes
|
||||
*
|
||||
* @param int<1, 100> $limit Maximum number of BBCodes to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Enabled BBCodes returned
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/bbcodes/enabled')]
|
||||
public function enabled(): DataResponse {
|
||||
public function enabled(int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$bbcodes = $this->bbCodeMapper->findAllEnabled();
|
||||
$bbcodes = array_slice($this->bbCodeMapper->findAllEnabled(), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($b) => $b->jsonSerialize(), $bbcodes));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching enabled BBCodes: ' . $e->getMessage());
|
||||
@@ -70,15 +74,17 @@ class BBCodeController extends OCSController {
|
||||
/**
|
||||
* Get builtin BBCodes (for help dialog)
|
||||
*
|
||||
* @param int<1, 100> $limit Maximum number of BBCodes to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Builtin BBCodes returned
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/bbcodes/builtin')]
|
||||
public function builtin(): DataResponse {
|
||||
public function builtin(int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$bbcodes = $this->bbCodeMapper->findAllBuiltin();
|
||||
$bbcodes = array_slice($this->bbCodeMapper->findAllBuiltin(), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($b) => $b->jsonSerialize(), $bbcodes));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching builtin BBCodes: ' . $e->getMessage());
|
||||
|
||||
@@ -34,6 +34,8 @@ class CatHeaderController extends OCSController {
|
||||
/**
|
||||
* Get all category headers
|
||||
*
|
||||
* @param int<1, 100> $limit Maximum number of headers to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Category headers returned
|
||||
@@ -41,9 +43,9 @@ class CatHeaderController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[PublicPage]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/headers')]
|
||||
public function index(): DataResponse {
|
||||
public function index(int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$headers = $this->catHeaderMapper->findAll();
|
||||
$headers = array_slice($this->catHeaderMapper->findAll(), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($h) => $h->jsonSerialize(), $headers));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching category headers: ' . $e->getMessage());
|
||||
|
||||
@@ -48,6 +48,8 @@ class CategoryController extends OCSController {
|
||||
/**
|
||||
* Get all category headers with nested categories
|
||||
*
|
||||
* @param int<1, 100> $limit Maximum number of category headers to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Category headers with nested categories returned
|
||||
@@ -55,7 +57,7 @@ class CategoryController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[PublicPage]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/categories')]
|
||||
public function index(): DataResponse {
|
||||
public function index(int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
// Fetch all headers, categories, and last activity timestamps
|
||||
$headers = $this->catHeaderMapper->findAll();
|
||||
@@ -104,7 +106,7 @@ class CategoryController extends OCSController {
|
||||
$result[] = $headerData;
|
||||
}
|
||||
|
||||
return new DataResponse($result);
|
||||
return new DataResponse(array_slice($result, $offset, $limit));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching categories: ' . $e->getMessage());
|
||||
return new DataResponse(['error' => 'Failed to fetch categories'], Http::STATUS_INTERNAL_SERVER_ERROR);
|
||||
@@ -115,6 +117,8 @@ class CategoryController extends OCSController {
|
||||
* Get categories by header ID
|
||||
*
|
||||
* @param int $headerId Category header ID
|
||||
* @param int<1, 100> $limit Maximum number of categories to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Categories returned
|
||||
@@ -122,7 +126,7 @@ class CategoryController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[PublicPage]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/headers/{headerId}/categories')]
|
||||
public function byHeader(int $headerId): DataResponse {
|
||||
public function byHeader(int $headerId, int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$user = $this->userSession->getUser();
|
||||
$userId = $user ? $user->getUID() : null;
|
||||
@@ -130,7 +134,7 @@ class CategoryController extends OCSController {
|
||||
|
||||
$categories = $this->categoryMapper->findByHeaderId($headerId);
|
||||
$filtered = array_filter($categories, fn ($cat) => in_array($cat->getId(), $accessibleCategoryIds, true));
|
||||
return new DataResponse(array_values(array_map(fn ($cat) => $cat->jsonSerialize(), $filtered)));
|
||||
return new DataResponse(array_slice(array_values(array_map(fn ($cat) => $cat->jsonSerialize(), $filtered)), $offset, $limit));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching categories by header: ' . $e->getMessage());
|
||||
return new DataResponse(['error' => 'Failed to fetch categories'], Http::STATUS_INTERNAL_SERVER_ERROR);
|
||||
@@ -383,6 +387,8 @@ class CategoryController extends OCSController {
|
||||
* Get permissions for a category
|
||||
*
|
||||
* @param int $id Category ID
|
||||
* @param int<1, 100> $limit Maximum number of permissions to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Permissions returned
|
||||
@@ -390,10 +396,10 @@ class CategoryController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[RequirePermission('canAccessAdminTools')]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/categories/{id}/permissions')]
|
||||
public function getPermissions(int $id): DataResponse {
|
||||
public function getPermissions(int $id, int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
// Exclude Admin role - it has hardcoded full access to all categories
|
||||
$permissions = $this->categoryPermMapper->findByCategoryIdExcludingAdmin($id);
|
||||
$permissions = array_slice($this->categoryPermMapper->findByCategoryIdExcludingAdmin($id), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($perm) => $perm->jsonSerialize(), $permissions));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching category permissions: ' . $e->getMessage());
|
||||
|
||||
@@ -39,6 +39,8 @@ class ForumUserController extends OCSController {
|
||||
/**
|
||||
* Get all forum users
|
||||
*
|
||||
* @param int<1, 200> $limit Maximum number of users to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Forum users returned
|
||||
@@ -46,9 +48,9 @@ class ForumUserController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[PublicPage]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/users')]
|
||||
public function index(): DataResponse {
|
||||
public function index(int $limit = 200, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$users = $this->forumUserMapper->findAll();
|
||||
$users = array_slice($this->forumUserMapper->findAll(), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($u) => $u->jsonSerialize(), $users));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching forum users: ' . $e->getMessage());
|
||||
@@ -62,7 +64,7 @@ class ForumUserController extends OCSController {
|
||||
* Excludes the current user from results (users cannot mention themselves)
|
||||
*
|
||||
* @param string $search Search query (matches against user ID and display name)
|
||||
* @param int $limit Maximum number of results to return
|
||||
* @param int<1, 100> $limit Maximum number of results to return
|
||||
* @return DataResponse<Http::STATUS_OK, list<array{id: string, label: string, icon: string, source: string}>, array{}>
|
||||
*
|
||||
* 200: Users returned
|
||||
|
||||
@@ -34,12 +34,14 @@ class InitController extends OCSController {
|
||||
/**
|
||||
* Get Nextcloud admin users for initialization
|
||||
*
|
||||
* @param int<1, 100> $limit Maximum number of admin users to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array{id: string, displayName: string}>, array{}>
|
||||
*
|
||||
* 200: Admin users retrieved successfully
|
||||
*/
|
||||
#[ApiRoute(verb: 'GET', url: '/api/init/admin-users')]
|
||||
public function getAdminUsers(): DataResponse {
|
||||
public function getAdminUsers(int $limit = 100, int $offset = 0): DataResponse {
|
||||
$users = [];
|
||||
|
||||
$this->userManager->callForAllUsers(function ($user) use (&$users) {
|
||||
@@ -52,7 +54,7 @@ class InitController extends OCSController {
|
||||
}
|
||||
});
|
||||
|
||||
return new DataResponse($users);
|
||||
return new DataResponse(array_slice($users, $offset, $limit));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,7 +63,7 @@ class PostController extends OCSController {
|
||||
* Get posts by thread
|
||||
*
|
||||
* @param int $threadId Thread ID
|
||||
* @param int $limit Maximum number of posts to return
|
||||
* @param int<1, 200> $limit Maximum number of posts to return
|
||||
* @param int $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
@@ -244,7 +244,7 @@ class PostController extends OCSController {
|
||||
* Get posts by author
|
||||
*
|
||||
* @param string $authorId Author user ID
|
||||
* @param int $limit Maximum number of posts to return
|
||||
* @param int<1, 200> $limit Maximum number of posts to return
|
||||
* @param int $offset Offset for pagination
|
||||
* @param string $excludeFirstPosts Whether to exclude first posts (1 or 0)
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
|
||||
@@ -33,15 +33,17 @@ class ReactionController extends OCSController {
|
||||
* Get reactions by post
|
||||
*
|
||||
* @param int $postId Post ID
|
||||
* @param int<1, 200> $limit Maximum number of reactions to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Reactions returned
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/posts/{postId}/reactions')]
|
||||
public function byPost(int $postId): DataResponse {
|
||||
public function byPost(int $postId, int $limit = 200, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$reactions = $this->reactionMapper->findByPostId($postId);
|
||||
$reactions = array_slice($this->reactionMapper->findByPostId($postId), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($r) => $r->jsonSerialize(), $reactions));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching reactions by post: ' . $e->getMessage());
|
||||
@@ -53,15 +55,17 @@ class ReactionController extends OCSController {
|
||||
* Get reactions for multiple posts (for performance)
|
||||
*
|
||||
* @param list<int> $postIds Array of post IDs
|
||||
* @param int<1, 1000> $limit Maximum number of reactions to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Reactions returned
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'POST', url: '/api/reactions/by-posts')]
|
||||
public function byPosts(array $postIds): DataResponse {
|
||||
public function byPosts(array $postIds, int $limit = 1000, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$reactions = $this->reactionMapper->findByPostIds($postIds);
|
||||
$reactions = array_slice($this->reactionMapper->findByPostIds($postIds), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($r) => $r->jsonSerialize(), $reactions));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching reactions by posts: ' . $e->getMessage());
|
||||
|
||||
@@ -35,6 +35,8 @@ class RoleController extends OCSController {
|
||||
/**
|
||||
* Get all roles
|
||||
*
|
||||
* @param int<1, 100> $limit Maximum number of roles to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Roles returned
|
||||
@@ -42,9 +44,9 @@ class RoleController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[RequirePermission('canAccessAdminTools')]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/roles')]
|
||||
public function index(): DataResponse {
|
||||
public function index(int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$roles = $this->roleMapper->findAll();
|
||||
$roles = array_slice($this->roleMapper->findAll(), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($role) => $role->jsonSerialize(), $roles));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching roles: ' . $e->getMessage());
|
||||
@@ -236,6 +238,8 @@ class RoleController extends OCSController {
|
||||
* Get permissions for a role
|
||||
*
|
||||
* @param int $id Role ID
|
||||
* @param int<1, 100> $limit Maximum number of permissions to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Permissions returned
|
||||
@@ -243,9 +247,9 @@ class RoleController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[RequirePermission('canAccessAdminTools')]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/roles/{id}/permissions')]
|
||||
public function getPermissions(int $id): DataResponse {
|
||||
public function getPermissions(int $id, int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$permissions = $this->categoryPermMapper->findByRoleId($id);
|
||||
$permissions = array_slice($this->categoryPermMapper->findByRoleId($id), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($perm) => $perm->jsonSerialize(), $permissions));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching role permissions: ' . $e->getMessage());
|
||||
|
||||
@@ -46,7 +46,7 @@ class SearchController extends OCSController {
|
||||
* @param bool $searchThreads Include threads in search (title + first post content)
|
||||
* @param bool $searchPosts Include reply posts in search
|
||||
* @param int|null $categoryId Optional category ID filter
|
||||
* @param int $limit Maximum results per type
|
||||
* @param int<1, 200> $limit Maximum results per type
|
||||
* @param int $offset Results offset per type
|
||||
* @return DataResponse<Http::STATUS_OK, array{threads: array<string, mixed>, posts: array<string, mixed>, threadCount: int, postCount: int, query: string}, array{}>
|
||||
*
|
||||
|
||||
@@ -46,6 +46,8 @@ class TeamController extends OCSController {
|
||||
/**
|
||||
* List all available teams (circles)
|
||||
*
|
||||
* @param int<1, 100> $limit Maximum number of teams to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array{id: string, displayName: string, owner: string, ownerDisplayName: string, memberCount: int}>, array{}>
|
||||
*
|
||||
* 200: Teams returned
|
||||
@@ -53,7 +55,7 @@ class TeamController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[RequirePermission('canAccessAdminTools')]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/teams')]
|
||||
public function index(): DataResponse {
|
||||
public function index(int $limit = 100, int $offset = 0): DataResponse {
|
||||
$circlesManager = $this->getCirclesManager();
|
||||
if ($circlesManager === null) {
|
||||
return new DataResponse(['error' => 'Teams app is not available'], Http::STATUS_SERVICE_UNAVAILABLE);
|
||||
@@ -95,7 +97,7 @@ class TeamController extends OCSController {
|
||||
return strcasecmp($a['displayName'], $b['displayName']);
|
||||
});
|
||||
|
||||
return new DataResponse(array_values($result));
|
||||
return new DataResponse(array_slice(array_values($result), $offset, $limit));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching teams: ' . $e->getMessage());
|
||||
return new DataResponse(['error' => 'Failed to fetch teams'], Http::STATUS_INTERNAL_SERVER_ERROR);
|
||||
@@ -108,6 +110,8 @@ class TeamController extends OCSController {
|
||||
* Get category permissions for a team (circle)
|
||||
*
|
||||
* @param string $id Team/circle single ID
|
||||
* @param int<1, 100> $limit Maximum number of permissions to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Permissions returned
|
||||
@@ -115,9 +119,9 @@ class TeamController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[RequirePermission('canAccessAdminTools')]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/teams/{id}/permissions')]
|
||||
public function getPermissions(string $id): DataResponse {
|
||||
public function getPermissions(string $id, int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$permissions = $this->categoryPermMapper->findByTeamId($id);
|
||||
$permissions = array_slice($this->categoryPermMapper->findByTeamId($id), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($perm) => $perm->jsonSerialize(), $permissions));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching team permissions: ' . $e->getMessage());
|
||||
|
||||
@@ -58,6 +58,8 @@ class ThreadController extends OCSController {
|
||||
/**
|
||||
* Get all threads
|
||||
*
|
||||
* @param int<1, 200> $limit Maximum number of threads to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Threads returned
|
||||
@@ -65,9 +67,9 @@ class ThreadController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[PublicPage]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/threads')]
|
||||
public function index(): DataResponse {
|
||||
public function index(int $limit = 200, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$threads = $this->threadMapper->findAll();
|
||||
$threads = array_slice($this->threadMapper->findAll(), $offset, $limit);
|
||||
|
||||
// Extract unique author IDs
|
||||
$authorIds = array_unique(array_map(fn ($t) => $t->getAuthorId(), $threads));
|
||||
@@ -89,7 +91,7 @@ class ThreadController extends OCSController {
|
||||
* Get threads by category
|
||||
*
|
||||
* @param int $categoryId Category ID
|
||||
* @param int $limit Maximum number of threads to return
|
||||
* @param int<1, 200> $limit Maximum number of threads to return
|
||||
* @param int $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
@@ -176,7 +178,7 @@ class ThreadController extends OCSController {
|
||||
* Get threads by author
|
||||
*
|
||||
* @param string $authorId Author user ID
|
||||
* @param int $limit Maximum number of threads to return
|
||||
* @param int<1, 200> $limit Maximum number of threads to return
|
||||
* @param int $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
|
||||
@@ -109,20 +109,22 @@ class ThreadSubscriptionController extends OCSController {
|
||||
/**
|
||||
* Get all threads the current user is subscribed to
|
||||
*
|
||||
* @param int<1, 200> $limit Maximum number of subscriptions to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: Thread subscriptions returned
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/thread-subscriptions')]
|
||||
public function getUserSubscriptions(): DataResponse {
|
||||
public function getUserSubscriptions(int $limit = 200, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$user = $this->userSession->getUser();
|
||||
if (!$user) {
|
||||
return new DataResponse(['error' => 'User not authenticated'], Http::STATUS_UNAUTHORIZED);
|
||||
}
|
||||
|
||||
$subscriptions = $this->subscriptionMapper->findByUserId($user->getUID());
|
||||
$subscriptions = array_slice($this->subscriptionMapper->findByUserId($user->getUID()), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($r) => $r->jsonSerialize(), $subscriptions));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching user thread subscriptions: ' . $e->getMessage());
|
||||
|
||||
@@ -38,6 +38,8 @@ class UserRoleController extends OCSController {
|
||||
* Returns Role objects enriched with userRoleId for managing role assignments.
|
||||
*
|
||||
* @param string $userId Nextcloud user ID
|
||||
* @param int<1, 100> $limit Maximum number of role assignments to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: User role assignments returned
|
||||
@@ -45,7 +47,7 @@ class UserRoleController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[RequirePermission('canAccessAdminTools')]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/users/{userId}/roles')]
|
||||
public function byUser(string $userId): DataResponse {
|
||||
public function byUser(string $userId, int $limit = 100, int $offset = 0): DataResponse {
|
||||
try {
|
||||
// Get UserRole entities to get the userRoleId for delete operations
|
||||
$userRoles = $this->userRoleMapper->findByUserId($userId);
|
||||
@@ -64,7 +66,7 @@ class UserRoleController extends OCSController {
|
||||
}
|
||||
}
|
||||
|
||||
return new DataResponse($result);
|
||||
return new DataResponse(array_slice($result, $offset, $limit));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching user roles: ' . $e->getMessage());
|
||||
return new DataResponse(['error' => 'Failed to fetch user roles'], Http::STATUS_INTERNAL_SERVER_ERROR);
|
||||
@@ -75,6 +77,8 @@ class UserRoleController extends OCSController {
|
||||
* Get users with a specific role
|
||||
*
|
||||
* @param int $roleId Role ID
|
||||
* @param int<1, 200> $limit Maximum number of users to return
|
||||
* @param int<0, max> $offset Offset for pagination
|
||||
* @return DataResponse<Http::STATUS_OK, list<array<string, mixed>>, array{}>
|
||||
*
|
||||
* 200: User roles returned
|
||||
@@ -82,9 +86,9 @@ class UserRoleController extends OCSController {
|
||||
#[NoAdminRequired]
|
||||
#[RequirePermission('canAccessAdminTools')]
|
||||
#[ApiRoute(verb: 'GET', url: '/api/roles/{roleId}/users')]
|
||||
public function byRole(int $roleId): DataResponse {
|
||||
public function byRole(int $roleId, int $limit = 200, int $offset = 0): DataResponse {
|
||||
try {
|
||||
$userRoles = $this->userRoleMapper->findByRoleId($roleId);
|
||||
$userRoles = array_slice($this->userRoleMapper->findByRoleId($roleId), $offset, $limit);
|
||||
return new DataResponse(array_map(fn ($ur) => $ur->jsonSerialize(), $userRoles));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error fetching users by role: ' . $e->getMessage());
|
||||
|
||||
@@ -485,6 +485,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of admin users to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
|
||||
@@ -590,6 +590,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of BBCodes to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -820,6 +843,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of BBCodes to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -915,6 +961,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of BBCodes to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -1845,6 +1914,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of headers to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -2493,6 +2585,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of category headers to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -2715,6 +2830,29 @@
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of categories to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -3387,6 +3525,29 @@
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of permissions to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -4251,6 +4412,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of users to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 200,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -4443,7 +4627,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 10
|
||||
"default": 10,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -4688,7 +4874,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 50
|
||||
"default": 50,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -4937,7 +5125,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 50
|
||||
"default": 50,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -5627,6 +5817,29 @@
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of reactions to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 200,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -5738,6 +5951,21 @@
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 1000,
|
||||
"description": "Maximum number of reactions to return",
|
||||
"minimum": 1,
|
||||
"maximum": 1000
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"description": "Offset for pagination",
|
||||
"minimum": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6752,6 +6980,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of roles to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -7398,6 +7649,29 @@
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of permissions to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -7691,7 +7965,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 50
|
||||
"default": 50,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -7876,6 +8152,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of teams to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -8002,6 +8301,29 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of permissions to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -8249,6 +8571,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of threads to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 200,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -8454,7 +8799,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 50
|
||||
"default": 50,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -8685,7 +9032,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 50
|
||||
"default": 50,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -9843,6 +10192,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of subscriptions to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 200,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -10239,6 +10611,29 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of role assignments to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -10344,6 +10739,29 @@
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of users to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 200,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -11199,6 +11617,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of admin users to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
|
||||
430
openapi.json
430
openapi.json
@@ -590,6 +590,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of BBCodes to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -820,6 +843,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of BBCodes to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -915,6 +961,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of BBCodes to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -1845,6 +1914,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of headers to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -2493,6 +2585,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of category headers to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -2715,6 +2830,29 @@
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of categories to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -3387,6 +3525,29 @@
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of permissions to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -4251,6 +4412,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of users to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 200,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -4443,7 +4627,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 10
|
||||
"default": 10,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -4688,7 +4874,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 50
|
||||
"default": 50,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -4937,7 +5125,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 50
|
||||
"default": 50,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -5627,6 +5817,29 @@
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of reactions to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 200,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -5738,6 +5951,21 @@
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 1000,
|
||||
"description": "Maximum number of reactions to return",
|
||||
"minimum": 1,
|
||||
"maximum": 1000
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"description": "Offset for pagination",
|
||||
"minimum": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6752,6 +6980,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of roles to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -7398,6 +7649,29 @@
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of permissions to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -7691,7 +7965,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 50
|
||||
"default": 50,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -7876,6 +8152,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of teams to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -8002,6 +8301,29 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of permissions to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -8249,6 +8571,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of threads to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 200,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -8454,7 +8799,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 50
|
||||
"default": 50,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -8685,7 +9032,9 @@
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 50
|
||||
"default": 50,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -9843,6 +10192,29 @@
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of subscriptions to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 200,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -10239,6 +10611,29 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of role assignments to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 100,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
@@ -10344,6 +10739,29 @@
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Maximum number of users to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 200,
|
||||
"minimum": 1,
|
||||
"maximum": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"description": "Offset for pagination",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 0,
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
|
||||
Reference in New Issue
Block a user