Skip to main content
Skip table of contents

PRI adaptor WADL and XSL files and schemas

Files

This zip file includes all the relevant files: pri spec.zip

CapturedAsset schema

PackedAsset schema

CapturedAssetService WADL

CODE
<application xmlns="http://wadl.dev.java.net/2009/02" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:pri-servicens="http://ml.nagra.com/pri/services/web/rest/api/" 
    xmlns:pri-typens="http://ml.nagra.com/pri/model/to/capturedassets/" 
    xmlns:pri-ex-typens="http://ml.nagra.com/pri/model/to/priexception/">

    <grammars>
        <include href="../xsd/CapturedAssets.xsd" />
        <include href="../xsd/PRIException.xsd" />
    </grammars>

    <resources base="http://localhost:8991/cxf/pri/v1">
        <resource path="/capturedassets" id="CapturedAssetService">
            <method name="POST" id="createCapturedAssets">
                <request>
                    <representation mediaType="application/xml" element="pri-typens:capturedasset" />
                    <representation mediaType="application/json" element="pri-typens:capturedasset" />
                </request>
                <response status="201" description="Asset Created">
                    <representation mediaType="application/xml" element="pri-typens:capturedasset" />
                    <representation mediaType="application/json" element="pri-typens:capturedasset" />
                </response>
                <response status="400" description="Bad Request">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
                <response status="500" description="PRI Adapter Internal Error">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
                <response status="501" description="Method Not Implemented">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
                <response status="504" description="Encoder Timeout">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
            </method>

            <!-- All Methods with query_string -->
            <method name="GET" id="getCapturedAssetsByQuery">
                <request>
                    <param name="limit" type="xsd:int" style="query" required="false" />
                    <param name="sourceId" type="xsd:string" style="query" required="false" />
                    <param name="assetRelativePath" type="xsd:string" style="query" required="false" />
                    <param name="status" type="xsd:string" style="query" required="false" />
                    <param name="captureStartDate" type="xsd:string" style="query" required="false" />
                    <param name="captureEndDate" type="xsd:string" style="query" required="false" />
                </request>
                <response status="200" description="Asset Validation Okay">
                    <representation mediaType="application/xml" element="pri-typens:capturedassets" />
                    <representation mediaType="application/json" element="pri-typens:capturedassets" />
                </response>
                <response status="400" description="Bad Request">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
                <response status="500" description="PRI Adapter Internal Error">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
                <response status="501" description="Method Not Implemented">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
                <response status="504" description="Encoder Timeout">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
            </method>
            <resource path="/{id}">
                <param name="id" type="xsd:string" style="template" required="true" />
                <method name="GET" id="getCapturedAssetById">
                    <request>
                        <param name="sourceId" type="xsd:string" style="query" required="false" />
                        <param name="assetRelativePath" type="xsd:string" style="query" required="false" />
                    </request>
                    <response status="200" description="Asset Validation Okay">
                        <representation mediaType="application/xml" element="pri-typens:capturedasset" />
                        <representation mediaType="application/json" element="pri-typens:capturedasset" />
                    </response>
                    <response status="500" description="PRI Adapter Internal Error">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="501" description="Method Not Implemented">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="504" description="Encoder Timeout">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                </method>
                <method name="PUT" id="updateCapturedAssetById">
                    <request>
                        <representation mediaType="application/xml" element="pri-typens:capturedasset" />
                        <representation mediaType="application/json" element="pri-typens:capturedasset" />
                    </request>
                    <response status="200" description="Asset Update Okay">
                        <representation mediaType="application/xml" element="pri-typens:capturedasset" />
                        <representation mediaType="application/json" element="pri-typens:capturedasset" />
                    </response>
                    <response status="404" description="Asset Not Found">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="500" description="PRI Adapter Internal Error">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="501" description="Method Not Implemented">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="504" description="Encoder Timeout">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                </method>
                <method name="DELETE" id="deleteCapturedAssetById">
                    <request>
                        <param name="sourceId" type="xsd:string" style="query" required="false" />
                        <param name="assetRelativePath" type="xsd:string" style="query" required="false" />
                    </request>
                    <response status="200" description="Asset Delete Okay">
                        <representation mediaType="application/xml" element="pri-typens:capturedasset" />
                        <representation mediaType="application/json" element="pri-typens:capturedasset" />
                    </response>
                    <response status="500" description="PRI Adapter Internal Error">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="501" description="Method Not Implemented">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="504" description="Encoder Timeout">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                </method>
            </resource>
        </resource>
        <resource path="/packagedassets" id="PackagedAssetService">
            <method name="POST" id="createPackagedAssets">
                <request>
                    <representation mediaType="application/xml" element="pri-typens:packagedasset" />
                    <representation mediaType="application/json" element="pri-typens:packagedasset" />
                </request>
                <response status="201" description="Asset Created">
                    <representation mediaType="application/xml" element="pri-typens:packagedasset" />
                    <representation mediaType="application/json" element="pri-typens:packagedasset" />
                </response>
                <response status="400" description="Bad Request">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
                <response status="500" description="PRI Adapter Internal Error">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
                <response status="501" description="Method Not Implemented">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
                <response status="504" description="Encoder Timeout">
                    <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                    <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                </response>
            </method>
            <resource path="/{id}">
                <param name="id" type="xsd:string" style="template" required="true" />
                <method name="GET" id="getPackagedAssetById">
                    <request>
                        <param name="sourceId" type="xsd:string" style="query" required="false" />
                        <param name="assetRelativePath" type="xsd:string" style="query" required="false" />
                    </request>
                    <response status="200" description="Asset Validation Okay">
                        <representation mediaType="application/xml" element="pri-typens:packagedasset" />
                        <representation mediaType="application/json" element="pri-typens:packagedasset" />
                    </response>
                    <response status="500" description="PRI Adapter Internal Error">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="501" description="Method Not Implemented">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="504" description="Encoder Timeout">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                </method>
                <method name="PUT" id="updateCapturedAssetById">
                    <request>
                        <representation mediaType="application/xml" element="pri-typens:capturedasset" />
                        <representation mediaType="application/json" element="pri-typens:capturedasset" />
                    </request>
                    <response status="200" description="Asset Update Okay">
                        <representation mediaType="application/xml" element="pri-typens:capturedasset" />
                        <representation mediaType="application/json" element="pri-typens:capturedasset" />
                    </response>
                    <response status="404" description="Asset Not Found">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="500" description="PRI Adapter Internal Error">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="501" description="Method Not Implemented">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                    <response status="504" description="Encoder Timeout">
                        <representation mediaType="application/xml" element="pri-ex-typens:priexception" />
                        <representation mediaType="application/json" element="pri-ex-typens:priexception" />
                    </response>
                </method>
            </resource>
        </resource>
    </resources>
</application>

CapturedAssets XSD

CODE
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    targetNamespace="http://ml.nagra.com/pri/model/to/capturedassets/" 
    xmlns:pritypens="http://ml.nagra.com/pri/model/to/capturedassets/" 
    xmlns:pri-kv-typens="http://ml.nagra.com/pri/model/to/keyvalueproperties/" 
    elementFormDefault="qualified" attributeFormDefault="unqualified">

    <!-- ComplexType Declaration -->
    <xsd:import id="keyvalue" schemaLocation="KeyValueProperties.xsd" namespace="http://ml.nagra.com/pri/model/to/keyvalueproperties/" />

    <xsd:complexType name="CapturedAssetTOType">
        <xsd:sequence>
            <xsd:element name="id" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1">
                <xsd:annotation>
                    <xsd:documentation>Public unique identifier of the captured asset. This field shall be given by the client and cannot be changed afterwards (write-on-create).</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="name" type="xsd:string" nillable="false" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The friendly name of the CapturedAsset, for display purposes.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="sourceId" type="xsd:string" nillable="false" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Identifier of the source stream where to capture the asset.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="captureStartDate" type="xsd:dateTime" nillable="false" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The startDate of the CapturedAsset. Padding not included.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="captureEndDate" type="xsd:dateTime" nillable="false" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The endDate of the CapturedAsset. Padding not included.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="priority" type="xsd:integer" nillable="false" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The priority of the CapturedAsset. 1 highest to 5 lowest</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="status" type="pritypens:StatusTOType" nillable="false" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The status of the CapturedAsset. The status is set by the recorder and cannot be set by a client request.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="providerId" type="xsd:string" nillable="false" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Identifier of the capture requester.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="deliveryURL" type="xsd:string" nillable="false" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The delivery URL of the CapturedAsset. The URL is set by the recorder and cannot be changed by a client request.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="metadata" type="pri-kv-typens:KeyValuePropertyTOType" minOccurs="0" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation>The metadata of the CapturedAsset</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="created" type="xsd:dateTime" nillable="false" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The date the CapturedAsset was created. This date is set at creation time and cannot be changed afterwards (write-on-create)</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="modified" type="xsd:dateTime" nillable="false" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>The date the CapturedAsset was last modified. This date is set internally and cannot be set by a client</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="drm" type="pritypens:DrmTOType" minOccurs="0" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation>Provides the DRM ID to be used to secure the playable packaged asset for the specified packaging formats. An entry without any "pakagingFormat" value will be used for all formatsfor which no specific entry is provided.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="StatusTOType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="Scheduled" />
            <xsd:enumeration value="InProgress" />
            <xsd:enumeration value="Completed" />
            <xsd:enumeration value="Failed" />
            <xsd:enumeration value="Cancelled" />
            <xsd:enumeration value="Expired" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="DrmTOType">
        <xsd:sequence>
            <xsd:element name="drmId" type="xsd:string" nillable="false" />
            <xsd:element name="packagingFormat" type="xsd:string" nillable="true">
                <xsd:annotation>
                    <xsd:documentation>Key word that identifies the packaging format for which the specified DRM ID applies.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="CapturedAssetsTOType">
        <xsd:sequence>
            <xsd:element name="total_records" type="xsd:long" nillable="false" />
            <xsd:element name="capturedassets" type="pritypens:CapturedAssetTOType" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
    </xsd:complexType>

    <!-- Element Declaration -->
    <xsd:element name="capturedasset" type="pritypens:CapturedAssetTOType" />
    <xsd:element name="capturedassets" type="pritypens:CapturedAssetsTOType" />

</xsd:schema>

KeyValueProperties XSD

CODE
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:pri-kv-typens="http://ml.nagra.com/pri/model/to/keyvalueproperties/" 
    targetNamespace="http://ml.nagra.com/pri/model/to/keyvalueproperties/" 
    elementFormDefault="qualified" 
    attributeFormDefault="unqualified">

    <!-- KeyValueProperty Type -->
    <xsd:complexType name="KeyValuePropertyTOType">
        <xsd:sequence>
            <xsd:element name="key" type="xsd:string" nillable="false" />
            <xsd:element name="value" type="xsd:string" nillable="true" />
        </xsd:sequence>
    </xsd:complexType>

    <!-- KeyValueProperty Element -->
    <xsd:element name="KeyValueProperty" type="pri-kv-typens:KeyValuePropertyTOType" />

    <!-- KeyValueProperties Type -->
    <xsd:complexType name="KeyValuePropertiesTOType">
        <xsd:sequence>
            <xsd:element name="properties" type="pri-kv-typens:KeyValuePropertyTOType" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
    </xsd:complexType>

    <!-- KeyValueProperties Element -->
    <xsd:element name="KeyValueProperties" type="pri-kv-typens:KeyValuePropertiesTOType" />
</xsd:schema>

PRIException XSD

CODE
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    targetNamespace="http://ml.nagra.com/pri/model/to/priexception/" 
    xmlns:pri-ex-typens="http://ml.nagra.com/pri/model/to/priexception/" 
    elementFormDefault="qualified" 
    attributeFormDefault="unqualified">

    <xsd:complexType name="PRIExceptionTOType">
        <xsd:sequence>
            <xsd:element name="statusCode" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1">
                <xsd:annotation>
                    <xsd:documentation>A status code to identify uniquely the error. the error code is prefixed by two prefixes:
                        - INT for internal error, i.e. Error of PRI-ADAPTER
                        - EXT for error that happened in the adaptee.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="statusMessage" type="xsd:string" nillable="false">
                <xsd:annotation>
                    <xsd:documentation>it reports the details of the error.</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="priexception" type="pri-ex-typens:PRIExceptionTOType" />
</xsd:schema>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.