File Management

Update File

Introduction

If an UpdateProjectFileNameRequest is passed, update the name of a file. If a UpdateProjectFileContentsRequest is passed, update the contents of a file.

Request

Information about the file to update along with the new properties to set. The /files/update API accepts requests in the following format:

UpdateFileNameRequest Model - Request to update the name of a file.
projectId integer
Project Id to which the file belongs.
oldFileName string
The current name of the file.
newName string
The new name for the file.
Example
{
  "projectId": 0,
  "oldFileName": "string",
  "newName": "string"
}
UpdateFileContentsRequest Model - Request to update the contents of a file.
projectId integer
Project Id to which the file belongs.
name string
The name of the file that should be updated.
content string
The new contents of the file.
Example
{
  "projectId": 0,
  "name": "string",
  "content": "string"
}

Responses

The /files/update API provides a response in the following format:

200 Success

RestResponse Model - Base API response class for the QuantConnect API.
success boolean
Indicate if the API request was successful.
errors string Array
List of errors with the API call.
Example
{
  "success": true,
  "errors": [
    "string"
  ]
}

401 Authentication Error

UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
www_authenticate string
Header

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: