Using the HTTP API

HTTP GET Request

You can pass the URL of the ontology and the API Keywith "apikey", "sourceUrl" and "targetUrl" parameters. If you are logged in, you don't need to use the apikey.

Using your browser

http://yamplusplus.lirmm.fr/api/matcher?sourceUrl=https://raw.githubusercontent.com/DOREMUS-ANR/knowledge-base/master/vocabularies/mop-iaml.ttl&targetUrl=https://raw.githubusercontent.com/DOREMUS-ANR/knowledge-base/master/vocabularies/mop-diabolo.ttl&apikey=YOUR_APIKEY


Using cURL command

curl -X GET http://yamplusplus.lirmm.fr/api/matcher?sourceUrl=https://raw.githubusercontent.com/DOREMUS-ANR/knowledge-base/master/vocabularies/mop-iaml.ttl&targetUrl=https://raw.githubusercontent.com/DOREMUS-ANR/knowledge-base/master/vocabularies/mop-diabolo.ttl&apikey=YOUR_APIKEY
curl -X GET http://yamplusplus.lirmm.fr/api/matcher?sourceUrl=https://raw.githubusercontent.com/DOREMUS-ANR/knowledge-base/master/vocabularies/mop-iaml.ttl&targetUrl=https://raw.githubusercontent.com/DOREMUS-ANR/knowledge-base/master/vocabularies/mop-diabolo.ttl&apikey=YOUR_APIKEY
    

Using Java

CloseableHttpClient client = HttpClientBuilder.create().build();
  HttpResponse httpResponse = null;
  try{
    URI uri = new URI("http://yamplusplus.lirmm.fr/aboutus");
    // Execute HTTP request
    httpResponse = client.execute(new HttpGet(uri));
  } catch (URISyntaxException e) {
  } catch(IOException e){}

  String responseLine;
  String responseString = null;
  BufferedReader reader = null;
  try{
    // Read HTTP GET response
    reader = new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent(), Charset.forName("UTF-8")));
  } catch (IOException e){}
  
  while ((responseLine = reader.readLine()) != null) {
    responseString += responseLine;
  }
  reader.close();

HTTP POST Request

Using cURL command

You can pass ontology files either by uploading file with "sourceFile" and "targetFile".
Or you can pass the URL of the ontology with "sourceUrl" and "targetUrl"

curl -X POST -H \"Content-Type: multipart/form-data\ 
  -F sourceFile=@/path/to/source_ontology_file.owl 
  http://yamplusplus.lirmm.fr/api/matcher?targetUrl=https://raw.githubusercontent.com/DOREMUS-ANR/knowledge-base/master/vocabularies/mop-diabolo.ttl&apikey=YOUR_APIKEY'
curl -X POST -H "Content-Type: multipart/form-data" 
  -F sourceFile=@/path/to/source_ont.owl 
  -F targetFile=@/path/to/target_ont.owl 
  -d 'apikey=YOUR_APIKEY'
  http://yamplusplus.lirmm.fr/api/matcher
curl -X POST http://yamplusplus.lirmm.fr/api/matcher 
  -d 'sourceUrl=https://raw.githubusercontent.com/DOREMUS-ANR/knowledge-base/master/vocabularies/mop-iaml.ttl&targetUrl=https://raw.githubusercontent.com/DOREMUS-ANR/knowledge-base/master/vocabularies/mop-diabolo.ttl&apikey=YOUR_APIKEY'