-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
217 lines (209 loc) · 6.94 KB
/
openapi.yaml
File metadata and controls
217 lines (209 loc) · 6.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
openapi: 3.0.3
info:
title: SciCat Globus Proxy API
description: |-
Rest API for the SciCat Globus Proxy. It uses Scicat tokens for authentication.
version: 1.2.0
tags:
- name: auth
description: Operations related to authentication
- name: transfer
description: Operations related to data transfers
- name: health
description: Operations relating to service health
paths:
/version:
get:
tags:
- health
summary: get SciCat Globus Proxy version
security: []
description: returns the current version of the proxy
operationId: GetVersion
responses:
"200":
description: successful response with version information
content:
application/json:
schema:
type: object
properties:
version:
type: string
description: the current version of the service
required:
- version
/transfer:
post:
tags:
- transfer
summary: request a transfer task
description: It allows for requesting transfer tasks against a SciCat token. It uses the service account configured with the service's instance
operationId: PostTransferTask
parameters:
- name: sourceFacility
description: "the identifier name of the source facility"
in: query
required: true
schema:
type: string
description: facility to use as source
- name: destFacility
description: "the path in the destination collection to use for the transfer"
in: query
required: true
schema:
type: string
description: facility to use as destination
- name: scicatPid
description: "the pid of the dataset being transferred"
in: query
required: true
schema:
type: string
description: the SciCat PID of the dataset being transferred
- name: collectionRootPath
description: "Path to the root of the globus collection on the source facility"
in: query
required: true
schema:
type: string
- name: autoArchive
description: "start archive job after successful transfer"
in: query
required: false
schema:
type: boolean
default: true
description: start archive job
requestBody:
description: If omitted, transfer the entire dataset source folder. If provided, only transfer the listed files.
required: false
content:
application/json:
schema:
type: object
properties:
fileList:
type: array
items:
$ref: "#/components/schemas/FileToTransfer"
responses:
"200":
description: successfully started a transfer task
content:
application/json:
schema:
properties:
jobId:
type: string
description: the SciCat job id of the transfer job
required:
- jobId
"400":
description: something went wrong with the request, usually due to some external service signalling an error
$ref: "#/components/responses/GeneralErrorResponse"
"401":
description: the user does not have a valid auth session, so the request is rejected
$ref: "#/components/responses/GeneralErrorResponse"
"403":
description: the user doesn't have the right to request such a transfer task or there's no valid logged-in user
$ref: "#/components/responses/GeneralErrorResponse"
"500":
description: an internal server error was encountered
$ref: "#/components/responses/GeneralErrorResponse"
"503":
description: the server can't currently handle more requests, try again later
$ref: "#/components/responses/GeneralErrorResponse"
/transfer/{scicatJobId}:
delete:
tags:
- transfer
summary: cancels and/or deletes transfer entry
description: allows the user to cancel a transfer and/or delete the job from the scicat job system
operationId: DeleteTransferTask
parameters:
- name: scicatJobId
description: "nothing"
in: path
required: true
schema:
type: string
- name: delete
description: Enables/disables deleting from scicat job system. By default, it's disabled (false).
in: query
required: false
schema:
type: boolean
responses:
"200":
description: deletion was carried out successfully
"400":
description: a generic request error has occured, usually due to some external service signalling an error
$ref: "#/components/responses/GeneralErrorResponse"
"401":
description: the user does not have a valid auth session, so the request is rejected
$ref: "#/components/responses/GeneralErrorResponse"
"403":
description: the user doesn't have the right to request the deletion
$ref: "#/components/responses/GeneralErrorResponse"
"500":
description: an internal server error was encountered
$ref: "#/components/responses/GeneralErrorResponse"
components:
securitySchemes:
ScicatKeyAuth:
type: apiKey
in: header
name: SciCat-API-Key
schemas:
TransferItem:
type: object
properties:
transferId:
type: string
status:
type: string
enum: [waiting, transferring, finished, failed, cancelled, invalid status]
message:
type: string
bytesTransferred:
type: integer
bytesTotal:
type: integer
filesTransferred:
type: integer
filesTotal:
type: integer
required:
- transferId
- status
FileToTransfer:
description: the file to transfer as part of a transfer request
type: object
properties:
path:
type: string
description: the path of the file, it has to be relative to the dataset source folder
isSymlink:
type: boolean
description: specifies whether this file is a symlink
required:
- path
- isSymlink
responses:
GeneralErrorResponse:
description: a general error response
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: the error message
details:
type: string
description: further details, debugging information
security:
- ScicatKeyAuth: []