Async job status

Prev Next

API URL

<ips-api-base>/job/status

Sample curl request

  • curl -gsvk -H "<token>" "https://<host>/wsapis/v2.0.0/ips/job/status? uuid=97492efa-5167-470d-944f-6d2a1848967b"

  • curl -gsvk -H "<token>" "https://<host>/wsapis/v2.0.0/ips/job/status? operation=upload_rules"

  • curl -gsvk -H "<token>" "https://<host>/wsapis/v2.0.0/ips/job/status? workState=SUCCESS"

  • curl -gsvk -H "<token>" "https://<host>/wsapis/v2.0.0/ips/job/status"

Authentication

Standard WSAPI authentication

Method

GET - fetch asyn job status

Query parameters (all optional)

uuid: UUID of a job

Operation: one of the following (case insensitive) Valid operations:

SECURITY_CONTENT_UPDATE,

SYNC,

MODIFY_POLICY,

ADD_POLICY,

RULE_UPLOAD,

UPDATE_GEN_CONFIG,

MODIFY_INTERFACES,

DISABLE_POLICIES,

UPLOAD_RULES,

DELETE_CUSTOM_RULES,

APPLY_CUSTOM_RULES,

ADD_POLICY_EXCEPTION,

MODIFY_POLICY_EXCEPTION,

DELETE_POLICY_EXCEPTION

WorkState: one of the following (case insensitive)

Valid operations:

SUCCESS,

FAILED,

RUNNING

Response

HTTP OK(200) with JSON representation of the job statuses.

When IpsPolicyDaemon starts up, the initial work status info is set to default params.
{
"workState":"READY",
"operation":"NONE"
}
Once an operation is running
{
"msg": "Updating data base with new changes and recalcuating hash",
"workState": "RUNNING",
"uuid": "97492efa-5167-470d-944f-6d2a1848967b",
"operation": "UPDATE_GEN_CONFIG"
}
once the operation is complete
{
"msg": "Sync operation succesful",
"workState": "SUCCESS",
"uuid": "19571627-1a58-4196-8d7f-35cd822005c8", #last processed reqUuid
"operation": "SYNC"
}
In case of failure.
{
"upload_rules":{
"msg":"Invalid Rules Found",
"workState":"FAILED",
"details":{
"invalid_rules":[
{
"valid":false,
"ruleText":"alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS msg:\"APP-DETECT Absolute Software Computrace outbound connection - search.namequery.com\"; flow:to_server,established; content:\"Host|3A| search.namequery.com|0D 0A|\"; fast_pattern:only; http_header; content:\"TagId: \"; http_header; metadata:policy max-detect-ips drop, policy security-ips drop, ruleset community, service http; reference:url,absolute.com/support/consumer/technology_computrace; reference:url,attack.mitre.org/techniques/T1014; reference:url,www.blackhat.com/presentations/bh-usa-09/ORTEGA/BHUSA09-Ortega-DeactivateRootkit-PAPER.pdf; classtype:misc-activity; sid:85000000; rev:6;)",
"id":85000000,
"errorMsg":"Optional fields doesn't start with a '('"
}
]
},
"uuid":"e743ceab-9dec-4c11-bd0d-84b428553c02",
"operation":"UPLOAD_RULES"
}

Response mime type

application/json

HTTP response codes

  • 200 - if there are no errors

  • 401 - auth failure

  • 500 - if there are any errors