AnsweredAssumed Answered

API Management REST Descriptor File

Question asked by daniel.schlup601649 on Jul 11, 2018

Hi

 

I am new to API Management and REST APIs. I am providing REST services to a cloud application and got list and single entry calls working such as

  • ../ws/rest/workflow/v1/companyCodes/options     -> returns the list of entries
  • ../ws/rest/workflow/v1/companyCodes/options/1820     -> returns a single company code

 

Nevertheless, there's a third request to implement something like

  • ../ws/rest/workflow/v1/     -> returns the connector descriptor file from the base API path

 

The only information that I've found regarding descriptor files deals with the development of custom connectors, but I am using the standard API Management functionality.

 

The descriptor file as JSON response would look something like this:

 

{
   "key" : "companies",
   "name" : "Companies",
   "description" : "A list of company codes.",
   "typeDescriptors" : [
     {
       "key" : "company",
       "name" : "Company",
       "recordType" : "value",
       "fields" : [
         {
           "key" : "currency",
           "name" : "Currency",
           "type" : {
             "name" : "text"
           }
         }
       ],
       "optionsAvailable" : true,
       "fetchOneAvailable" : true
     }
   ],
   "version" : 1,
   "protocolVersion" : 1
 }

 

What am I missing, and is there a standard function I need to enable so that a descriptor file becomes available via the base API path? Is this something I need to build, and if so would there be examples on how to implement this?

 

Thanks for your feedback,

Daniel

Outcomes