Skedulo Attachments API
The Attachments API from Skedulo — 2 operation(s) for attachments.
The Attachments API from Skedulo — 2 operation(s) for attachments.
openapi: 3.0.0
info:
title: Authentication Admin Attachments API
description: Skedulo Authentication API
version: 1.0.0
servers:
- url: https://api.skedulo.com/auth
- url: https://api.uk.skedulo.com/auth
- url: https://api.ca.skedulo.com/auth
- url: https://api.au.skedulo.com/auth
tags:
- name: Attachments
paths:
/attachments:
get:
summary: Find attachments that belong to the parent
description: ''
operationId: getFiles
parameters:
- name: parent_ids
in: query
description: Comma-separated identifiers of the parents to retrieve attachments for
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResultsFileMetaMap'
'404':
description: Resource with parent identifier not found
tags:
- Attachments
/attachments/{parentId}:
get:
summary: Find attachments that belong to the parent
description: ''
operationId: getFilesSingle
parameters:
- name: parentId
in: path
description: Identifier of the parent to retrieve attachments for
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResultsFileMeta'
'404':
description: Resource with parent identifier not found
tags:
- Attachments
put:
summary: Upload an attachment to a parent record id or a temporary parent id. Content-Length and Content-Type are required.
description: This API is to upload attachment to an existing parent record or a temporary parent id. If the temporary parent id is linked to a real parent id, the real parent id will be swapped in automatically. Otherwise, the file is uploaded to a temporary place awaiting the temporary parent id to be linked.
operationId: uploadReturnOldMeta
parameters:
- name: parentId
in: path
description: Identifier of the parent to add the attachment to or the temporary parent id. A temporary parent id must start with 'temp-'.
required: true
schema:
type: string
- name: X-Skedulo-Name
in: header
description: The name of the attachment
required: true
schema:
type: string
- name: X-Skedulo-Description
in: header
description: An optional description of the attachment
required: false
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResultFileMetaOld'
'400':
description: Invalid data supplied
tags:
- Attachments
post:
summary: Upload an attachment to a parent record id or a temporary parent id. Content-Length and Content-Type are required.
description: This API is to upload attachment to an existing parent record or a temporary parent id. If the temporary parent id is linked to a real parent id, the real parent id will be swapped in automatically. Otherwise, the file is uploaded to a temporary place awaiting the temporary parent id to be linked.
operationId: uploadReturnNewMeta
parameters:
- name: parentId
in: path
description: Identifier of the parent to add the attachment to or the temporary parent id. A temporary parent id must start with 'temp-'.
required: true
schema:
type: string
- name: X-Skedulo-Name
in: header
description: The name of the attachment
required: true
schema:
type: string
- name: X-Skedulo-Description
in: header
description: An optional description of the attachment
required: false
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResultFileMeta'
'400':
description: Invalid data supplied
tags:
- Attachments
components:
schemas:
ApiResultFileMeta:
type: object
properties:
result:
$ref: '#/components/schemas/FileMeta'
ApiResultsFileMetaMap:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/FileMetaOld'
ApiResultsFileMeta:
type: object
properties:
result:
type: array
items:
$ref: '#/components/schemas/FileMetaOld'
ApiResultFileMetaOld:
type: object
properties:
result:
$ref: '#/components/schemas/FileMetaOld'
FileMeta:
type: object
required:
- id
- parentId
- name
- createdById
- createdDate
properties:
id:
type: string
description: The id of the file or the string 'temporary_file' if the 'parentId' is an unlinked temporary id
parentId:
type: string
description: The parent id or the temporary parent id that the file is uploaded with
contentType:
type: string
name:
type: string
createdDate:
type: string
format: date-time
contentLength:
type: string
createdById:
type: string
description:
type: string
downloadUrl:
type: string
FileMetaOld:
type: object
required:
- fileName
- filePtr
- parentId
- uploadDate
properties:
filePtr:
type: string
description: The id of the file or the string 'temporary_file' if the 'parentId' is an unlinked temporary id
size:
type: string
contentType:
type: string
fileName:
type: string
uploadDate:
type: string
format: date-time
parentId:
type: string
description: The parent id or the temporary parent id that the file is uploaded with
createdBy:
type: string
createdById:
type: string
description:
type: string
downloadUrl:
type: string
securitySchemes:
Authorization:
type: http
scheme: bearer
bearerFormat: JWT