SubmissionAPI

Submission Management System Playbook

Abstract

This document provides needed information that enables the integration with RESTful API and resources provided by Interhyp AG.<p> The RESTful API provides access to resources associated to submission process via URI paths, a client application will make an HTTP request using standard HTTP methods like GET, PUT, PATCH, POST and DELETE and parse the response in JSON format.<p>

API Audience

The API is intended to be consumed by clients who want to integrate Interhyp submission process in their own workflow.

API Design Principles

During API design a set of principles were taken into consideration.

API First

API First is a cornerstone in our design principles, which requires two aspects:

By defining API outside of the code, gives un the following advantages:

Mobile First

As Interhyp promotes to Mobile First products, this affects not only the User Interface but API must also reflect this fact during design and implementation phases.

Several techniques are used in conjunction to Mobile First (but not limited to)

Security

Authentication

In order to grant access to the API resources, every client has to declare his identity using a JWT based Token.

OAuth 2.0 is used to secure all the API endpoints, See Authentication Concept for more details.

Authorization and Permissions

Access to the API resources is restricted to the target client, where a client may access only the resources that belong to him. Resources belonging to a specific client are by no mean accessible by any other client with different identity.

API Authentication and Authorization

Pagination, Expansion, and Deferred Processing

Promoting Mobile First design principle requires employing a set of concepts as described below

Pagination

This API uses Cursor-based pagination to improve performance and minimize networks traffic, Pagination is enforced for operations that potentially could return a large collection of items. When a client makes a request to a paginated resource, the response wraps the returned array of values in a JSON object with paging metadata. For example:

{
  "data": [
    "_comment: here goes the actual resource collection ..."
  ],
  "paging": {
    "cursor": {
      "before": "string",
      "after": "string"
    },
    "previous": "string",
    "next": "string",
    "first": "string",
    "last": "string",
    "self": "string"
  }
}

A cursor refers to a random string of characters which marks a specific item in a collection of data. <p> The cursor will always point to the item, however it will be invalidated if the item is deleted or removed.

Therefore, as a client you shouldn’t store cursors or assume that they will be valid in the future.

A cursor-paginated resource supports the following parameters:

Expansion

This API uses resource expansion, which means that some parts of a resource are not returned unless specified in the request. This is useful for endpoints that return large resources in order to minimizes network traffic.<p> The expansion is controlled in two ways:

Query Parameter

embed query parameter controllers which information the endpoint will deliver.

By default: embed query parameter is set to False, which means only basic information and a link for details and sub-resources will be returned.

Setting embed query parameter to True guide the API to deliver all details and sub-resources associated to the requested resource.

Tip: Doing so will have a direct impact on the payload size and might affect response time as well.

We encourage following the provided links to access each specific resource, instead of providing all sub-resources for the returned collection.<p> **

<summary>Sample Response</summary>**

{
  "data": [
    {
      "resource": {
        "href": "http://some-domain/some/link/to/somewhere",
        "embedded": {
          "resource": [
            {
              "detailed-attribute-1": "string",
              "detailed-attribute-2": "string",
              "detailed-attribute-3": "2019-11-29T18:24:49.777Z",
              "detailed-attribute-n": "string"
            }
          ]
        }
      }
    }
  ]
}

</details>

Prefer Header anticipates certain behaviors to be employed by a server while processing a request of clients.<p> Currently following values are supported:

Note This header is considered only when query parameter embed is set to True

Deferred Processing

Some API endpoints may trigger long-running or computationally expensive tasks. In these cases, the endpoint will schedule an asynchronous task in order not to block the client for the whole processing time and return an appropriate HTTP Status Code indicates the asynchronous processing.<p>

Tip: More details will be provided in the respective endpoint.

Headers

Request Headers
Response Headers

Postman

The different parts of the Submission API can be tested using the Postman collections in the according subfolders. For further information, please refer to the documentation there.