Upload a local file to 21RISK from a client that can run shell commands, such as Claude Code. Pass the file name, its type and its exact size in bytes (wc -c < <file>). Save the returned uploadScript to a file and run sh <script> <path-to-file> before expiresAt. It sends the file in one request, or in parts when it is larger than partSize, so files up to 2 GB work. Then call confirmFileUpload with fileId: it checks the file and makes it available. Only a confirmed file id works where functions take one, for example fileId on createEngineeringReport. Prefer this over uploadAssetFromBase64, which carries the file inside the request and only suits small files.
Request
- Base URL: https://21risk.com
- URL: https://21risk.com/api/rpc/createFileUpload
- Auth: OAuth 2 (client credentials, token URL /api/v1/oauth/token)
Request body
Response
Successful response
Changes
No recorded changes to this operation across all 1 revision of this API.