Skip to main content

JSON Description of Services

JSON Description of Services

The Get Services calls return a JSON message with any number of services. If no services match the Get Services request and are accessible to the user, the call returns an empty JSON message. Otherwise, the Get Services call returns a JSON message with one or more services that match the request and are accessible to the user. This section provides an example of a returned JSON message and describes the fields in the message.

The following message could be returned by any Get Services call. The WSDL schema is abbreviated in the listing but appears in full in the JSON message.

[
{
    "Name": "MathServiceSOAP",
    "Domain": "UnitTest",
    "Version": "1.1",
    "Stage": "Live",
    "Protocol": "SOAP",
    "Description": "Add 2 Numbers",
    "Endpoint": "https://jgm6457/enslatest/csp/support/Demo.SOAP.MathService.cls",
    "ResponseStyle": "Sync",
    "LastModified": "2022-03-16 19:07:47.469",
    "Topics": 
    [
        "Test",
        "Maths"
    ],
    "Contacts":
    [
      {
        "Identity": "QD Developer Moon",
        "Type": "Operator",
        "Details": "Details of contact",
        "BusinessPartner": "QD",
        "Notes": "This SOAP service is designed to have minimum moving parts"
      }
    ],
    "Schema":
    {
       "Type": "Notes",
       "Ref": "https://jgm6457/enslatest/csp/support/Demo.SOAP.MathService.cls?wsdl=1",
       "Content": "<definitions targetNamespace='http://tempuri.org'> ...</definitions>",
       "Notes": "Some WSDL"
    },
    "Public": true,
    "Attributes":
    [
       {
          "Name": "One",
          "Value": "1"
        }
    ],
    "Files":
    [
       {
          "Filename": "SOAPMathService.WSDL",
          "FileExtention": ".WSDL",
          "MIMEType": "text/text",
          "CharEncoding": "UTF-8",
          "FileSize": "1.44 KB",
          "Contents": null
       }
    ],
    "Actions":
    [
       {
          "Name": "Sum",
          "Ref": "Sum",
          "Verb": "POST",
          "Description": "Add up 2 numbers",
          "ReadOnly": false,
          "Idempotent": true
       }
    ]
},
{
    "Name": "PublicREST",
    "Domain": "UnitTest",
    "Version": "0.9",
    "Stage": "Live",
    "Protocol": "REST",
    "Description": "REST Call for the Public Registry",
    "Endpoint": "http://mymachine.mynetwork.com:57774/csp/registry/docserver/public",
    "ResponseStyle": "Sync",
    "LastModified": "2022-03-05 16:15:33.38",
    "Topics": 
    [
       "Public",
       "Search",
    ],
    "Public": true,
    "Attributes":
    [
       {
          "Name": "Security",
          "Value": "Username and Password"
       }
    ],
    "Files":
    [
       {
           "Filename": "TestPlan",
           "MIMEType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
           "CharEncoding": "UTF-8",
           "FileSize": "16.95 KB",
            "Contents": null
       }
    ],
    "Actions":
    [
       {
          "Name": "public",
          "Ref": "public",
          "Verb": "GET",
          "Description": "Returns REST endpoint for public registry",
          "RequestSchema": 
          {
              "Type": "Notes",
              "Notes": "This is the REST endpoint to query the public Registry"
          },
          "ResponseSchema":
          {
             "Type": "REST Information
          },
          "ReadOnly": true,
          "Idempotent": true
       }
    ]
}
]

The following lists and describes the fields that can appear in the service description. For all fields, the ESB site may provide guidelines and general practices, that provide information on how the fields are used in its service registry.

Name

Name identifies the service. The other attributes identifying the service are the Domain and Version. The Domain typically identifies the category of the service and Version is a string representing a version number. The combination of Name, Domain, and Version is unique for each service registry entry. For example, two or more services may have the same name as long as the domains are different or the versions are different.

Domain

Domain specifies the category of the service.

Version

Version identifies the version of the service.

Stage

Lifecycle Stage describes the development state of the service. It can have one of the following values: Concept, Development, Test, Staging, Live, Deprecated, and Defunct.

Protocol

Service Protocol describes the protocol used by the client to access the service. It can have any of the following values: File, FTP, HL7, HTTP, REST, SOAP, SQL, X12, and any custom value.

Description

Description provides a brief explanation of the service

Endpoint

Endpoint specifies the location of the service. This is the location you use to call the service.

Response Style

Response Style describes how the service returns a value. It may have one of the following values: Sync, Callback, Remote Deposit, or a blank value.

Last Modified

The date and time that the registry entry was last changed in the ESB registry. you can discover services that were added or updated since a specified date and time by calling Get Services By Modified.

Topics

Topics provide a series of terms that are useful in searching for services using the Get Services By Word call.

Contacts

Contacts specify people or organizations that support or are associated with the service. A contact can contain the following subfields:

  • Identity—Specifies the name or other identity of the person or organization.

  • Type—Specifies whether the contact is the service Author, Consumer, Provider, Operator, Manager, or Sponsor.

  • Details—Specifies details about the contact.

  • Business Partner—A field that is used internally by the service registry but that is not useful to an application using the public API.

  • Notes—Specifies supplementary information about the contact.

Schema

The Schema describes the structure of the service messages. Schema contains subfields that describe or contain the structure definition. Schema can contain the following subfields:

  • Type—Specifies the name of the schema definition mechanism used to describe the schema. It can bee WSDL, XSD, HL7, SEF, X12, AST, EDF, or a custom schema definition mechanism.

  • Ref—Specifies the URL of the schema definition.

  • Content—Provides the full text content of the schema definition.

  • Notes—Provides supplementary information about the schema.

  • Thumbnail—Provides a brief excerpt from the schema.

Public

Always has a true value. Used internally in the service registry.

Attributes

Attributes specify a list of Name-Value pairs that allow an ESB service registry to contain any information about a service.

Files

Files provide a way to include one or more files in a registry entry. For example, a file can contain documentation on the service. Each file in a single registry entry must have a unique filename. When you make a Get Services call, the returned JSON message does not include the file contents. To get the file contents, you make a separate GetFileByID call. Each File element consists of the following subfields:

  • Filename—Provides the name of the file. Typically, this includes the file extension. You cannot have two files in a single registry entry that have the same filename.

  • File Extension—Provides information on the format and purpose of the file. Optional.

  • MIMEType—Provides information on the application used to access the file. Optional.

  • CharEncoding—Provides the character encoding information. Optional.

  • File Size—Provides the file size. Optional.

  • Contents—This field is always null in the JSON service description. You must call the Get File By ID call to get the file contents.

Actions

Actions specify the SOAP actions or the REST HTTP request methods that you can use with the specified URL. SOAP actions provide a summary of the information defined in the WSDL. An action can contain the following subfields:

  • Name—Specifies the name used by the Registry to identify this action.

  • Ref—Specifies a string identifier of the action.

  • Verb—Specifies the HTTP request method. Typically, this is GET, PUT, POST, or DELETE, but it can be any HTTP request method.

  • Description—Specifies a text explanation of the action.

  • Request Schema—Specifies the format of the incoming message body and consists of the following subfields: Type, Ref, Notes, Thumbnail, and Content.

  • Response Schema—Specifies the format of the response message body and consists of the following subfields: Type, Ref, Notes, Thumbnail, and Content.

  • Read Only—If checked, specifies that the call does not make any changes to the state of the server.

  • Idempotent—If checked, specifies that making multiple identical calls have the same impact on the server as making a single call.

FeedbackOpens in a new tab