Update a File
put
/api/file/Files/{id}
Updates the file in Unified Assurance file storage that matches the specified ID.
Request
Path Parameters
-
id(required): integer(int32)
The file ID specified for individual CRUD operations.Example:
1
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object-
ExpireTime: string
Allowed Values:
[ "Never", "2023-02-28 05:02:00" ]Expire time of file. Can be used to create a cleanup policy of expired files. It should be of format "yyyy-mm-dd hh:mm:ss" or "Never".Example:Never -
FileTypeID: integer
The ID of the file type. The following default integer values will be mapped to a string in the FileType property automatically:
- 1: Other
- 2: Image
- 3: Report
- 4: Sound
This should, but does not have to, match the type indicated by the file's extension.Example:2 -
MimeType: string
The MIME type of the file. If you specify this parameter, it is used as specified, even if it does not match the type indicated by the file's extension. If you do not specify this property, it will be automatically detected based on the file's extension.Example:
image/png -
OwnerUserGroupID: integer
The user group owner of the file.Example:
1 -
OwnerUserID: integer
The ID of the user that owns the file. This can never be an externally-authenticated transient user. 0 means it is public to all users in the owning group.Example:
0 -
UploadFile:
Upload File contents. Filename is determined from Content-Disposition filename. Fake upload (add file already on server), by populating with $_FILES fields.
-
Viewers: array
Viewers
Selection of user groups that have read-only access to file.
Nested Schema : Viewers
Type:
arraySelection of user groups that have read-only access to file.
Show Source
Example:
[
{
"UserGroupID":"0",
"UserGroupName":"[Public to All Groups]"
}
]Nested Schema : items
Type:
Show Source
object-
UserGroupID: integer
User Group ID
-
UserGroupName: string
User Group Name
Response
Supported Media Types
- application/json
200 Response
Successful operation
Root Schema : schema
Match All
Show Source
-
object
SuccessfulUpdateOperation
The response body for a successful update operation.
-
object
type
Nested Schema : SuccessfulUpdateOperation
Type:
objectThe response body for a successful update operation.
Show Source
-
message: string
The response message.Example:
Updated record -
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
true
Nested Schema : type
Type:
Show Source
object-
data: array
data
-
total: integer
The total number of results regardless of paging.Example:
1
Nested Schema : fileFileTypesRead
Type:
Show Source
object-
FileTypeID: integer
File Type ID specified for individual CRUD operations.Example:
2 -
FileTypeName: string
File Type Name.Example:
Image
Default Response
Failed operation
Root Schema : schema
Type:
Show Source
object-
errors: array
errors
The list of errors reported. Validation errors will be keyed by record field.
-
message: string
The response message.Example:
Exception thrown -
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
false
Nested Schema : errors
Type:
arrayThe list of errors reported. Validation errors will be keyed by record field.
Show Source
-
Array of:
object items
An error.
Nested Schema : items
Type:
objectAn error.