Created
September 21, 2017 22:59
-
-
Save cmharlow/f6d725d54b59d88bab2e48a5d10182a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
title: Draft SDR-PC API | |
description: > | |
Writing up a test API specification for SDR-PC. | |
version: 1.0.0 | |
contact: | |
name: Christina Harlow | |
consumes: | |
- application/json | |
produces: | |
- application/json | |
basePath: /v1 | |
schemes: | |
- https | |
paths: | |
/deposit: | |
get: | |
summary: Deposit an SDR-PC archival object (single, compressed file) | |
description: > | |
Produces a checksum and location for the client matching all of | |
the parameters. | |
parameters: | |
# basic query | |
- $ref: '#/parameters/resumable' | |
- $ref: '#/parameters/return_checksum' | |
- $ref: '#/parameters/local_checksum' | |
responses: | |
'200': | |
description: Deposit Success | |
schema: | |
$ref: '#/definitions/Deposit' | |
'400': | |
description: The request could not be interpreted | |
'401': | |
description: The request was unauthorized | |
definitions: | |
Deposit: | |
description: > | |
Archival object (single file, compressed, containing MOAB object[s]) sent to | |
AWS for S3 then Glacier deposit. | |
type: object | |
required: | |
- filename | |
- resumable | |
- return_checksum | |
- local_checksum | |
properties: | |
filename: | |
type: string | |
description: The name of the archival object file | |
resumable: | |
type: boolean | |
description: > | |
Whether or not the object deposit process can be resumed over multipart. | |
return_checksum: | |
type: boolean | |
description: > | |
Whether or not the API should return the archival object checksum from AWS. | |
local_checksum: | |
type: object | |
items: | |
type: string | |
format: hexstring | |
description: > | |
Verification of the content of the file as generated locally. Must include at least one | |
of MD5 or SHA1. The key specifies the lowercase name of the algorithm; the element is a | |
hexadecimal string of the checksum value. For example: | |
{"sha1":"6b4f32a3408b1cd7db9372a63a2053c3ef25c731", | |
"md5":"766ba6fd3a257edf35d9f42a8dd42a79"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment