Skip to content

Building a service provider

Ruben de Laat edited this page Nov 3, 2017 · 12 revisions

Start with: https://github.com/opensourceBIM/BIM-Bot-services/wiki

HTTP

A service provider should be able to accept HTTP requests.

List of services

Your server should be able to generate a list of services that can be provider. You can make up your own URL pattern for this. This is the URL you want to publish when releasing your services. You can for example have this URL added to https://github.com/opensourceBIM/BIMserver-Repository/blob/master/serviceproviders.json. This way anyone using BIMserver will automatically also see your services.

The default URL for this is [server address]/servicelist. The structure of the JSON returned is like this:

{  
   "services":[  
      {  
         "id":4718646,
         "name":"Simple Analyses Service",
         "description":"BIMserver plugin that provides an analysis of a model and and outputs it into json",
         "provider":"Experimental BIMserver",
         "providerIcon":"/img/bimserver.png",
         "inputs":[  
            "IFC_STEP_2X3TC1"
         ],
         "outputs":[  
            "UNSTRUCTURED_UTF8_TEXT_1_0"
         ],
         "oauth":{  
            "authorizationUrl":"https://thisisanexperimentalserver.com/oauth/authorize",
            "registerUrl":"https://thisisanexperimentalserver.com/oauth/register",
            "tokenUrl":"https://thisisanexperimentalserver.com/oauth/access"
         },
         "resourceUrl":"https://thisisanexperimentalserver.com/services"
      }
  ]
}

The inputs array describes the input types this service is able to handle. The outputs array describes which output formats it is able output. The registerUrl, authorizationUrl, tokenUrl and resourceUrl are used for OAuth (described later in this document). A list of input/output types can be found here https://github.com/opensourceBIM/BIMserver/wiki/New-remote-service-interface#schemas

Clone this wiki locally