Skip to content

Commit 77b697a

Browse files
committed
update table-ops openapi spec to include INDEX_TYPE
add table-ops job and phase using UWS pattern
1 parent 992c729 commit 77b697a

4 files changed

Lines changed: 120 additions & 13 deletions

File tree

openapi.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ servers:
99
tags:
1010
- name: VOSI Capabilities
1111
- name: VOSI Table Metadata
12+
- name: VOSI Table Operations
1213

1314
paths:
1415
# notes: this is how another service like TAP would include VOSI endpoints using
@@ -19,6 +20,14 @@ paths:
1920
/tables/{name}:
2021
$ref: ./openapi/vosi/vosi-table.yaml
2122
#$ref: https://ivoa.net/std/VOSI/vosi-table.yaml
23+
2224
/capabilities:
2325
$ref: ./openapi/vosi/vosi-capabilities.yaml
2426
#$ref: https://ivoa.net/std/VOSI/vosi-capabilities.yaml
27+
28+
/table-ops:
29+
$ref: ./openapi/vosi/vosi-table-ops.yaml
30+
/table-ops/{jobID}:
31+
$ref: ./openapi/vosi/vosi-table-ops-job.yaml
32+
/table-ops/{jobID}/phase:
33+
$ref: ./openapi/vosi/vosi-table-ops-job-phase.yaml
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
get:
2+
operationId: vosi-table-ops-job-phase-get
3+
tags:
4+
- VOSI Table Operations
5+
summary: get a UWS job phase
6+
description: job phase resource
7+
parameters:
8+
- name: jobID
9+
in: path
10+
description: unique job identifier generated by the server
11+
required: true
12+
type: string
13+
example: a1b2c3
14+
responses:
15+
'200':
16+
description: the current phase
17+
content:
18+
text/plain:
19+
schema:
20+
type: string
21+
example: "PENDING"
22+
23+
post:
24+
operationId: vosi-table-ops-job-phase-update
25+
tags:
26+
- VOSI Table Operations
27+
summary: change a UWS job phase
28+
description: update job
29+
parameters:
30+
- name: jobID
31+
in: path
32+
description: unique job identifier generated by the server
33+
required: true
34+
type: string
35+
example: a1b2c3
36+
- name: PHASE
37+
in: query
38+
description: attempt to change the phase
39+
required: true
40+
schema:
41+
type: string
42+
enum: [ABORT, RUN]
43+
example: RUN
44+
responses:
45+
'200':
46+
description: phase change successful
47+
'400':
48+
$ref: ../uws/uws-responses.yaml#/invalid-phase-change
49+
'401':
50+
$ref: ../vosi/vosi-std-responses.yaml#/not-authenticated
51+
'403':
52+
$ref: ../vosi/vosi-std-responses.yaml#/permission-denied
53+
'404':
54+
$ref: ../vosi/vosi-std-responses.yaml#/not-found
55+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
get:
2+
operationId: vosi-table-ops-job-get
3+
tags:
4+
- VOSI Table Operations
5+
summary: get a UWS job description
6+
description: job resource
7+
parameters:
8+
- name: jobID
9+
in: path
10+
description: unique job identifier generated by the server
11+
required: true
12+
type: string
13+
example: a1b2c3
14+
- name: WAIT
15+
in: query
16+
description: wait for the specified time in seconds or until the phase changes
17+
required: false
18+
type: integer
19+
example: WAIT=60
20+
responses:
21+
'200':
22+
$ref: ../uws/uws-responses.yaml#/job
23+
'401':
24+
$ref: ../vosi/vosi-std-responses.yaml#/not-authenticated
25+
'403':
26+
$ref: ../vosi/vosi-std-responses.yaml#/permission-denied
27+
'404':
28+
$ref: ../vosi/vosi-std-responses.yaml#/not-found

openapi/vosi/vosi-table-ops.yaml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
get:
2-
operationId: table-ops-job-list
2+
operationId: vosi-table-ops-job-list
33
tags:
4-
- Table Operations
4+
- VOSI Table Operations
55
summary: list async table update jobs
66
description: async job listing
77
parameters:
88
responses:
9-
200:
9+
'200':
1010
$ref: ../uws/uws-responses.yaml#/job-listing
11-
401:
11+
'401':
1212
$ref: ./vosi-std-responses.yaml#/not-authenticated
13-
403:
13+
'403':
1414
$ref: ./vosi-std-responses.yaml#/permission-denied
15+
'404':
16+
$ref: ./vosi-std-responses.yaml#/not-found
1517
post:
16-
operationId: table-ops-job-create
18+
operationId: vosi-table-ops-job-create
1719
tags:
18-
- Table Operations
20+
- VOSI Table Operations
1921
summary: create async table update job
2022
description: TAP asynchronous table update (create UWS Job)
2123
parameters:
@@ -27,22 +29,35 @@ post:
2729
type: string
2830
- name: INDEX
2931
in: query
30-
description: create index operation; value is a column name in the table
32+
description: |
33+
create index operation; value is a column name in the table
34+
or a comma-separated list of columns
3135
required: false
3236
schema:
3337
type: string
38+
- name: INDEX_TYPE
39+
in: query
40+
description: |
41+
qualifier to create a specialised index: a value of long-lat
42+
requires 2 numeric columns which are used as longitude,latitude
43+
pairs (spherical coordinates); a value of x-y requires 2 numeric
44+
columns which are used as x,y pairs (cartesian coordinates)
45+
required: false
46+
schema:
47+
type: string
48+
enum: [long-lat,x-y]
3449
- name: UNIQUE
3550
in: query
36-
description: qualifier for INDEX to create a unique index
51+
description: qualifier to create a unique index
3752
required: false
3853
schema:
3954
type: boolean
4055
responses:
41-
303:
56+
'303':
4257
$ref: ../uws/uws-responses.yaml#/created
43-
401:
58+
'401':
4459
$ref: ./vosi-std-responses.yaml#/not-authenticated
45-
403:
60+
'403':
4661
$ref: ./vosi-std-responses.yaml#/permission-denied
47-
404:
62+
'404':
4863
$ref: ./vosi-std-responses.yaml#/not-found

0 commit comments

Comments
 (0)