isFormPDF
BooleanWrapper isFormPDF(fileId)
GET /api/2.0/files/file/{fileId}/isformpdf
Check the PDF file
Tells whether a file is a PDF form that can be filled out in the portal, and answers with a single boolean. The check is by content, not by extension: the beginning of the file is read and the answer is true only when it carries the marker the editors write into the forms they produce, so an ordinary PDF, and a PDF form made in other software, both answer false. A file whose name is not a PDF at all answers false without being read. Use it before offering the form-filling operations on a file, because a document that answers false cannot be started for filling. The caller needs read access to the file, and read access is enough - a member of the room with read-only rights gets the answer; a caller without access to the room is refused and an anonymous caller is rejected. The operation is read-only and idempotent. It says nothing about the state of the filling - for that read GET api/2.0/files/file/{fileId}/formroles.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| fileId | path | Integer (int32) | The file the operation addresses. Take the identifier from a listing such as GET api/2.0/files/{folderId}: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string. | [required] [example: 10] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | True when the file is a PDF form made in the editors, false otherwise | BooleanWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 403 | The caller cannot read the file | - | - |
| 404 | The file id resolves to nothing | - | - |
| 500 | The file is a PDF form in a form-filling room whose filling has not started, and the caller may only fill forms there | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 400 | Bad Request. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Third-party storage
For a file or folder in a connected third-party storage the identifier is a string such as sbox-42, and the call differs in these parts only:
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| fileId | path | String | The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string. | [required] [example: sbox-42-L1JlcG9ydC5kb2N4] |
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: Not defined
- Accept: application/json