Skip to content

Commit

Permalink
Merge pull request #86 from MBala98/stable-v6
Browse files Browse the repository at this point in the history
Add IIAs statistics endpoint
  • Loading branch information
mkurzydlowski authored Sep 6, 2022
2 parents 155ec01 + 04d4d41 commit 84cf84c
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Release notes
This document describes all the changes made to the *Interinstitutional
Agreements API* document, starting from its first beta draft version.

6.2.0
-----

* Add IIAs statistics endpoint.


6.1.0
-----

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Server implementers MUST:

* Implement the [`get` endpoint](endpoints/get.md).
* Implement the [`index` endpoint](endpoints/index.md).
* Implement the [`stats` endpoint](endpoints/stats.md)
* Put the URLs of these endpoints in their [manifest file][discovery-api], as
described in [manifest-entry.xsd](manifest-entry.xsd).

Expand Down
15 changes: 15 additions & 0 deletions endpoints/stats-response-example.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<iias-stats-response
xmlns="https://github.com/erasmus-without-paper/ewp-specs-api-iias/blob/stable-v6/endpoints/stats-response.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
https://github.com/erasmus-without-paper/ewp-specs-api-iias/blob/stable-v6/endpoints/stats-response.xsd
https://raw.githubusercontent.com/erasmus-without-paper/ewp-specs-api-iias/stable-v6/endpoints/stats-response.xsd
"
>

<iia-fetchable>397</iia-fetchable>
<iia-local-unapproved-partner-approved>0</iia-local-unapproved-partner-approved>
<iia-local-approved-partner-unapproved>106</iia-local-approved-partner-unapproved>
<iia-both-approved>204</iia-both-approved>

</iias-stats-response>
62 changes: 62 additions & 0 deletions endpoints/stats-response.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>

<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"

targetNamespace="https://github.com/erasmus-without-paper/ewp-specs-api-iias/blob/stable-v6/endpoints/stats-response.xsd"
xmlns="https://github.com/erasmus-without-paper/ewp-specs-api-iias/blob/stable-v6/endpoints/stats-response.xsd"
>
<xs:annotation>
<xs:documentation>
This schema is a part of the Erasmus Without Paper project. Before you start
using it, make sure you have read the general rules described here:

http://developers.erasmuswithoutpaper.eu/
</xs:documentation>
</xs:annotation>

<xs:element name="iias-stats-response">
<xs:annotation>
<xs:documentation>
This describes the format of the response returned by the `stats` endpoint of
EWP Interinstitutional Agreements API.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="iia-fetchable" type="xs:integer" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Number of IIAs created in the local system which can be fetched by the partner HEI.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="iia-local-unapproved-partner-approved" type="xs:integer" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Number of IIAs created in the local system which have been approved by the partner HEI,
but the matching copies of the partner have not been approved by the local HEI.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="iia-local-approved-partner-unapproved" type="xs:integer" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Number of IIAs created in the local system which have not been approved by the partner HEI,
but the matching copies of the partner have been approved by the local HEI.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="iia-both-approved" type="xs:integer" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Number of IIAs created in the local system which have been approved by the partner HEI
and the matching copies of the partner have been approved by the local HEI.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
42 changes: 42 additions & 0 deletions endpoints/stats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
IIA Stats endpoint
================

* [What is the status of this document?][statuses]
* [See the index of all other EWP Specifications][develhub]


Summary
-------

This endpoint allows the client to get the statistics describing IIAs from a local HEI.

Request method
--------------

* Requests MUST be made with HTTP GET method.


Other requirements
------------------

Refer to [this document][ewp-architecture] for more details about requirements for statistics endpoint.


Error handling
------------------------------

* General [error handling rules][error-handling] apply.

Response
--------

Servers MUST respond with a valid XML document described by the
[stats-response.xsd](stats-response.xsd) schema. See the schema annotations for
further information.


[develhub]: http://developers.erasmuswithoutpaper.eu/
[statuses]: https://github.com/erasmus-without-paper/ewp-specs-management#statuses
[iias-api]: https://github.com/erasmus-without-paper/ewp-specs-api-iias
[error-handling]: https://github.com/erasmus-without-paper/ewp-specs-architecture#error-handling
[ewp-architecture]: https://github.com/erasmus-without-paper/ewp-specs-architecture#ewp-statistics
7 changes: 7 additions & 0 deletions manifest-entry.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="stats-url" type="ewp:HTTPS" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
An URL at which the IIA `stats` endpoint is being served.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
Expand Down

0 comments on commit 84cf84c

Please sign in to comment.