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
146 changes: 145 additions & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,22 @@ export default withMermaid(
text: "API Reference",
items: [
{ text: "Introduction", link: "/api-reference/introduction" },
{
text: "Assets",
collapsed: true,
items: [
{ text: "Overview", link: "/api-reference/assets/overview" },
{ text: "Create User Asset Upload", link: "/api-reference/assets/create-user-asset-upload" },
{ text: "Update User Asset", link: "/api-reference/assets/update-user-asset" },
{ text: "Delete User Asset", link: "/api-reference/assets/delete-user-asset" },
{
text: "Create Workspace Asset Upload",
link: "/api-reference/assets/create-workspace-asset-upload",
},
{ text: "Get Workspace Asset", link: "/api-reference/assets/get-workspace-asset" },
{ text: "Update Workspace Asset", link: "/api-reference/assets/update-workspace-asset" },
],
},
{
text: "Project",
collapsed: true,
Expand All @@ -347,9 +363,38 @@ export default withMermaid(
{ text: "List Projects", link: "/api-reference/project/list-projects" },
{ text: "Get Project", link: "/api-reference/project/get-project-detail" },
{ text: "Update Project", link: "/api-reference/project/update-project-detail" },
{ text: "Archive Project", link: "/api-reference/project/archive-project" },
{ text: "Unarchive Project", link: "/api-reference/project/unarchive-project" },
{ text: "Delete Project", link: "/api-reference/project/delete-project" },
],
},
{
text: "Project Features",
collapsed: true,
items: [
{ text: "Overview", link: "/api-reference/project-features/overview" },
{ text: "Get Project Features", link: "/api-reference/project-features/get-project-features" },
{
text: "Update Project Features",
link: "/api-reference/project-features/update-project-features",
},
],
},
{
text: "Estimates",
collapsed: true,
items: [
{ text: "Overview", link: "/api-reference/estimate/overview" },
{ text: "Create Estimate", link: "/api-reference/estimate/add-estimate" },
{ text: "Get Estimate", link: "/api-reference/estimate/get-estimate" },
{ text: "Update Estimate", link: "/api-reference/estimate/update-estimate" },
{ text: "Delete Estimate", link: "/api-reference/estimate/delete-estimate" },
{ text: "List Estimate Points", link: "/api-reference/estimate/list-estimate-points" },
{ text: "Create Estimate Points", link: "/api-reference/estimate/add-estimate-points" },
{ text: "Update Estimate Point", link: "/api-reference/estimate/update-estimate-point" },
{ text: "Delete Estimate Point", link: "/api-reference/estimate/delete-estimate-point" },
],
},
{
text: "State",
collapsed: true,
Expand All @@ -374,6 +419,24 @@ export default withMermaid(
{ text: "Delete Label", link: "/api-reference/label/delete-label" },
],
},
{
text: "Project Labels",
collapsed: true,
items: [
{ text: "Overview", link: "/api-reference/project-labels/overview" },
{ text: "Create Project Label", link: "/api-reference/project-labels/add-project-label" },
{ text: "List Project Labels", link: "/api-reference/project-labels/list-project-labels" },
{
text: "Get Project Label",
link: "/api-reference/project-labels/get-project-label-detail",
},
{
text: "Update Project Label",
link: "/api-reference/project-labels/update-project-label-detail",
},
{ text: "Delete Project Label", link: "/api-reference/project-labels/delete-project-label" },
],
},
{
text: "Work Item",
collapsed: true,
Expand All @@ -382,8 +445,9 @@ export default withMermaid(
{ text: "Create Work Item", link: "/api-reference/issue/add-issue" },
{ text: "List Work Items", link: "/api-reference/issue/list-issues" },
{ text: "Get Work Item", link: "/api-reference/issue/get-issue-detail" },
{ text: "Get by Sequence ID", link: "/api-reference/issue/get-issue-sequence-id" },
{ text: "Get by identifier", link: "/api-reference/issue/get-issue-sequence-id" },
{ text: "Search Work Items", link: "/api-reference/issue/search-issues" },
{ text: "Advanced Search", link: "/api-reference/issue/advanced-search-work-items" },
{ text: "Update Work Item", link: "/api-reference/issue/update-issue-detail" },
{ text: "Delete Work Item", link: "/api-reference/issue/delete-issue" },
],
Expand Down Expand Up @@ -443,6 +507,7 @@ export default withMermaid(
{ text: "Add Type", link: "/api-reference/issue-types/types/add-issue-type" },
{ text: "List Types", link: "/api-reference/issue-types/types/list-issue-types" },
{ text: "Get Type Details", link: "/api-reference/issue-types/types/get-issue-type-details" },
{ text: "Get Type Schema", link: "/api-reference/issue-types/types/get-work-item-type-schema" },
{ text: "Update Type", link: "/api-reference/issue-types/types/update-issue-types" },
{ text: "Delete Type", link: "/api-reference/issue-types/types/delete-issue-type" },
],
Expand All @@ -466,6 +531,9 @@ export default withMermaid(
{ text: "Overview", link: "/api-reference/issue-types/values/overview" },
{ text: "Add Property Values", link: "/api-reference/issue-types/values/add-property-values" },
{ text: "List Property Values", link: "/api-reference/issue-types/values/list-property-values" },
{ text: "Get Property Value", link: "/api-reference/issue-types/values/get-property-value-detail" },
{ text: "Update Property Value", link: "/api-reference/issue-types/values/update-property-value" },
{ text: "Delete Property Value", link: "/api-reference/issue-types/values/delete-property-value" },
],
},
{
Expand Down Expand Up @@ -534,6 +602,36 @@ export default withMermaid(
{ text: "Get Project Page", link: "/api-reference/page/get-project-page" },
],
},
{
text: "Milestones",
collapsed: true,
items: [
{ text: "Overview", link: "/api-reference/milestones/overview" },
{ text: "Create Milestone", link: "/api-reference/milestones/add-milestone" },
{ text: "List Milestones", link: "/api-reference/milestones/list-milestones" },
{ text: "Get Milestone", link: "/api-reference/milestones/get-milestone-detail" },
{ text: "List Milestone Work Items", link: "/api-reference/milestones/list-milestone-work-items" },
{ text: "Update Milestone", link: "/api-reference/milestones/update-milestone-detail" },
{ text: "Delete Milestone", link: "/api-reference/milestones/delete-milestone" },
],
},
{
text: "Work Item Pages",
collapsed: true,
items: [
{ text: "Overview", link: "/api-reference/work-item-pages/overview" },
{ text: "Create Work Item Page Link", link: "/api-reference/work-item-pages/add-work-item-page" },
{ text: "List Work Item Pages", link: "/api-reference/work-item-pages/list-work-item-pages" },
{
text: "Get Work Item Page Link",
link: "/api-reference/work-item-pages/get-work-item-page-detail",
},
{
text: "Delete Work Item Page Link",
link: "/api-reference/work-item-pages/delete-work-item-page",
},
],
},
{
text: "Intake",
collapsed: true,
Expand Down Expand Up @@ -703,9 +801,55 @@ export default withMermaid(
{ text: "Overview", link: "/api-reference/members/overview" },
{ text: "Get Workspace Members", link: "/api-reference/members/get-workspace-members" },
{ text: "Get Project Members", link: "/api-reference/members/get-project-members" },
{ text: "Create Project Member", link: "/api-reference/members/add-project-member" },
{ text: "Get Project Member", link: "/api-reference/members/get-project-member-detail" },
{ text: "Update Project Member", link: "/api-reference/members/update-project-member" },
{ text: "Delete Project Member", link: "/api-reference/members/delete-project-member" },
{ text: "Remove Workspace Members", link: "/api-reference/members/remove-workspace-member" },
],
},
{
text: "Workspace Features",
collapsed: true,
items: [
{ text: "Overview", link: "/api-reference/workspace-features/overview" },
{
text: "Get Workspace Features",
link: "/api-reference/workspace-features/get-workspace-features",
},
{
text: "Update Workspace Features",
link: "/api-reference/workspace-features/update-workspace-features",
},
],
},
{
text: "Workspace Invitations",
collapsed: true,
items: [
{ text: "Overview", link: "/api-reference/workspace-invitations/overview" },
{
text: "Create Workspace Invitation",
link: "/api-reference/workspace-invitations/add-workspace-invitation",
},
{
text: "List Workspace Invitations",
link: "/api-reference/workspace-invitations/list-workspace-invitations",
},
{
text: "Get Workspace Invitation",
link: "/api-reference/workspace-invitations/get-workspace-invitation-detail",
},
{
text: "Update Workspace Invitation",
link: "/api-reference/workspace-invitations/update-workspace-invitation",
},
{
text: "Delete Workspace Invitation",
link: "/api-reference/workspace-invitations/delete-workspace-invitation",
},
],
},
{
text: "User",
collapsed: true,
Expand Down
157 changes: 157 additions & 0 deletions docs/api-reference/assets/create-user-asset-upload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
---
title: Create user asset upload
description: Create user asset upload via Plane API. HTTP request format, parameters, scopes, and example responses for create user asset upload.
keywords: plane, plane api, rest api, api integration, assets, create user asset upload
---

# Create user asset upload

<div class="api-endpoint-badge">
<span class="method post">POST</span>
<span class="path">/api/v1/assets/user-assets/</span>
</div>

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

Generate presigned URL for user asset upload

<div class="params-section">

### Body Parameters

<div class="params-list">

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

Original filename of the asset

</ApiParam>

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

MIME type of the file

- `image/jpeg` - JPEG
- `image/png` - PNG
- `image/webp` - WebP
- `image/jpg` - JPG
- `image/gif` - GIF

</ApiParam>

<ApiParam name="size" type="integer" :required="true">

File size in bytes

</ApiParam>

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

Type of user asset

- `USER_AVATAR` - User Avatar
- `USER_COVER` - User Cover

</ApiParam>

</div>
</div>

<div class="params-section">

### Scopes

`assets:write`

</div>

</div>

<div class="api-right">

<CodePanel title="Create user asset upload" :languages="['cURL', 'Python', 'JavaScript']">
<template #curl>

```bash
curl -X POST \
"https://api.plane.so/api/v1/assets/user-assets/" \
-H "X-API-Key: $PLANE_API_KEY" \
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Example Name",
"type": "image/jpeg",
"size": 1024000,
"entity_type": "USER_AVATAR"
}'
```

</template>
<template #python>

```python
import requests

response = requests.post(
"https://api.plane.so/api/v1/assets/user-assets/",
headers={"X-API-Key": "your-api-key"},
json={
"name": "Example Name",
"type": "image/jpeg",
"size": 1024000,
"entity_type": "USER_AVATAR"
}
)
print(response.json())
```

</template>
<template #javascript>

```javascript
const response = await fetch("https://api.plane.so/api/v1/assets/user-assets/", {
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Example Name",
type: "image/jpeg",
size: 1024000,
entity_type: "USER_AVATAR",
}),
});
const data = await response.json();
```

</template>
</CodePanel>

<ResponsePanel status="200">

```json
{
"asset_id": "550e8400-e29b-41d4-a716-446655440000",
"asset_url": "/api/assets/v2/static/550e8400-e29b-41d4-a716-446655440000/",
"upload_data": {
"url": "https://uploads.example.com/plane-bucket",
"fields": {
"Content-Type": "image/png",
"key": "user-assets/550e8400-e29b-41d4-a716-446655440000/profile-image.png",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-credential": "example/20240101/us-east-1/s3/aws4_request",
"x-amz-date": "20240101T000000Z",
"policy": "example-policy",
"x-amz-signature": "example-signature"
}
}
}
```

</ResponsePanel>

</div>

</div>
Loading
Loading