<< Back to GIL API Documentation

API documentation: <adapter>/commands/<name>

Invokes the command with the given name.

URL:

api/adapters/{externalsystem|processmodel}/commands/<name>[.format];

Formats:

html, xml, json

HTTP Method(s):

POST

Request examples:

Examples using curl tool which is freely downloadable.

html example:

curl -v -X POST -d "firstname=Sven&surname=Svensson" 
      http://localhost:9980/api/adapters/externalsystem/commands/SayHello
      

xml example:

curl -v -X POST --data-binary "<parameters><parameter><name>firstname</name><value>Sven</value></parameter>
    <parameter><name>surname</name><value>Svensson</value></parameter></parameters>" 
     -H"Content-Type: application/xml" -H"Accept: application/xml" http://localhost:9980/api/adapters/externalsystem/commands/SayHello
    

json example:

curl -v -X POST --data-binary "{\"parameter\":[{\"name\":\"firstname\",\"value\":\"Sven\"},{\"name\":\"surname\",\"value\":\"Svensson\"}]}" 
    -H"Content-Type: application/json" -H"Accept: application/json" http://localhost:9980/api/adapters/externalsystem/commands/SayHello
      

The {adapter} may be either 'externalsystem' or 'processmodel'.

Response examples:

xml example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<commandResult>
    <resultParameters>
        <entry>
            <key>description</key>
            <value>I have said hello to the requested person</value>
        </entry>
        <entry>
            <key>surname</key>
            <value>Svensson</value>
        </entry>
        <entry>
            <key>firstname</key>
            <value>Sven</value>
        </entry>
    </resultParameters>
</commandResult>
    

json example:

{"resultParameters":
    {"entry":[{"key":"description","value":"I have said hello to the requested person"},
              {"key":"surname","value":"Svensson"},{"key":"firstname","value":"Sven"}]}}