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
createReference()  : FileReference
Add File Reference
delete()  : null
Delete File
deleteReference()  : null
Delete File Reference
download()  : DownloadFile|null
Download File
downloadPreview()  : DownloadFilePreview|null
Download Preview File
edit()  : File|null
Edit File
get()  : File|null
Get File Info
getReference()  : FileReference|null
Get File Reference
getRevision()  : FileRevision|null
Get File Revision
list()  : ModelCollection
List Files
listReferences()  : ModelCollection
List File References
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

createReference()

Add File Reference

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

integer $data[storageId] required
string $data[name] required

Tags
link

API Documentation

Return values
FileReference

deleteReference()

Delete File Reference

public deleteReference(int $projectId, int $fileId, int $referenceId) : null
Parameters
$projectId : int
$fileId : int
$referenceId : int
Tags
link

API Documentation

Return values
null

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

listReferences()

List File References

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

integer $params[limit]
integer $params[offset]

Tags
link

API Documentation

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