book
Article ID: 191060
calendar_today
Updated On:
Issue/Introduction
Commands can be issued from distributed server(UNIX, Windows....) to ESP. The command can display current status of jobs, HOLD a job or most commands that can be issued in ESP. There are many programming languages that are able to issue a REST API call. The example below is how to issue a command using Python.
Environment
Release : 11.4 or greater
Component : ESP Workstation Server
Resolution
The ESP Workstation Server needs to have the WEBPORT enabled to received the command. For more information on enabling the WEBPORT see the additional information.
Below is a Python script to issue commands in ESP Workstation Server.
******************************************************************************
import requests
from requests.auth import HTTPBasicAuth
data={
"info":{
"status":"req",
"cont":"eom",
"type":"command"
},
"data":{
"request":"AJ DONJOB.TEST HOLD APPL(TEMPLATE.399"
}
}
x = requests.post(
url = "http://CA11.lvn.broadcom.net:6167/command",
auth=HTTPBasicAuth('POWDO03', 'CAW0rld'),
json=data
)
print(x.text)