Skip to content

Latest commit

 

History

History
134 lines (97 loc) · 2.34 KB

File metadata and controls

134 lines (97 loc) · 2.34 KB
title Update user asset
description Update user asset via Plane API. HTTP request format, parameters, scopes, and example responses for update user asset.
keywords plane, plane api, rest api, api integration, assets, update user asset

Update user asset

PATCH /api/v1/assets/user-assets/{asset_id}/

Mark user asset as uploaded

Path Parameters

Asset ID

Body Parameters

Additional attributes to update for the asset

Scopes

assets:write

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

response = requests.patch(
    "https://api.plane.so/api/v1/assets/user-assets/asset-uuid/",
    headers={"X-API-Key": "your-api-key"},
    json={
      "attributes": {
"name": "Example Name",
"type": "image/jpeg",
"size": 1024000
      },
      "entity_type": "USER_AVATAR"
    }
)
print(response.status_code)
const response = await fetch("https://api.plane.so/api/v1/assets/user-assets/asset-uuid/", {
  method: "PATCH",
  headers: {
    "X-API-Key": "your-api-key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    attributes: {
      name: "Example Name",
      type: "image/jpeg",
      size: 1024000,
    },
    entity_type: "USER_AVATAR",
  }),
});
console.log(response.status);

No response body.