Documentation

FileApi extends AbstractApi
in package

Use API to keep the source files up to date, check on file revisions

Table of Contents

Methods

create()  : File
Add File
delete()  : mixed
Delete File
download()  : DownloadFile|null
Download File
downloadPreview()  : DownloadFilePreview|null
Download Preview File
edit()  : File|null
Edit File
get()  : File|null
Get File Info
getRevision()  : FileRevision|null
Get File Revision
list()  : ModelCollection
List Files
restore()  : File
Restore file to revision
revisions()  : ModelCollection
List File Revisions
update()  : File
Update File

Methods

create()

Add File

public create(int $projectId, array<string|int, mixed> $data) : File
Parameters
$projectId : int
$data : array<string|int, mixed>

integer $data[storageId] required
string $data[name] required
integer $data[branchId] Can't be used with directoryId in same request
integer $data[directoryId] Can't be used with branchId in same request
string $data[title]
string $data[context]
string $data[type]
array $data[importOptions]
array $data[exportOptions]

Tags
link

API Documentation

link

API Documentation Enterprise

Return values
File

list()

List Files

public list(int $projectId[, array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
$projectId : int
$params : array<string|int, mixed> = []

integer $params[branchId] Can't be used with directoryId in the same request
integer $params[directoryId] Can't be used with branchId in the same request
mixed $params[recursion] Works only when directoryId or branchId parameter is specified
integer $params[limit]
integer $params[offset]

Tags
link

API Documentation

link

API Documentation Enterprise

Return values
ModelCollection

update()

Update File

public update(int $projectId, int $fileId, array<string|int, mixed> $data) : File
Parameters
$projectId : int
$fileId : int
$data : array<string|int, mixed>

array $data[storageId] required
array $data[updateOption]
array $data[importOptions]
array $data[exportOptions]

Tags
link

API Documentation

link

API Documentation Enterprise

Return values
File

        
On this page

Search results