OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/docs/api/apiv3/components/schemas/file_link_model.yml

214 lines
5.5 KiB

# Schema: File_LinkModel
---
type: object
required:
- id
- _type
- originData
properties:
id:
type: integer
description: File link id
readOnly: true
_type:
type: string
enum:
- FileLink
readOnly: true
createdAt:
type: string
format: date-time
description: Time of creation
readOnly: true
updatedAt:
type: string
format: date-time
description: Time of the most recent change to the file link
readOnly: true
originData:
$ref: '#/components/schemas/File_Link_Origin_DataModel'
_embedded:
type: object
readOnly: true
required:
- storage
- container
properties:
storage:
$ref: '#/components/schemas/StorageModel'
container:
oneOf:
- $ref: '#/components/schemas/Work_PackageModel'
_links:
type: object
required:
- self
- storage
- container
- creator
- delete
- downloadLocation
- staticDownloadLocation
- originOpen
- staticOriginOpen
properties:
self:
allOf:
- $ref: './link.yml'
- description: |-
This file link.
**Resource**: FileLink
readOnly: true
storage:
allOf:
- $ref: './link.yml'
- description: |-
The storage resource of the linked file.
**Resource**: Storage
readOnly: true
storageUrl:
allOf:
- $ref: './link.yml'
- description: |-
The storage url the file link references to.
**Resource**: N/A
writeOnly: true
container:
allOf:
- $ref: './link.yml'
- description: |-
The container the origin file is linked to.
Can be one of the following **Resources**:
- WorkPackage
readOnly: true
creator:
allOf:
- $ref: './link.yml'
- description: |-
The creator of the file link.
**Resource**: User
readOnly: true
delete:
allOf:
- $ref: './link.yml'
- description: |-
The uri to delete the file link.
**Resource**: N/A
readOnly: true
downloadLocation:
allOf:
- $ref: './link.yml'
- description: |-
The uri to download the origin file from.
**Resource**: N/A
readOnly: true
staticDownloadLocation:
allOf:
- $ref: './link.yml'
- description: |-
A static uri to download the origin filefrom the storage. Responds with a redirect.
**Resource**: N/A
readOnly: true
originOpen:
allOf:
- $ref: './link.yml'
- description: |-
The uri to open the origin file on the origin itself.
**Resource**: N/A
readOnly: true
staticOriginOpen:
allOf:
- $ref: './link.yml'
- description: |-
A static uri to open the origin file on the storage. Responds with a redirect.
**Resource**: N/A
readOnly: true
example:
id: 1337
_type: FileLink
createdAt: '2021-12-20T13:37:00.211Z'
updatedAt: '2021-12-20T13:37:00.211Z'
originData:
id: 5503
name: logo.png
mimeType: image/png
createdAt: '2021-12-19T09:42:10.170Z'
lastModifiedAt: '2021-12-20T14:00:13.987Z'
createdByName: Luke Skywalker
lastModifiedByName: Anakin Skywalker
_embedded:
storage:
id: 1337
_type: Storage
name: It's no moon
createdAt: '2021-12-20T13:37:00.211Z'
updatedAt: '2021-12-20T13:37:00.211Z'
_links:
self:
href: /api/v3/storages/1337
title: It's no moon
type:
href: urn:openproject-org:api:v3:storages:nextcloud
title: Nextcloud
origin:
href: https://nextcloud.deathstar.rocks/
container:
_hint: Work package resource shortened for brevity
_type: WorkPackage
_links:
self:
href: "/api/v3/work_packages/1528"
title: Develop API
schema:
href: "/api/v3/work_packages/schemas/11-2"
id: 1528
subject: Develop API
description:
format: markdown
raw: Develop super cool OpenProject API.
html: "<p>Develop super cool OpenProject API.</p>"
scheduleManually: false
startDate:
dueDate:
createdAt: '2014-08-29T12:40:53Z'
updatedAt: '2014-08-29T12:44:41Z'
_links:
self:
href: /api/v3/work_package/17/file_links/1337
title: file link
storage:
href: /api/v3/storage/42
title: storage
container:
href: /api/v3/work_package/17
title: work package
creator:
href: /api/v3/users/33
title: Obi-Wan Kenobi
delete:
href: /api/v3/work_package/17/file_links/1337
title: file link delete API
downloadLocation:
href: https://nextcloud.deathstar.rocks/index.php/dl?fileid=5503
title: file download
staticDownloadLocation:
href: /api/v3/work_package/17/file_links/1337/download
title: file link static download API
originOpen:
href: https://nextcloud.deathstar.rocks/index.php/f?fileid=5503
title: file open
staticOriginOpen:
href: /api/v3/work_package/17/file_links/1337/open
title: file open