/services/{id}/{mode}                        [ GET ]

/services/{id}/{mode}/{version}


Get a specific version details of a given micro service. Opereto will try to fetch the requested service version. If not found, it will return the default production version. You may use the "actual_version" field to check what version of the service is returned. If the actual version is null, it means that this service does not have any related version. To make it operational, you will have to import or upload a default version.

URL Parameters


Name Optional Valid values
id No Identifier of an existing services (e.g. my_service)
mode No development/production
version No versionNostring: service version. To upload a service to the standard production version please use the version string: "default" as shown bellow. Version must be up to 64 characters long, start with a letter and contain only the following characters: A=Za-z0-9._-


Request Examples      


get default production version

curl -k -u admin:admin https://OPERETOHOST/services/my_service/production


get development (sandbox) version if exists (otherwise, returns default version)

curl -k -u admin:admin https://OPERETOHOST/services/my_service/development

   

get specific production version if exists (otherwise, returns default version)

curl -k -u admin:admin https://OPERETOHOST/services/my_service/production/v1.0

   


       

Response Example     

{
  "status": "success",
  "data": {
    "modified_date": "2016-12-16T16:00:23.289341",
    "description": "### Overview\nThis micro service is a simple template example for new services\n\n### Pre-Conditions\nAssumes that python is installed on the host\nAssumes that pyopereto is installed on the host (pip install pyopereto)\n\n### Additional Reading\nAfter practicing a bit with writing simple services, we recommend reading the developer's manuals at: http://help.opereto.com/support/solutions/folders/9000168944 to learn about large scale development with Opereto.\n",
    "sam": {},
    "action_signature": "eddde3cd67ad038f73f4ffa3327c914b",
    "id": "hello_world",
    "signature": {
      "specification_md5": "6d2e9ac8e6f5b3fe06c23033a3e89a78"
    },
    "item_properties": {
      "my_input_param": {
        "value": "Hello World",
        "direction": "input",
        "mandatory": true,
        "editor": "text",
        "key": "my_input_param",
        "type": "text",
        "example": "",
        "store": null,
        "help": "simple text input parameter"
      },
      "my_output_param": {
        "value": null,
        "direction": "output",
        "mandatory": false,
        "editor": "hidden",
        "key": "my_output_param",
        "type": "text",
        "example": "",
        "store": null,
        "help": "simple text output parameter"
      }
    },
    "actual_version": "default",
    "required_version": "default",
    "type": "action",
    "spec": {
      "item_properties": [
        {
          "direction": "input",
          "mandatory": true,
          "help": "simple text input parameter",
          "key": "my_input_param",
          "type": "text",
          "value": "Hello World"
        },
        {
          "direction": "output",
          "type": "text",
          "key": "my_output_param",
          "value": null,
          "help": "simple text output parameter"
        }
      ],
      "cmd": "python -u run.py",
      "type": "action",
      "timeout": 600
    }
  }
}