diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..697cc76 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +# This file generated from a template file maintained in the ivoatex repository. +# To create and install it into a project repository, do: +# make github-preview +# git commit +# git push +# +name: Check the IVOA document + +env: + doc_name: VOSI + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + + - name: Checkout the repository + uses: actions/checkout@v3 + with: + submodules: true + + - name: Setup dependencies + run: | + sudo apt update + sudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended xsltproc latexmk cm-super + + - name: Build the document + run: make + + - name: Check the output + run: | + test -f ${{ env.doc_name }}.pdf + test -f ${{ env.doc_name }}.bbl + + - name: Keep the PDF artefact + uses: actions/upload-artifact@v4 + with: + name: PDF Preview + path: ${{ env.doc_name }}.pdf diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..eb34a99 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,66 @@ +# This file generated from a template file maintained in the ivoatex repository. +# To create and install it into a project repository, do: +# make github-preview +# git commit +# git push +# +name: Update PDF Preview + +env: + doc_name: VOSI + +on: + push: + branches: + - master + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + + - name: Checkout the repository + uses: actions/checkout@v3 + with: + submodules: true + + - name: Setup dependencies + run: | + sudo apt update + sudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended xsltproc latexmk cm-super + sudo snap install pdftk + + - name: Build the document + run: make ${{ env.doc_name }}-draft.pdf + + - name: Check the output + run: | + test -f ${{ env.doc_name }}-draft.pdf + test -f ${{ env.doc_name }}.bbl + + - name: Move the auto-pdf-preview tag + uses: weareyipyip/walking-tag-action@v2 + with: + tag-name: auto-pdf-preview + tag-message: | + Last commit taken into account for the automatically updated PDF preview of this IVOA document. + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update the PDF preview + uses: Xotl/cool-github-releases@v1 + with: + mode: update + isPrerelease: true + tag_name: auto-pdf-preview + release_name: "Auto PDF Preview" + body_mrkdwn: | + This release aims to provide a PDF preview of the last commit applied on this repository. + It will be updated automatically after each merge of a PullRequest. + **DO NOT PUBLISH THIS PRE-RELEASE!**" + _Corresponding commit: ${{ github.sha }}_ + assets: ${{ env.doc_name }}-draft.pdf + replace_assets: true + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index 913cdff..8c5ee5a 100644 --- a/Makefile +++ b/Makefile @@ -4,19 +4,20 @@ DOCNAME = VOSI # count up; you probably do not want to bother with versions <1.0 -DOCVERSION = 1.1 +DOCVERSION = 1.2 # Publication date, ISO format; update manually for "releases" -DOCDATE = 2022-03-10 +DOCDATE = 2024-11-11 # What is it you're writing: NOTE, WD, PR, or REC DOCTYPE = WD -AUTHOR_EMAIL = msdemlei@ari.uni-heidelberg.de +# for push to doc repo +AUTHOR_EMAIL = pdowler.cadc@gmail.com # Source files for the TeX document (but the main file must always # be called $(DOCNAME).tex -SOURCES = $(DOCNAME).tex role_diagram.pdf +SOURCES = $(DOCNAME).tex role_diagram.pdf gitmeta.tex # List of pixel image files to be included in submitted package FIGURES = role_diagram.svg @@ -27,4 +28,9 @@ VECTORFIGURES = # Additional files to distribute (e.g., CSS, schema files, examples...) AUX_FILES = -include ivoatex/Makefile +-include ivoatex/Makefile + +ivoatex/Makefile: + @echo "*** ivoatex submodule not found. Initialising submodules." + @echo + git submodule update --init diff --git a/README b/README deleted file mode 100644 index f28c48a..0000000 --- a/README +++ /dev/null @@ -1,14 +0,0 @@ - -* 2016 * - -This is now the definitive home for VOSI source documents (VOSI.tex and the -various xsd files). - - - -* previous * - -This project was created by Ray Plante. This should not be considered the -definitive home for VOSI source documents; please consult the IVOA GWS twiki -page, http://www.ivoa.net/cgi-bin/twiki/bin/view/IVOA/IvoaGridAndWebServices. - diff --git a/VOSI.tex b/VOSI.tex index 944c5f3..5e5fe40 100644 --- a/VOSI.tex +++ b/VOSI.tex @@ -1,20 +1,23 @@ \documentclass[11pt,letter]{ivoa} \input tthdefs +\input gitmeta + \usepackage{listings} \lstloadlanguages{XML} \lstset{flexiblecolumns=true,basicstyle=\footnotesize,tagstyle=\ttfamily,showspaces=false} +\usepackage{todonotes} \title{IVOA Support Interfaces} \ivoagroup{Grid and Web Services Working Group} -\author{Grid and Web Services Working Group} +\author{Patrick Dowler} +\author{Matthew Graham} +\author{Brian Major} +\author{Guy Rixon} -\editor{Matthew Graham} -\editor{Guy Rixon} \editor{Patrick Dowler} -\editor{Brian Major} \previousversion[https://ivoa.net/documents/VOSI/20170524/]{REC-1.1} \previousversion[http://www.ivoa.net/documents/VOSI/20110531]{REC-1.0} @@ -68,10 +71,13 @@ \section{Introduction} This document describes a set of common basic functions that VO web services provide in the form of a standard support interface in order to -allow for the effective management of the VO. There are three basic +allow for the effective management of the VO. There are two basic support functions that this document describes: The reporting of -capability metadata, the reporting of service availability metadata, and -the reporting of table metadata (if applicable). +capability metadata and +the reporting of table metadata (if applicable). A previous version of +this document also required an interface for reporting service +availability. As discussed in sect.~\ref{sect:availability}, this +part of the specification was dropped in version 1.2. VO service standards previous to VOSI may not be forced to retrospectively implement VOSI (although that should be encouraged). @@ -114,14 +120,6 @@ \subsection{Role within the VO Architecture} \ref{appendix:harvesting} for a more detailed description of this use case.) -Once a user discovers data and services of interest, she will want to -engage them in an analysis process. Success requires that the selected -services are actually up and running properly as a down service can -cause automated processing to fail completely. Registry and workflow -services can assist with this by tracking the availability of services -and alerting users about downtime. We envision that VOSI will allow VO -projects to better track the overall health of the VO ecosystem. - \section{Interface bindings} \label{sec:bindings} @@ -138,9 +136,10 @@ \section{Interface bindings} protocol. The response to an HTTP POST, PUT or DELETE to these resources is not defined by this specification. However, if an implementation has no special action to perform for these requests, the normal response -would be a HTTP 405 "Method not allowed" status code. Both the -capabilities and availability bindings must be available to anonymous -requests. +would be a HTTP 405 "Method not allowed" status code. The +capabilities binding must be available to anonymous +requests.\todo{This is probably no longer true (see SSO) -- material for +another PR} The endpoints and interface types for the support interface shall be defined in the service's registration using one \xmlel{capability} @@ -151,7 +150,8 @@ \section{Interface bindings} When using the REST binding, any HTTP URLs may be used. The client must find the appropriate URLs from the service's entry in the VO registry and, in general, should not try and infer the URLs from any other URLs -for that service. However, standards for specific services may put extra +for that service.\todo{Which is in a bit of a conflict with the +introducton's ``by some other means''. Resolve this in another PR?} However, standards for specific services may put extra constraints on the form of the URLs. \section{Metadata specification} @@ -167,7 +167,10 @@ \section{Metadata specification} \item those describing other aspects of the service \end{itemize} -This section defines how each of these classes is represented. The +This section defines how each of these classes is represented.\todo{I'd +say let's switch this to our canonical prefixes as in other Registry +documents (vr:, vs:, \dots). It's more readable and less of a +typographic chore.} The following typographic convention is used to represent a XML element defined within a particular namespace: @@ -205,7 +208,7 @@ \subsection{Capability metadata} another the TAP implementation but these two might well apply to the same service. -An entry for a service in the resource registry - i.e., its VOResource - +An entry for a service in the resource registry -- i.e., its VOResource -- contains the Dublin Core resource metadata (identifier, curation information, content description, etc.) followed by the service's capability descriptions (expressed as a series of @@ -262,60 +265,26 @@ \subsection{Capability metadata} All VO services should provide this interface. \subsection{Availability metadata} +\label{sect:availability} -This interface indicates whether the service is operable and the -reliability of the service for extended and scheduled requests. The -availability shall be represented as an XML document in which the root -element is -\xmlel{http://www.ivoa.net/xml/Availability/v1.0\#availability}. This -element shall contain child elements providing the following -information: - -\begin{itemize} -\item \xmlel{available} -- whether the service is currently accepting requests -\item \xmlel{upSince} -- duration for which the service has been -continuously available -\item \xmlel{downAt} -- the instant at which the service is next -scheduled to be unavailable -\item \xmlel{backAt} -- the instant at which the service is scheduled to -become available again after down time; -\item \xmlel{note} -- textual note, e.g. explaining the reason for unavailability. -\end{itemize} - -The elements \xmlel{upSince}, \xmlel{downAt}, \xmlel{backAt} and -\xmlel{note} are optional. The \xmlel{available} element is mandatory. -There may be more than one \xmlel{note} element. - -The XML document shall conform to the schema given in appendix -\ref{appendix:availability} of this specification. - -When reporting availability, the service should do a good check on its -underlying parts to see if it is still operational and not just make a -simple return from a web server, e.g., if it relies on a database it -should check that the database is still up. If any of these checks fail, -the service should set available to false in the availability output. - -If a service is to be online but unavailable for work (e.g., when a -service with a work queue intends to shut down after draining the queue) -then the service should set available to false. - -There are no special elements in the availability document for the -contact details of the service operator. These details may be given as a -note element if they are known to the service. - -In the REST binding, the availability shall be a single web resource -with a registered URL +Versions 1.0 and 1.1 of this specification required services to declare +information on their current and future availability. It was found that +this specification was insufficient to work with multi-capability and/or +mirrored services \citep{note:caproles}. Also, the interface has not +found the use that was originally anticipated. Therefore, availability +reporting is no longer part of VOSI, although the standards record still +defines a corresponding standards key, indicating support for the legacy +endpoint. -All VO services shall provide this interface. \subsection{Table metadata} - Some services deal with tabular data. These data may be the target of - ADQL queries, as in TAP \citep{2017ivoa.spec.0509L}, or they may be the - output of other operations, as in SIAP queries. In each case, it is - useful if the service describes the details of the tables concerned. It - is more useful if this description can be captured in the resource - registry. +Some services deal with tabular data. These data may be the target of +ADQL queries, as in TAP \citep{2019ivoa.spec.0927D}, or they may be the +output of other operations, as in SIAP queries. In each case, it is +useful if the service describes the details of the tables concerned. It +is more useful if this description can be captured in the resource +registry. The VODataService standard \citep{2021ivoa.spec.1102D} defines XML elements for describing a set of tables. These elements can be included @@ -330,34 +299,45 @@ \subsection{Table metadata} XML document of which the root element is of type\\ $$\hbox{\xmlel{http://www.ivoa.net/xml/VODataService/v1.1\#Table}}$$\\ This element may contain any mix of elements allowed by the VODataService XML schema. +The table metadata for a single table can also be representated using an empty VOTable. -In the REST binding, the TableSet metadata shall be a hierarchical web -resource with a registered URL. There are two levels of TableSet -metadata detail that may be returned from the base \textit{tables} -endpoint. Maximum detail (max) is the complete metadata including all -details of the Table elements. Minimum detail (min) includes the full -set of Table elements with names and optional descriptions, but does not -include Table elements of type Column or ForeignKey. +The REST interface for the tables endpoint in described in detail in the OpenAPI +specification (see ???). Here we give a brief summary of the main use and some +examples but defer to the OpenAPI documents as the definitive specification. -If the parameter \textit{detail} accompanies the request with values of -either \textit{max} or \textit{min}, the service should take this as a -suggestion as to what level of detail to return, but may return either -level. If the parameter \textit{detail} is not present, the service may -choose the level of metadata detail to return. +\subsubsection{TableSet} +The TableSet metadata is a hierarchical web resource with two levels of detail. +Maximum detail (max) is the complete metadata including all details of the table +structure (columns and foreign keys). Minimum detail (min) includes the full +set of tables (organised by schema) with names and optional descriptions, but does not +include column of foreign key information. For example, the request: \begin{verbatim} -GET http://example.net/srv/tables?detail=min +GET http://example.net/srv/tables \end{verbatim} +\noindent would return the default (service-chosen) amount of detail (either just table +listing or the complete TableSet metadata). -should be taken as a suggestion to return the minimum level of TableSet +The caller can use the \verb|detail| parameter to request a specific amount of detail. +For example: +\begin{verbatim} +GET http://example.net/srv/tables?detail=min +\end{verbatim} +\noindent should be taken as a suggestion to return the minimum level of TableSet +metadata detail, while: +\begin{verbatim} +GET http://example.net/srv/tables?detail=max +\end{verbatim} +\noindent should be taken as a suggestion to return the maximum level of TableSet metadata detail. Services with a large number of tables and/or columns cannot normally respond with a usable TableSet document that has the maximum level of detail so may wish to always respond with the minimum level of detail. +\subsubsection{Table} The REST endpoint must also support a child resource for each table described in the TableSet document. The child resource must be named as it appears in the name of the corresponding child Table element. For @@ -366,16 +346,93 @@ \subsection{Table metadata} \begin{verbatim} GET http://example.net/srv/tables/ivoa.ObsCore \end{verbatim} - -would return a Table document describing the ivoa.ObsCore table in full +\noindent would return a Table document describing the ivoa.ObsCore table in full detail, starting: \begin{verbatim} ivoa.ObsCore + ... ... -\end{verbatim} + +\end{verbatim} + +The above \xmlel{vosi:table} document is the default response format; clients +may request the alternate VOTable format using the HTTP \verb|accept| header with a +value of the VOTable mime-type (\verb|"application/x-votable+xml"|). + +\subsubsection{User-managed Tables} +Some services may allow users to create tables using the tables endpoint. The lifetime +of such tables and the authentication and authorization requirements for using this feature +are an implementation detail that may vary from one service to another. At one extreme, +users may be able to create tables anonymously and the table will persist for a short +period of time (days or weeks) before being removed. At the other extreme, users would +have to authenticate, have permission to create tables in a specific schema, and the tables +would persist forever. + +The visibility of user-managed tables is also an implementation detail not specified here. +Expectation: short-lived anonymously created tables would not be visible (e.g. not listed +by the tables endpoint of the service or be added to the \verb|tap_schema| of a TAP service). +Expectation: permanent tables created (owned) by an authenticated user could be made +visible to and usable by other users (e.g. included in tables endpoint output and added to +the \verb|tap_schema| of a TAP service). + +The additional actions to allow users to manage tables are optional. The OpenAPI specification +says that a tables endpoint that does not support these actions must respond with an HTTP +405 status code; we expect that current services already respond this way. \todo{Do we need a +registry extension for VOSI-tables? just listing http verbs would be enough to avoid probing +for a 405 aka try and see if it works} + +To create a new table: +\begin{verbatim} +PUT http://example.net/srv/tables/schema1.table1 +\end{verbatim} +\noindent where the \verb|| payload can be either a VOSI-table or VOTable document. For +a VOTable payload, the table may contain rows and those rows would be inserted into the created +table. + +To update table metadata: +\begin{verbatim} +POST http://example.net/srv/tables/schema1.table1 +\end{verbatim} +\noindent where only some of the table metadata can me modified (see below). In addition, if +the VOTable format is used for updating metadata, the VOTable would not contain any rows (but +see below). + +To delete a table: +\begin{verbatim} +DELETE http://example.net/srv/tables/schema1.table1 +\end{verbatim} + +Some services may allow the caller to append additional rows to a table. This could be +implemented by accepting a table update that carries additional rows: +\begin{verbatim} +POST http://example.net/srv/tables/schema1.table1 +\end{verbatim} +\noindent where some metadata may be updated and rows in the input VOTable are appended +to the existing table. Other tabular data formats that are not sufficient for create may be +supported for appending rows: csv, tsv, fits, etc. \todo{Service should advertise the +list of acceptable formats} + +\subsubsection{Mutable Table Metadata} +Metadata that can be updated: +\begin{itemize} +\item table metadata that can be updated: utype, description +\item column metadata that can be updated: utype, ucd, unit, description +\end{itemize} + +Column metadata where update would imply a structural change to the table (e.g. an SQL +alter table statement): +\begin{itemize} +\item column datatype, arraysize, xtype: alter column datatype? +\item input table description has fewer columns: drop column? +\item input table description has more columns: add column? +\item rename table +\item rename column(s) +\end{itemize} +\noindent These are probably too fraught with pain in the details. \todo{Some CADC users have +asked for table and column renaming, which should be easy enough to implement} \subsection{Non-service metadata (non-normative)} @@ -394,29 +451,22 @@ \subsection{Non-service metadata (non-normative)} \section{Registration of VOSI endpoints} \label{sec:endpoints} -The endpoints for the service and availability metadata shall be +The endpoints for the service metadata shall be included in the registration of each service that provides them. \begin{tabular}{l l l l l} \label{tab:registration} Endpoint type & standardID value \\ -availability & \nolinkurl{ivo://ivoa.net/std/VOSI#availability} \\ capabilities & \nolinkurl{ivo://ivoa.net/std/VOSI#capabilities} \\ tables (1.0) & \nolinkurl{ivo://ivoa.net/std/VOSI#tables} \\ -tables (1.1) & \nolinkurl{ivo://ivoa.net/std/VOSI#tables-1.1} \\ +tables (1.1 and 1.2) & \nolinkurl{ivo://ivoa.net/std/VOSI#tables-1.1} \\ \end{tabular} -An availability endpoint shall be represented by an element named -\xmlel{capability}, of type -\xmlel{http://www.ivoa.net/xml/VOResource/v1.0\#Capability} (defined by -the standard VOResource XML schema \citet{2018ivoa.spec.0625P}). The -value of the \xmlel{standardID} attribute of the capability shall be -\nolinkurl{ivo://ivoa.net/std/VOSI#availability}. - A capabilities endpoint should be represented by an element named \xmlel{capability}, of type \xmlel{http://www.ivoa.net/xml/VOResource/v1.0\#Capability}. If such a -capability is provided then the value of the \xmlel{standardID} +capability\todo{Since we require this endpoint, isn't this qualification +a bit silly?} is provided then the value of the \xmlel{standardID} attribute must be \nolinkurl{ivo://ivoa.net/std/VOSI#capabilities}. A tables endpoint should be represented by an element named @@ -426,7 +476,7 @@ \section{Registration of VOSI endpoints} attribute must be \nolinkurl{ivo://ivoa.net/std/VOSI\#tables}, or, for version 1.1, \nolinkurl{ivo://ivoa.net/std/VOSI\#tables-1.1}. -With all three VOSI functions, the \xmlel{capability} element that +With both VOSI functions, the \xmlel{capability} element that describes the function must contain an \xmlel{interface} element of a type semantically appropriate for the binding of the function to the service; the \xmlel{accessURL} element within the \xmlel{interface} @@ -438,9 +488,9 @@ \section{Registration of VOSI endpoints} type to encode VOSI endpoints (see the examples given in section~\ref{sec:examples}). -The capabilities and availability endpoints must not require any -credentials to view. Thus, the \xmlel{interface} registry entries for -capabilities and availability must not contain a securityMethod element. +The capabilities endpoint must not require any +credentials to view\todo{See above}. Thus, the \xmlel{interface} registry entries for +capabilities must not contain a securityMethod element. \section{Example VOSI responses} \label{sec:examples} @@ -515,15 +565,6 @@ \subsection{Example 1: SIA 1.0 capabilities} - - - - - http://adil.ncsa.uiuc.edu/cgi-bin/voimquery/availability - - - - \end{lstlisting} @@ -688,215 +729,17 @@ \subsection{Example 4: Child table resource} \end{lstlisting} -\subsection{Example 5: Availability} - -A sample response from an availability resource. - -\begin{lstlisting}[language=XML] - - true - service is accepting queries - -\end{lstlisting} \appendix - \section{The Complete VOSICapabilities Schema} \label{appendix:capabilities} -\begin{lstlisting}[language=XML] - - - - - A schema for formatting service capabilities as returned by a - capabilities resource, defined by the IVOA Support Interfaces - specification (VOSI). - - See http://www.ivoa.net/Documents/latest/VOSI.html. - - - - - - - - - - - A listing of capabilities supported by a service - - - - - - - - - - A capability supported by the service. - - - A protocol-specific capability is included by specifying a - vr:Capability sub-type via an xsi:type attribute on this - element. - - - - - - - - - - - - -\end{lstlisting} - -\section{The Complete VOSIAvailability Schema} -\label{appendix:availability} -\begin{lstlisting}[language=XML] - - - - - A schema for formatting availability metadata as returned by an - availability resource defined in the IVOA Support Interfaces - specification (VOSI). - - See http://www.ivoa.net/Documents/latest/VOSI.html. - - - - - - - - - - - - - Indicates whether the service is currently available. - - - - - - - - The instant at which the service last became available. - - - - - - - - The instant at which the service is next scheduled to become - unavailable. - - - - - - - - The instant at which the service is scheduled to become available - again after a period of unavailability. - - - - - - - - A textual note concerning availability. - - - - - - - - - -\end{lstlisting} +\lstinputlisting[language=XML]{VOSICapabilities-v1.0.xsd} \section{The Complete VOSITables Schema} \label{appendix:tables} -\begin{lstlisting}[language=XML] - - - < xsd:documentation> - A schema for formatting table metadata as returned by a - tables resource, defined by the IVOA Support Interfaces - specification (VOSI). - - See http://www.ivoa.net/Documents/latest/VOSI.html. - - - - - - - - - - A description of the table metadata supported by the - service associated with a VOSI-enabled resource. - - - - - - - - - A description of a single table supported by the - service associated with a VOSI-enabled resource. - - - - - -\end{lstlisting} +\lstinputlisting[language=XML]{VOSITables-v1.1.xsd} \section{Use Case for Capability Harvesting (non-normative)} \label{appendix:harvesting} @@ -1005,6 +848,13 @@ \section{Use Case for Capability Harvesting (non-normative)} \section{Changes from Previous Versions} \label{appendix:changes} +\subsection{Changes since REC-1.1} + +\begin{itemize} +\item Removed specification for the availability endpoint; added a brief +discussion of the rationale. +\end{itemize} + \subsection{Changes since REC-VOSI-20110531} Added alternate root element (table) to VOSITables schema. diff --git a/VOSI.vor b/VOSI.vor new file mode 100644 index 0000000..f4eb6a4 --- /dev/null +++ b/VOSI.vor @@ -0,0 +1,100 @@ + + + IVOA Support Interfaces + VOSI + ivo://ivoa.net/std/VOSI + doi:10.5479/ADS/bib/2017ivoa.spec.0524G + + IVOA + + + Graham, Matthew + + + Rixon, Guy + + + Dowler, Patrick + + + Major, Brian + + + 2017-05-24 + 1.1 + + IVOA GWS WG + grid@ivoa.net + + + + virtual-observatories + + + This document describes the minimum interface that a web service requires + to participate in the IVOA. Note that this is not required of standard VO + services developed prior to this specification, although uptake is + strongly encouraged on any subsequent revision. All new standard VO + services, however, must feature a VOSI-compliant interface. + + https://ivoa.net/documents/VOSI/ + Other + Research + + + 1.1 + + + http://www.ivoa.net/xml/VOSICapabilities/v1.0 + + + http://www.ivoa.net/xml/VOSIAvailability/v1.0 + This schema is no longer part of the normative content. + It is retained for backward compatiblilty, though. + + + http://www.ivoa.net/xml/VOSITables/v1.0 + + + + availability + Legacy standardID for capabilities describing the + service availability endpoint defined in VOSI 1.0 and VOSI 1.1. + + + + capabilities + standardID for capabilities describing the + endpoint for retrieving VOSI capability metadata about a service. + + + + tables + standardID for capabilities describing + endpoints for retrieving VOSI tables metadata compliant to VOSI + version 1.0. + + + + tables-1.0 + standardID for capabilities describing + endpoints for retrieving VOSI tables metadata compliant to VOSI + version 1.1 and later; over #tables, these react to the details + parameter. + + + diff --git a/ivoatex b/ivoatex index 33e1ef3..4349111 160000 --- a/ivoatex +++ b/ivoatex @@ -1 +1 @@ -Subproject commit 33e1ef3343f50a1ff56061df5ccdc5b59819cbce +Subproject commit 4349111224c732b1ece6e77073e55419199732ac diff --git a/local.bib b/local.bib new file mode 100644 index 0000000..127bacf --- /dev/null +++ b/local.bib @@ -0,0 +1,8 @@ +@MISC{note:caproles, + author={Demleitner, M. and Harrison, P.}, + title={On the Use of Capabilities in the {VO}}, + year=2019, + month=Mar, + howpublished={{IVOA Note, 15 March 2019}}, + url={http://ivoa.net/documents/caproles/} +} diff --git a/openapi/openapi-example.yaml b/openapi-example.yaml similarity index 100% rename from openapi/openapi-example.yaml rename to openapi-example.yaml diff --git a/openapi/vosi-availability.yaml b/openapi/vosi-availability.yaml deleted file mode 100644 index e07345c..0000000 --- a/openapi/vosi-availability.yaml +++ /dev/null @@ -1,36 +0,0 @@ -head: - tag: VOSI - summary: VOSI Availability heartbeat check - description: | - Perform a minimal check that the service is reachable and running. This - check is intended to be very fast and lightweight. - responses: - 200: - description: service is reachable -get: - tag: VOSI - summary: VOSI Availability full check - description: | - Perform a complete check that the service is operational. This normally - includes checking the availability of back end resources (e.g. database, - storage, ...) and that other services that this service depends on (e.g. - AAI services) are reachable (via heartbeat availability check). - responses: - 200: - description: A VOSI availability document in XML. - content: - text/xml: - schema: - $ref: '#/components/schemas/availability' - -components: - schemas: - availability: - content: - text/xml: - schema: - type: object - xml: - name: availability - prefix: vosi - namespace: http://www.ivoa.net/xml/VOSIAvailability/v1.0 diff --git a/openapi/vosi-capabilities.yaml b/openapi/vosi-capabilities.yaml index 8177be5..145da31 100644 --- a/openapi/vosi-capabilities.yaml +++ b/openapi/vosi-capabilities.yaml @@ -1,5 +1,7 @@ head: - tag: VOSI + operationId: probe-capabilities + tags: + - VOSI Capabilities summary: VOSI Capabilities with SSO-next prototype description: | Get standard headers for the service. The standard headers should include @@ -9,30 +11,32 @@ head: for available authentication methods. responses: 200: - description: successful probe, service allows request from caller + $ref: ./vosi-std-responses.yaml#/authenticated 401: $ref: ./vosi-std-responses.yaml#/not-authenticated 403: + $ref: ./vosi-std-responses.yaml#/authenticated $ref: ./vosi-std-responses.yaml#/permission-denied get: - tag: VOSI - summary: VOSI Capabilities + operationId: read-capabilities + tags: + - VOSI + summary: VOSI Capabilities with SSO-next prototype description: Get the set of VOResource capability descriptions for this service. responses: 200: - description: A VOSI Capabilities document in XML. - content: - text/xml: - schema: - $ref: '#/components/schemas/capabilities' + $ref: '#/components/schemas/capabilities' + $ref: ./vosi-std-responses.yaml#/authenticated 401: $ref: ./vosi-std-responses.yaml#/not-authenticated 403: + $ref: ./vosi-std-responses.yaml#/authenticated $ref: ./vosi-std-responses.yaml#/permission-denied components: schemas: capabilities: + description: A VOSI Capabilities document content: text/xml: schema: diff --git a/openapi/vosi-std-responses.yaml b/openapi/vosi-std-responses.yaml index 636568e..853a6b6 100644 --- a/openapi/vosi-std-responses.yaml +++ b/openapi/vosi-std-responses.yaml @@ -1,19 +1,49 @@ # standard +authenticated: + description: a response header indicating that authentication was successful + headers: + x-vo-authenticated: + schema: + type: string + not-authenticated: description: authentication is required and current attempt failed headers: - www-authenticate: - schema: - type: string + www-authenticate: + schema: + type: string + permission-denied: description: caller not authorized to perform operation content: - text/plain: - schema: - type: string + text/plain: + schema: + type: string + +bad-request: + description: invalid request/input + content: + text/plain: + schema: + type: string + not-found: description: resource not found content: - text/plain: - schema: - type: string + text/plain: + schema: + type: string + +not-implemented: + description: this response indicates that the service does not support this operation + content: + text/plain: + schema: + type: string + +too-large: + description: the request content exceeds a server-side limitation on size + content: + text/plain: + schema: + type: string diff --git a/openapi/vosi-table.yaml b/openapi/vosi-table.yaml index fda1c9e..4c5b4c4 100644 --- a/openapi/vosi-table.yaml +++ b/openapi/vosi-table.yaml @@ -1,27 +1,116 @@ get: + operationId: read-table-metadata + tags: + - VOSI table metadata summary: get metadata for the specified table description: provides the table metadata for a single schema or table + parameters: + - in: path + name: name + description: a single schema name or table name as provided in tap_schema + required: true + schema: + type: string + responses: + 200: + $ref: '#/components/schemas/tableDoc' + 401: + $ref: ./vosi-std-responses.yaml#/not-authenticated + 403: + $ref: ./vosi-std-responses.yaml#/permission-denied + 404: + $ref: ./vosi-std-responses.yaml#/not-found +post: + operationId: update-table + tags: + - VOSI table metadata + summary: proto - update table metadata and/or content (optional) + description: update the table metadata from a table description; may include rows to append if input format supports it + parameters: + - in: path + name: name + description: the fully qualified name of the table to create + required: true + schema: + type: string + requestBody: + description: a table description + $ref: '#/components/schemas/tableDoc' + responses: + 204: + description: table updated + 400: + $ref: ./vosi-std-responses.yaml#/bad-request + 401: + $ref: ./vosi-std-responses.yaml#/not-authenticated + 403: + $ref: ./vosi-std-responses.yaml#/permission-denied + 404: + $ref: ./vosi-std-responses.yaml#/not-found + 405: + $ref: ./vosi-std-responses.yaml#/not-implemented + 413: + $ref: ./vosi-std-responses.yaml#/too-large +put: + operationId: create-table + tags: + - VOSI table metadata + summary: proto - create table (optional) + description: create table from a table description; may include rows if input format supports it + parameters: + - in: path + name: name + description: the fully qualified name of the table to create + required: true + schema: + type: string + requestBody: + description: a table description + $ref: '#/components/schemas/tableDoc' + responses: + 201: + description: table created + 400: + $ref: ./vosi-std-responses.yaml#/bad-request + 401: + $ref: ./vosi-std-responses.yaml#/not-authenticated + 403: + $ref: ./vosi-std-responses.yaml#/permission-denied + 404: + $ref: ./vosi-std-responses.yaml#/not-found + 405: + $ref: ./vosi-std-responses.yaml#/not-implemented + 413: + $ref: ./vosi-std-responses.yaml#/too-large +delete: + operationId: delete-table + tags: + - VOSI table metadata + summary: proto - delete table (optional) + description: delete table by name parameters: - name: name in: path - description: a single schema name or table name as provided in tap_schema + description: the table to delete required: true schema: type: string responses: - 200: - description: metadata for the specified table - $ref: '#/components/schemas/tableDoc' + 204: + description: table dropped 401: $ref: ./vosi-std-responses.yaml#/not-authenticated 403: $ref: ./vosi-std-responses.yaml#/permission-denied 404: $ref: ./vosi-std-responses.yaml#/not-found + 405: + $ref: ./vosi-std-responses.yaml#/not-implemented components: schemas: tableDoc: + description: metadata for the specified schema or table content: text/xml: schema: @@ -30,3 +119,10 @@ components: name: table prefix: vosi namespace: http://www.ivoa.net/xml/VOSITables/v1.0 + application/x-votable+xml: + schema: + type: object + xml: + name: VOTABLE + namespace: http://www.ivoa.net/xml/VOTable/v1.3 + diff --git a/openapi/vosi-tableset.yaml b/openapi/vosi-tableset.yaml index 4768a69..4a27765 100644 --- a/openapi/vosi-tableset.yaml +++ b/openapi/vosi-tableset.yaml @@ -1,10 +1,11 @@ get: - tag: VOSI - tag: table metadata - summary: VOSI Tables + operationId: get-tableset + tags: + - VOSI table metadata + summary: VOSI TableSet description: Provides the table metadata in the form of a TableSet description parameters: - - name: DETAIL + - name: detail in: query description: level of detail requested required: false @@ -13,8 +14,9 @@ get: enum: [min, max] responses: 200: - description: metadata for schemas and tables $ref: '#/components/schemas/tablesetDoc' + 400: + $ref: ./vosi-std-responses.yaml#/bad-request 401: $ref: ./vosi-std-responses.yaml#/not-authenticated 403: @@ -23,6 +25,7 @@ get: components: schemas: tablesetDoc: + description: metadata for schemas and tables content: text/xml: schema: