Price Control REST Bindings

The HTTP Price Controller service enables the price control REST APIs. Use these APIs to automate pricing file management and loading.

Note: You must start the HTTP Price Controller service before making calls with the REST APIs. For more information about starting the service, see the discussion about starting the HTTP Price Controller REST service.

All input is form-data. Responses are in JSON format.

Price Control REST APIs describes the price control REST APIs.
Table 1. Price Control REST APIs
API Description
GET /data/pricecompilation?<optional parameters> Get a list of the scheduled compilations. Optional parameters are:
  • priority — Default is false. If false, return the price compilation list. If true, return the pending compilations and put position of the queue for each pending compilation.
  • all_domain — Default is false. If false, return the price compilation for the current domain. If true, return the price compilations for all domains.
For example:
  • ?priority=true — Return the pending compilations and put position of the queue for each pending compilation for current domain.
  • ?priority=true&allDomain=true — Return a list of all pending compilations for all domains and put position of the queue for each pending compilation.
  • ?allDomain=true — Return a list of all compilations for all domains.

All returned lists are sorted based on ID in descending order.

GET /data/pricecompilation/{oid} Get a specific price compilation by its object ID.
POST /data/pricecompilation/{type} Request to schedule a new compilation by engine type (production or development).
PUT /data/pricecompilation/{oid} Update a compilation by its object ID. You can pass the following HTTP parameters:
  • Name — The name of the compilation.
  • Description — A description of the compilation.
  • Locked — The lock status (true or false).
DELETE /data/pricecompilation/{oid} Deletes a compilation. A compilation cannot be deleted if it is locked or in the in-process or in-use state. A Domain Administrator user (domainmgr role) can delete any compilation when the compilation is in a deletable state. Users with the user role can only delete their own compilations.
GET /data/pricecompilation/{oid}/download Download the price compilation zip file where {compilationId} is the price compilation object ID.

Returns a zip file with naming format: mtx_pricing_<domain>_<current_timestamp>_<oid>.zip.

GET /data/pricecompilation/{oid}/deployment Retrieve all engine deployment information records for a specific price compilation by {oid}. Returns a list of deployments without the rest of the pricing compilation object.
Sample response:
{
    "_resultCode": 0,
    "_resultText": "OK",
    "DeploymentArray": [
      {"DeploymentId": "1",  "Name": "Engine 1",  
        "EngineId": 123,  "NetworkAddress": 
        "169.1.1.0", "Username": "adam",  
        "DeployTime": "2020-11-02 11:00", 
        "Status": "completed", "InUse": true },
      {"DeploymentId": "2",  "Name": "Engine 2",  
        "EngineId": 456,  "NetworkAddress": 
        "168.1.1.0", "Username": "amm", 
        "DeployTime": "2020-11-01 23:50", 
        "Status": "completed", "InUse": true },
      {"DeploymentId": "3",  "Name": "Engine 1",  
        "EngineId": 123,  "NetworkAddress": 
        "169.1.1.0", "Username": "adam",  
        "DeployTime": "2020-10-01 11:00", 
        "Status": "completed", "InUse": false },
      {"DeploymentId": "4",  "Name": "Engine 2",  
        "EngineId": 123,  "NetworkAddress": 
        "168.1.1.0", "Username": "amm", 
        "DeployTime": "2020-10-01 11:00",
        "Status": "pending", "InUse": false }
      ],
}
GET /data/pricecompilation/{oid}/deployment/{DeploymentId} Get the deployment details for a price compilation for a specific deployment using the {DeploymentId}.
Sample response:
{
    "_resultCode": 0,
    "_resultText": "OK",
    "_resultType": "get",
    "DeploymentId": "1",
    "EngineId": 1,
    "EngineName": "Engine 1",
    "NetworkAddress": "169.1.1.0",
    "Username": "adam",
    "Status": "pending", // the deployment
      status can be "pending", "completed" or "error"
    "DeployTime": "2020-11-02 11:00",
    "HasDetail": true,
    "DetailMessages": ["error1...", "error2..."],
    "InUse": false
}
PUT /data/pricecompilation/{oid}/deployment/{DeploymentId} Update an engine compilation deployment details. You can pass the following HTTP parameters:
  • Name — The name of the deployment.
  • Description — A description of the deployment
  • Status — The deployment status (pending, completed, or error).
  • InUse — Indicates if the deployment is in use (true or false).
  • DetailMessages — A comma-separated list of messages about the deployment.
DELETE /data/pricecompilation/{oid}/deployment/{DeploymentId} Delete one deployment object by resource ID for a price compilation by object ID.
GET /data/engineconnection Returns a list of engine connections for the current domain only.
Sample response:
{
    EngineConnectionArray: [
    {  
      "ObjectId": 1,
      "Name": "domain_1_2020_10_20_11_15",
      "NetworkAddress": "127.1.1.0:80",
      "Description": "description",
      "EngineType": "development" // Can be 
        "production" or "development"
    },
    ...
    ]
}
GET /data/engineConnection/{oid} Returns information about the specified engine.
Sample response:
{
    "ObjectId":: 48,
    "Name": "domain_1_2020_10_20_11_15",
    "NetworkAddress": "128.1.1.1",
    "Description": "description",       
    "EngineType": "production", // Can be "production" 
      or "development"
 
    DeploymentArray: [
    {
      "DeploymentId": 1, // deployId
      "PricingCompilationId": "11",
      "PricingCompilationName": 
        "domain1_1_11-20-2020",
      "CompilationCompletedTime": 
        "2020-11-10 11:10am",
      "DeployTime": "2020-11-10 12:10am",
      "DeployUser": "ed",
      "HasDetail": true, // If hasDetail 
        is true, UI will show View Detail link
      "InUse": false,
      "Status": //deployment status: "pending",
        "in progress","completed","error"
    }, ...
    ],
    "_resultCode": 0,
    "_resultText": "OK",
    "_resultType": "get",
}
POST /data/engineconnection Create a connection to the specified engine in the current domain. You can pass the following HTTP parameters:
  • Name — The name of the engine connection.
  • NetworkAddress — The network IP address and port (ipaddress:port).
  • Description — A description of the connection.
  • EngineType — For example production or development.

For example: 'Name=myConnection&NetworkAddress=http%3A%2F%2F10.10.126.87%3A4044&EngineType=development'

PUT /data/engineconnection/{oid} This service updates the information about an engine connection. All parameters are optional. You can pass the following HTTP parameters:
  • Name — The name of the engine connection.
  • NetworkAddress — The network IP address and port (ipaddress:port).
  • Description — A description of the connection.
  • Status — The deployment status (pending, completed, or error).
  • EngineType — For example production or development.
GET /data/engineconnection/{oid}/status Check the engine status by engine object ID.