Downloads files from an attachment field in an app.
Method | GET |
URL | https://{subdomain}.kintone.com/k/v1/file.json |
Authentication | API Token Authentication , Password Authentication |
Content-Type | application/json (not needed if specifying the query with a query string) |
Permissions
- App view permissions for the related App are needed.
- Record view permissions for the related record are needed.
- Field view permissions for the related field are needed.
Request Parameters
The file is downloaded by sending the fileKey of the attachment file. This fileKey though will first need to be obtained using the Get Record API.
Note that this fileKey is different from the fileKey obtained from the response when using the Upload File API.
PARAMETER | VALUE | REQUIRED | DESCRIPTION |
---|---|---|---|
fileKey | String | Yes | The value that is set on the Attachment field in the response data returned when using the Get Record API. |
Sample Request (Query String)
JavaScript
curl Sample
Sample Request (JSON)
JavaScript
N/A.
Data cannot be set in the body for GET methods when using XMLHttpRequest (XHR).
curl Sample
Sample Response
The MIME media type of the uploaded file will be stated in the Content-Type, and information of the file will be set inside the response body.
Obtaining the fileKey
The fileKey of a file can be found in the response of the Get Record API.
Below is a sample response including the fileKey to be used with the Download File API.
Limitations
This API cannot be called with the Kintone API Request API.