Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,43 @@ export default extendConfig(
{ text: "Get Current User", link: "/api-reference/user/get-current-user" },
],
},
{
text: "IDP Group Sync",
collapsed: true,
items: [
{ text: "Overview", link: "/api-reference/idp-group-sync/overview" },
{ text: "Get Group Sync Config", link: "/api-reference/idp-group-sync/get-group-sync-config" },
{
text: "Update Group Sync Config",
link: "/api-reference/idp-group-sync/update-group-sync-config",
},
{ text: "List Project Mappings", link: "/api-reference/idp-group-sync/list-project-mappings" },
{ text: "Create Project Mapping", link: "/api-reference/idp-group-sync/create-project-mapping" },
{ text: "Get Project Mapping", link: "/api-reference/idp-group-sync/get-project-mapping" },
{ text: "Update Project Mapping", link: "/api-reference/idp-group-sync/update-project-mapping" },
{ text: "Delete Project Mapping", link: "/api-reference/idp-group-sync/delete-project-mapping" },
{
text: "List Workspace Mappings",
link: "/api-reference/idp-group-sync/list-workspace-mappings",
},
{
text: "Create Workspace Mapping",
link: "/api-reference/idp-group-sync/create-workspace-mapping",
},
{
text: "Get Workspace Mapping",
link: "/api-reference/idp-group-sync/get-workspace-mapping",
},
{
text: "Update Workspace Mapping",
link: "/api-reference/idp-group-sync/update-workspace-mapping",
},
{
text: "Delete Workspace Mapping",
link: "/api-reference/idp-group-sync/delete-workspace-mapping",
},
],
},
],
},
],
Expand Down
153 changes: 153 additions & 0 deletions docs/api-reference/idp-group-sync/create-project-mapping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
---
title: Create project group mapping
description: Create a project group mapping via Plane API. HTTP request format, parameters, scopes, and example responses for create project group mapping.
keywords: plane, plane api, rest api, api integration, idp group sync, create project group mapping
---

# Create project group mapping

<div class="api-endpoint-badge">
<span class="method post">POST</span>
<span class="path">/api/v1/workspaces/{workspace_slug}/group-sync/project-mappings/</span>
</div>

<div class="api-two-column">
<div class="api-left">

Create a new IdP group → project mapping. Use `project` to map to a specific project, or `all_projects: true` to map to all projects in the workspace. These two fields are mutually exclusive.

<div class="params-section">

### Path Parameters

<div class="params-list">

<ApiParam name="workspace_slug" type="string" :required="true">

The workspace_slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL `https://app.plane.so/my-team/projects/`, the workspace slug is `my-team`.

</ApiParam>

</div>
</div>

<div class="params-section">

### Body Parameters

<div class="params-list">

<ApiParam name="idp_group_name" type="string" :required="true">

The name of the IdP group to map.

</ApiParam>

<ApiParam name="role" type="string" :required="true">

Project role slug to assign to members of the IdP group (e.g. `member`, `admin`, `guest`).

</ApiParam>

<ApiParam name="project" type="string" :required="false">

Project identifier to map the group to (e.g. `ENG`). Mutually exclusive with `all_projects`.

</ApiParam>

<ApiParam name="all_projects" type="boolean" :required="false">

When `true`, maps the group to all projects in the workspace. Mutually exclusive with `project`.

</ApiParam>

</div>
</div>

<div class="params-section">

### Scopes

`workspaces.group_sync:write`

</div>

</div>

<div class="api-right">

<CodePanel title="Create project group mapping" :languages="['cURL', 'Python', 'JavaScript']">
<template #curl>

```bash
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/" \
-H "X-API-Key: $PLANE_API_KEY" \
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"idp_group_name": "engineering",
"project": "ENG",
"role": "member"
}'
```

</template>
<template #python>

```python
import requests

response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/",
headers={"X-API-Key": "your-api-key"},
json={
"idp_group_name": "engineering",
"project": "ENG",
"role": "member"
}
)
print(response.json())
```

</template>
<template #javascript>

```javascript
const response = await fetch("https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/project-mappings/", {
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
idp_group_name: "engineering",
project: "ENG",
role: "member",
}),
});
const data = await response.json();
```

</template>
</CodePanel>

<ResponsePanel status="201">

```json
{
"id": "661f9511-f30c-52e5-b827-557766551111",
"idp_group_name": "engineering",
"project": "ENG",
"all_projects": false,
"role": "member",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
```

</ResponsePanel>

</div>

</div>
136 changes: 136 additions & 0 deletions docs/api-reference/idp-group-sync/create-workspace-mapping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
title: Create workspace group mapping
description: Create a workspace group mapping via Plane API. HTTP request format, parameters, scopes, and example responses for create workspace group mapping.
keywords: plane, plane api, rest api, api integration, idp group sync, create workspace group mapping
---

# Create workspace group mapping

<div class="api-endpoint-badge">
<span class="method post">POST</span>
<span class="path">/api/v1/workspaces/{workspace_slug}/group-sync/workspace-mappings/</span>
</div>

<div class="api-two-column">
<div class="api-left">

Create a new IdP group → workspace role mapping.

<div class="params-section">

### Path Parameters

<div class="params-list">

<ApiParam name="workspace_slug" type="string" :required="true">

The workspace_slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL `https://app.plane.so/my-team/projects/`, the workspace slug is `my-team`.

</ApiParam>

</div>
</div>

<div class="params-section">

### Body Parameters

<div class="params-list">

<ApiParam name="idp_group_name" type="string" :required="true">

The name of the IdP group to map.

</ApiParam>

<ApiParam name="role" type="string" :required="true">

Workspace role slug to assign to members of the IdP group (e.g. `member`, `admin`).

</ApiParam>

</div>
</div>

<div class="params-section">

### Scopes

`workspaces.group_sync:write`

</div>

</div>

<div class="api-right">

<CodePanel title="Create workspace group mapping" :languages="['cURL', 'Python', 'JavaScript']">
<template #curl>

```bash
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/workspace-mappings/" \
-H "X-API-Key: $PLANE_API_KEY" \
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"idp_group_name": "leadership",
"role": "admin"
}'
```

</template>
<template #python>

```python
import requests

response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/workspace-mappings/",
headers={"X-API-Key": "your-api-key"},
json={
"idp_group_name": "leadership",
"role": "admin"
}
)
print(response.json())
```

</template>
<template #javascript>

```javascript
const response = await fetch("https://api.plane.so/api/v1/workspaces/my-workspace/group-sync/workspace-mappings/", {
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
idp_group_name: "leadership",
role: "admin",
}),
});
const data = await response.json();
```

</template>
</CodePanel>

<ResponsePanel status="201">

```json
{
"id": "772g0622-g41d-63f6-c938-668877662222",
"idp_group_name": "leadership",
"role": "admin",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
```

</ResponsePanel>

</div>

</div>
Loading
Loading