Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

doc: add groups endpoints to api reference documentation

Sheen Capadngan3e3f42a8f798
diff --git a/backend/src/ee/routes/v1/group-router.ts b/backend/src/ee/routes/v1/group-router.ts
index fcfc6051c6..fed6adaba2 100644
--- a/backend/src/ee/routes/v1/group-router.ts
+++ b/backend/src/ee/routes/v1/group-router.ts
@@ -48,7 +48,7 @@ export const registerGroupRouter = async (server: FastifyZodProvider) => {
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
params: z.object({
- id: z.string()
+ id: z.string().trim().describe(GROUPS.GET_BY_ID.id)
}),
response: {
200: GroupsSchema
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts
index c3261a6317..cc189cb1ca 100644
--- a/backend/src/lib/api-docs/constants.ts
+++ b/backend/src/lib/api-docs/constants.ts
@@ -24,6 +24,9 @@ export const GROUPS = {
id: "The id of the group to add the user to.",
username: "The username of the user to add to the group."
},
+ GET_BY_ID: {
+ id: "The id of the group to fetch"
+ },
DELETE_USER: {
id: "The id of the group to remove the user from.",
username: "The username of the user to remove from the group."
diff --git a/docs/api-reference/endpoints/groups/add-group-user.mdx b/docs/api-reference/endpoints/groups/add-group-user.mdx
new file mode 100644
index 0000000000..bd490c9a19
--- /dev/null
+++ b/docs/api-reference/endpoints/groups/add-group-user.mdx
@@ -0,0 +1,4 @@
+---
+title: "Add Group User"
+openapi: "POST /api/v1/groups/{id}/users/{username}"
+---
diff --git a/docs/api-reference/endpoints/groups/create.mdx b/docs/api-reference/endpoints/groups/create.mdx
new file mode 100644
index 0000000000..3f69c525a0
--- /dev/null
+++ b/docs/api-reference/endpoints/groups/create.mdx
@@ -0,0 +1,4 @@
+---
+title: "Create"
+openapi: "POST /api/v1/groups"
+---
diff --git a/docs/api-reference/endpoints/groups/delete.mdx b/docs/api-reference/endpoints/groups/delete.mdx
new file mode 100644
index 0000000000..54f0a10c0b
--- /dev/null
+++ b/docs/api-reference/endpoints/groups/delete.mdx
@@ -0,0 +1,4 @@
+---
+title: "Delete"
+openapi: "DELETE /api/v1/groups/{id}"
+---
diff --git a/docs/api-reference/endpoints/groups/get-by-id.mdx b/docs/api-reference/endpoints/groups/get-by-id.mdx
new file mode 100644
index 0000000000..558d820512
--- /dev/null
+++ b/docs/api-reference/endpoints/groups/get-by-id.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get By ID"
+openapi: "GET /api/v1/groups/{id}"
+---
diff --git a/docs/api-reference/endpoints/groups/get.mdx b/docs/api-reference/endpoints/groups/get.mdx
new file mode 100644
index 0000000000..4acba43528
--- /dev/null
+++ b/docs/api-reference/endpoints/groups/get.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get Groups in Organization"
+openapi: "GET /api/v1/groups"
+---
diff --git a/docs/api-reference/endpoints/groups/list-group-users.mdx b/docs/api-reference/endpoints/groups/list-group-users.mdx
new file mode 100644
index 0000000000..166f45527f
--- /dev/null
+++ b/docs/api-reference/endpoints/groups/list-group-users.mdx
@@ -0,0 +1,4 @@
+---
+title: "List Group Users"
+openapi: "GET /api/v1/groups/{id}/users"
+---
diff --git a/docs/api-reference/endpoints/groups/remove-group-user.mdx b/docs/api-reference/endpoints/groups/remove-group-user.mdx
new file mode 100644
index 0000000000..a8ef6ed09f
--- /dev/null
+++ b/docs/api-reference/endpoints/groups/remove-group-user.mdx
@@ -0,0 +1,4 @@
+---
+title: "Remove Group User"
+openapi: "DELETE /api/v1/groups/{id}/users/{username}"
+---
diff --git a/docs/api-reference/endpoints/groups/update.mdx b/docs/api-reference/endpoints/groups/update.mdx
new file mode 100644
index 0000000000..d008edc5a0
--- /dev/null
+++ b/docs/api-reference/endpoints/groups/update.mdx
@@ -0,0 +1,4 @@
+---
+title: "Update"
+openapi: "PATCH /api/v1/groups/{id}"
+---
diff --git a/docs/api-reference/endpoints/project-groups/create.mdx b/docs/api-reference/endpoints/project-groups/create.mdx
new file mode 100644
index 0000000000..6b468085e4
--- /dev/null
+++ b/docs/api-reference/endpoints/project-groups/create.mdx
@@ -0,0 +1,4 @@
+---
+title: "Create Project Membership"
+openapi: "POST /api/v2/workspace/{projectId}/groups/{groupId}"
+---
diff --git a/docs/api-reference/endpoints/project-groups/delete.mdx b/docs/api-reference/endpoints/project-groups/delete.mdx
new file mode 100644
index 0000000000..07db40d7fc
--- /dev/null
+++ b/docs/api-reference/endpoints/project-groups/delete.mdx
@@ -0,0 +1,4 @@
+---
+title: "Delete Project Membership"
+openapi: "DELETE /api/v2/workspace/{projectId}/groups/{groupId}"
+---
diff --git a/docs/api-reference/endpoints/project-groups/get-by-id.mdx b/docs/api-reference/endpoints/project-groups/get-by-id.mdx
new file mode 100644
index 0000000000..611f39059a
--- /dev/null
+++ b/docs/api-reference/endpoints/project-groups/get-by-id.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get Project Membership"
+openapi: "GET /api/v2/workspace/{projectId}/groups/{groupId}"
+---
diff --git a/docs/api-reference/endpoints/project-groups/list.mdx b/docs/api-reference/endpoints/project-groups/list.mdx
new file mode 100644
index 0000000000..1488fb6aeb
--- /dev/null
+++ b/docs/api-reference/endpoints/project-groups/list.mdx
@@ -0,0 +1,4 @@
+---
+title: "List Project Memberships"
+openapi: "GET /api/v2/workspace/{projectId}/groups"
+---
diff --git a/docs/api-reference/endpoints/project-groups/update.mdx b/docs/api-reference/endpoints/project-groups/update.mdx
new file mode 100644
index 0000000000..8b963a1d87
--- /dev/null
+++ b/docs/api-reference/endpoints/project-groups/update.mdx
@@ -0,0 +1,4 @@
+---
+title: "Update Project Membership"
+openapi: "PATCH /api/v2/workspace/{projectId}/groups/{groupId}"
+---
diff --git a/docs/mint.json b/docs/mint.json
index 2fbce096db..d2ca126056 100644
--- a/docs/mint.json
+++ b/docs/mint.json
@@ -546,6 +546,19 @@
"api-reference/endpoints/oidc-auth/revoke"
]
},
+ {
+ "group": "Groups",
+ "pages": [
+ "api-reference/endpoints/groups/create",
+ "api-reference/endpoints/groups/update",
+ "api-reference/endpoints/groups/delete",
+ "api-reference/endpoints/groups/get",
+ "api-reference/endpoints/groups/get-by-id",
+ "api-reference/endpoints/groups/add-group-user",
+ "api-reference/endpoints/groups/remove-group-user",
+ "api-reference/endpoints/groups/list-group-users"
+ ]
+ },
{
"group": "Organizations",
"pages": [
@@ -577,6 +590,16 @@
"api-reference/endpoints/project-users/update-membership"
]
},
+ {
+ "group": "Project Groups",
+ "pages": [
+ "api-reference/endpoints/project-groups/create",
+ "api-reference/endpoints/project-groups/delete",
+ "api-reference/endpoints/project-groups/get-by-id",
+ "api-reference/endpoints/project-groups/list",
+ "api-reference/endpoints/project-groups/update"
+ ]
+ },
{
"group": "Project Identities",
"pages": [