1 Description

This document contains the description of the RESTful API of the service. The service itself is available at http://services.ceon.pl/coansys/document_similarity.do.

2 Input

The service accepts a query being a text conforming to the JSON schema presented in this section. The query has to be sent using the HTTP POST method.

2.1 Example

{
  "inputObject":{
    "doi":"10.3791/3308"
  }
}

2.2 JSON schema

{
  "type":"object",
  "required":true,
  "properties":{
    "inputObject":{
      "type":"object",
      "required":true,
      "properties":{
        "doi":{
          "type":"string",
          "required":true
        }
      }
    }
  }
}

3 Output

The service returns an answer conforming to the JSON schema presented in this section.

3.1 Example

3.1.1 Result from a successful query

{
  "outputObject":{
    "givenArticleDetails":{
      "doi":"10.3791/3308",
      "year":"2012",
      "title":"ImplantationofaCarotidCuffforTriggeringShear-stressInducedAtherosclerosisinMice",
      "authors":[
        "MichaelT.Kuhlmann",
        "SimonCuhlmann",
        "IrmgardHoppe",
        "RobKrams",
        "PaulC.Evans",
        "GustavJ.Strijkers",
        "KlaasNicolay",
        "SvenHermann",
        "MichaelSchäfers"
      ]
    },
    "similarResults":[
      {
        "sim":"0.9",
        "doi":"10.3791/9",
        "year":"2012",
        "title":"Implantation",
        "authors":[
          "MichaelT.Kuhlmann"
        ]
      },
      {
        "sim":"0.8",
        "doi":"10.3791/8",
        "year":"2012",
        "title":"of",
        "authors":[
          "SimonCuhlmann"
        ]
      },
      {
        "sim":"0.7",
        "doi":"10.3791/7",
        "year":"2012",
        "title":"a",
        "authors":[
          "IrmgardHoppe"
        ]
      },
      {
        "sim":"0.6",
        "doi":"10.3791/6",
        "year":"2012",
        "title":"CarotidCuff",
        "authors":[
          "RobKrams"
        ]
      },
      {
        "sim":"0.5",
        "doi":"10.3791/5",
        "year":"2012",
        "title":"forTriggering",
        "authors":[
          "PaulC.Evans"
        ]
      }
    ]
  }
}

3.1.2 Result from an erroneous query

{
  "error":"LoremIpsumError: LoremIpsum"
}

3.2 JSON schema

{
  "type":"object",
  "required":true,
  "properties":{
    "outputObject":{
      "type":"object",
      "required":true,
      "properties":{
        "givenArticleDetails":{
          "type":"object",
          "required":true,
          "properties":{
            "doi":{
              "type":"string",
              "required":true
            },
            "year":{
              "type":"string",
              "required":true
            },
            "title":{
              "type":"string",
              "required":true
            },
            "authors":{
              "type":"array",
              "required":true,
              "items":{
                "type":"string",
                "required":true
              }
            }
          }
        },
        "similarResults":{
          "type":"array",
          "required":true,
          "document":{
            "type":"object",
            "required":true,
            "properties":{
              "sim":{
                "type":"float",
                "required":true
              },
              "doi":{
                "type":"string",
                "required":true
              },
              "year":{
                "type":"string",
                "required":true
              },
              "title":{
                "type":"string",
                "required":true
              },
              "authors":{
                "type":"array",
                "required":true,
                "items":{
                  "type":"string",
                  "required":true
                }
              }
            }
          }
        }
      }
    }
  }
}