POSTAPIの概要 実装を見る
Update the properties of a drive file.
Credential required: Yes / Permission: write:drive
パラメータ
名前 | 型 | 既定値 |
---|
必須 | fileId | 文字列 | - |
任意 | folderId | 文字列 | - |
| name | 文字列 | - |
| isSensitive | 真偽値 | - |
任意 | comment | 文字列 | - |
200 レスポンス リクエスト成功(内容あり)
400 エラー クライアント側エラー
401 エラー 認証エラー
403 エラー 権限関連のエラー
418 エラー I'm Ai
500 エラー サーバー内部エラー
{
"_path": "/api-docs/endpoints/drive/files/update",
"_dir": "files",
"_draft": false,
"_partial": false,
"_locale": "",
"data": {
"post": {
"operationId": "drive/files/update",
"summary": "drive/files/update",
"description": "Update the properties of a drive file.\n\n**Credential required**: *Yes* / **Permission**: *write:drive*",
"externalDocs": {
"description": "Source code",
"url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/drive/files/update.ts"
},
"tags": [
"drive"
],
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"fileId": {
"type": "string",
"format": "misskey:id"
},
"folderId": {
"type": "string",
"format": "misskey:id",
"nullable": true
},
"name": {
"type": "string"
},
"isSensitive": {
"type": "boolean"
},
"comment": {
"type": "string",
"nullable": true,
"maxLength": 512
}
},
"required": [
"fileId"
]
}
}
}
},
"responses": {
"200": {
"description": "OK (with results)",
"content": {
"application/json": {
"schema": {
"type": "object",
"optional": false,
"nullable": false,
"ref": "DriveFile",
"$ref": "#/components/schemas/DriveFile"
}
}
}
},
"400": {
"description": "Client error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"INVALID_FILE_NAME": {
"value": {
"error": {
"message": "Invalid file name.",
"code": "INVALID_FILE_NAME",
"id": "395e7156-f9f0-475e-af89-53c3c23080c2"
}
}
},
"NO_SUCH_FILE": {
"value": {
"error": {
"message": "No such file.",
"code": "NO_SUCH_FILE",
"id": "e7778c7e-3af9-49cd-9690-6dbc3e6c972d"
}
}
},
"ACCESS_DENIED": {
"value": {
"error": {
"message": "Access denied.",
"code": "ACCESS_DENIED",
"id": "01a53b27-82fc-445b-a0c1-b558465a8ed2"
}
}
},
"NO_SUCH_FOLDER": {
"value": {
"error": {
"message": "No such folder.",
"code": "NO_SUCH_FOLDER",
"id": "ea8fb7a5-af77-4a08-b608-c0218176cd73"
}
}
},
"RESTRICTED_BY_ROLE": {
"value": {
"error": {
"message": "This feature is restricted by your role.",
"code": "RESTRICTED_BY_ROLE",
"id": "7f59dccb-f465-75ab-5cf4-3ce44e3282f7"
}
}
},
"INVALID_PARAM": {
"value": {
"error": {
"message": "Invalid param.",
"code": "INVALID_PARAM",
"id": "3d81ceae-475f-4600-b2a8-2bc116157532"
}
}
}
}
}
}
},
"401": {
"description": "Authentication error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"CREDENTIAL_REQUIRED": {
"value": {
"error": {
"message": "Credential required.",
"code": "CREDENTIAL_REQUIRED",
"id": "1384574d-a912-4b81-8601-c7b1c4085df1"
}
}
}
}
}
}
},
"403": {
"description": "Forbidden error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"AUTHENTICATION_FAILED": {
"value": {
"error": {
"message": "Authentication failed. Please ensure your token is correct.",
"code": "AUTHENTICATION_FAILED",
"id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
}
}
}
}
}
}
},
"418": {
"description": "I'm Ai",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"I_AM_AI": {
"value": {
"error": {
"message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
"code": "I_AM_AI",
"id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
}
}
}
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"INTERNAL_ERROR": {
"value": {
"error": {
"message": "Internal error occurred. Please contact us if the error persists.",
"code": "INTERNAL_ERROR",
"id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
}
}
}
}
}
}
}
}
}
},
"title": "drive/files/update",
"_id": "content:api-docs:endpoints:drive:files:update.json",
"_type": "json",
"_source": "content",
"_file": "api-docs/endpoints/drive/files/update.json",
"_extension": "json"
}