VOSI (VO Support Interface)

vo-models supports the following VOSI v1.0 protocols:

Availability

The Availability model is used to represent the response given by a service to a GET /availability request.

Model
availability = Availability(
    available=True,
    up_since="2023-01-01T00:00:00Z",
    down_at="2023-01-02T00:00:00Z",
    back_at="2023-01-03T00:00:00Z",
    notes=["This service is available for public use."],
)

availability.to_xml()
XML Output
<availability
    xmlns="http://www.ivoa.net/xml/VOSIAvailability/v1.0"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<available>true</available>
<upSince>2023-01-01T00:00:00.000Z</upSince>
<downAt>2023-01-02T00:00:00.000Z</downAt>
<backAt>2023-01-03T00:00:00.000Z</backAt>
</availability>
"""

Tables

VOSITable

For requests for a single table from the GET /tables/{table_name} endpoint, you can use the Table model.

Note

This model is functionally identical to the Table element, specifically namespaced under VOSI.

Model
test_element = VOSITable(
    table_type="table",
    table_name="tap_schema.schemas",
    title=None,
    description="description of schemas in this dataset",
    utype=None,
    nrows=None,
    column=[
        TableParam(
            column_name="schema_name",
            description="Fully qualified schema name",
            unit=None,
            ucd=None,
            datatype=DataType(type_attr="vs:VOTableType", arraysize="*", value="char"),
            flag=["std"],
        ),
        TableParam(
            column_name="description",
            description="Brief description of the schema",
            unit=None,
            ucd=None,
            datatype=DataType(type_attr="vs:VOTableType", arraysize="*", value="char"),
            flag=["std"],
        ),
    ],
    foreign_key=None,
)
XML Output
<vosi:table type='table'>
    <name>tap_schema.schemas</name>
    <description>description of schemas in this dataset</description>
    <column>
        <name>schema_name</name>
        <description>Fully qualified schema name</description>
        <dataType xsi:type='vs:VOTableType' arraysize='*'>char</dataType>
        <flag>std</flag>
    </column>
    <column>
        <name>description</name>
        <description>Brief description of the schema</description>
        <dataType xsi:type='vs:VOTableType' arraysize='*'>char</dataType>
        <flag>std</flag>
    </column>
</vosi:table>

VOSITableSet

For requests to the GET /tables endpoint, you can use the TableSet model to represent table schemas, their child tables, and columns.

Note

This model is functionally identical to the TableSet element, specifically namespaced under VOSI.

Model
test_element = VOSITableSet(
    tableset_schema=[
        TableSchema(
            schema_name="tap_schema",
            title=None,
            description="schema information for TAP services",
            table=[
                Table(
                    table_type="table",
                    table_name="tap_schema.schemas",
                    title=None,
                    description="description of schemas in this dataset",
                    utype=None,
                    nrows=None,
                    column=None,
                    foreign_key=None,
                ),
                Table(
                    table_type="table",
                    table_name="tap_schema.tables",
                    title=None,
                    description="description of tables in this dataset",
                    utype=None,
                    nrows=None,
                    column=None,
                    foreign_key=None,
                ),
            ],
        ),
    ]
)
XML Output
<vosi:tableset>
    <schema>
    <name>tap_schema</name>
    <description>schema information for TAP services</description>
    <table type='table'>
        <name>tap_schema.schemas</name>
        <description>description of schemas in this dataset</description>
    </table>
    <table type='table'>
        <name>tap_schema.tables</name>
        <description>description of tables in this dataset</description>
    </table>
    </schema>
</vosi:tableset>

Capabilities

The VOSICapabilities model is used to represent the response given by a service to a GET /capabilities request. Below is a relatively full example of a VOSI capabilities document for a TAP service.

Model
vosi_capabilities_model = VOSICapabilities(
    capability=[
        TableAccess(
            type="tr:TableAccess",
            interface=[
                ParamHTTP(
                    role="std",
                    version="1.1",
                    access_url=[AccessURL(use="full", value="https://someservice.edu/tap")],
                )
            ],
            language=[
                Language(
                    name="ADQL",
                    version=[Version(value="2.0", ivo_id="ivo://ivoa.net/std/ADQL#v2.0")],
                    description="ADQL-2.0. Positional queries using CONTAINS with POINT and CIRCLE are supported.",
                    language_features=[
                        LanguageFeatureList(
                            type="ivo://ivoa.net/std/TAPRegExt#features-adql-geo",
                            feature=[
                                LanguageFeature(form="POINT"),
                                LanguageFeature(form="CIRCLE"),
                            ],
                        ),
                    ],
                )
            ],
            output_format=[
                OutputFormat(
                    mime="application/x-votable+xml",
                    alias=["votable"],
                    ivo_id="ivo://ivoa.net/std/TAPRegExt#output-votable-td",
                ),
                OutputFormat(
                    mime="text/csv;header=present",
                    alias=["csv"],
                ),
            ],
            output_limit=DataLimits(
                default=DataLimit(unit="row", value=100000),
                hard=DataLimit(unit="row", value=100000),
            ),
        ),
        Capability(
            standard_id="ivo://ivoa.net/std/VOSI#capabilities",
            interface=[
                ParamHTTP(
                    role="std",
                    access_url=[AccessURL(use="full", value="https://someservice.edu/tap/capabilities")],
                )
            ],
        ),
        Capability(
            standard_id="ivo://ivoa.net/std/VOSI#availability",
            interface=[
                ParamHTTP(
                    role="std",
                    access_url=[AccessURL(use="full", value="https://someservice.edu/tap/availability")],
                )
            ],
        ),
        Capability(
            standard_id="ivo://ivoa.net/std/VOSI#tables",
            interface=[
                ParamHTTP(
                    role="std",
                    version="1.1",
                    access_url=[AccessURL(use="full", value="https://someservice.edu/tap/tables")],
                )
            ],
        ),
        Capability(
            standard_id="ivo://ivoa.net/std/DALI#examples",
            interface=[
                WebBrowser(
                    access_url=[AccessURL(use="full", value="https://someservice.edu/tap/examples")],
                )
            ],
        ),
    ]
)
XML Output
        <capability standardID="ivo://ivoa.net/std/TAP" xsi:type="tr:TableAccess">
            <interface role="std" xsi:type="vs:ParamHTTP" version="1.1">
                <accessURL use="full">https://someservice.edu/tap</accessURL>
            </interface>
            <language>
                <name>ADQL</name>
                <version ivo-id="ivo://ivoa.net/std/ADQL#v2.0">2.0</version>
                <description>
                    ADQL-2.0. Positional queries using CONTAINS with POINT and CIRCLE are supported.
                </description>
                <languageFeatures type="ivo://ivoa.net/std/TAPRegExt#features-adql-geo">
                    <feature>
                        <form>POINT</form>
                    </feature>
                    <feature>
                        <form>CIRCLE</form>
                    </feature>
                </languageFeatures>
            </language>
            <outputFormat ivo-id="ivo://ivoa.net/std/TAPRegExt#output-votable-td">
                <mime>application/x-votable+xml</mime>
                <alias>votable</alias>
            </outputFormat>
            <outputFormat>
                <mime>text/csv;header=present</mime>
                <alias>csv</alias>
            </outputFormat>
            <outputLimit>
                <default unit="row">100000</default>
                <hard unit="row">100000</hard>
            </outputLimit>
        </capability>
        <capability standardID="ivo://ivoa.net/std/VOSI#capabilities">
            <interface xsi:type="vs:ParamHTTP" role="std">
                <accessURL use="full">
                    https://someservice.edu/tap/capabilities
    </accessURL>
            </interface>
        </capability>
        <capability standardID="ivo://ivoa.net/std/VOSI#availability">
            <interface xsi:type="vs:ParamHTTP" role="std">
                <accessURL use="full">
                    https://someservice.edu/tap/availability
    </accessURL>
            </interface>
        </capability>
        <capability standardID="ivo://ivoa.net/std/VOSI#tables">
            <interface xsi:type="vs:ParamHTTP" role="std" version="1.1">
                <accessURL use="full">
                    https://someservice.edu/tap/tables
    </accessURL>
            </interface>
        </capability>
        <capability standardID="ivo://ivoa.net/std/DALI#examples">
            <interface xsi:type="vr:WebBrowser">
                <accessURL use="full">
                    https://someservice.edu/tap/examples
    </accessURL>
            </interface>
        </capability>
    </vosi:capabilities>