call automic respapi via node
npm install automic-restshell
npm install automic-rest
`
Usage
`javascript
const automicrest = require('automic-rest');
(async () => {
const ar = await automicrest.connect({
basicauth: "eGSSdhZHlYYSSDDvdTpxYXl12SS3c3gyMQ==",
url: "https://example.com",
noproxy: true,
sslverify: false
});
let resp = await ar.listExecutions(client_id=1, query="max_results=100")
for(a in resp.data){
console.log(resp.data[a].name)
}
})()
``
[
{
"in": "body",
"name": "body",
"required": true
}
]
CODE
""
CODE
[
{
"in": "body",
"name": "body",
"required": true
}
]
CODE
[
{
"in": "body",
"name": "body",
"required": true
}
]
CODE
[
{
"description": "Maximum number of executions for a page result set. If this parameter is omitted the default value 50 is applied.",
"format": "int32",
"in": "query",
"minimum": 1,
"name": "max_results",
"required": false,
"type": "integer",
"x-example": 50
},
{
"description": "Requested page starts with execution with RunID > this parameter. If this parameter is omitted (no offset) the very first page is returned.",
"format": "int32",
"in": "query",
"name": "start_at_run_id",
"required": false,
"type": "integer",
"x-example": 1000030
}
]
CODE
[
{
"collectionFormat": "multi",
"description": "Parameter to include various additional information about an execution.
comments - Includes a list of all comments that have been added to the execution
variables - Includes a list of all object variables defined at the execution's scope
reports - Includes a list of all report types of the execution
restarts - Includes the number of restarts
predecessors - Includes a list of the predecessors of a workflow task
recurring - Includes details of a C_PERIOD task",
"in": "query",
"items": {
"enum": [
"comments",
"variables",
"reports",
"restarts",
"predecessors",
"recurring"
],
"type": "string"
},
"name": "fields",
"required": false,
"type": "array"
}
]
CODE
""
CODE
[
{
"description": "Maximum number of executions for a page result set. If this parameter is omitted the default value 50 is applied.",
"format": "int32",
"in": "query",
"minimum": 1,
"name": "max_results",
"required": false,
"type": "integer",
"x-example": 50
},
{
"description": "Requested page starts with execution with RunID > this parameter. If this parameter is omitted (no offset) the very first page is returned.",
"format": "int32",
"in": "query",
"name": "start_at_run_id",
"required": false,
"type": "integer",
"x-example": 1000030
},
{
"description": "RunID of the execution.",
"format": "int32",
"in": "query",
"name": "run_id",
"required": false,
"type": "integer",
"x-example": 1000030
},
{
"description": "Object name to query. Supports wildcards (*).",
"in": "query",
"name": "name",
"required": false,
"type": "string",
"x-example": "SCRI.NEW.1"
},
{
"description": "Exclude object name.",
"in": "query",
"name": "name_exclude",
"required": false,
"type": "boolean",
"x-example": true
},
{
"description": "Object alias to query. Supports wildcards (*).",
"in": "query",
"name": "alias",
"required": false,
"type": "string",
"x-example": "SCRI.ALIAS.1"
},
{
"collectionFormat": "multi",
"description": "Object types to query. Supports multiple, comma-separated values. If omitted, all executable object types are used as default value.",
"in": "query",
"items": {
"type": "string"
},
"name": "type",
"required": false,
"type": "array",
"x-example": "SCRI"
},
{
"collectionFormat": "multi",
"description": "Status to query. Supports multiple, comma-separated values.",
"in": "query",
"items": {
"type": "string"
},
"name": "status",
"required": false,
"type": "array",
"x-example": "1800"
},
{
"description": "Agent name to query. Supports wildcards (*).",
"in": "query",
"name": "agent",
"required": false,
"type": "string",
"x-example": "WIN01"
},
{
"description": "Exclude agent name.",
"in": "query",
"name": "agent_exclude",
"required": false,
"type": "boolean",
"x-example": "False"
},
{
"collectionFormat": "multi",
"description": "Agent types to query. Supports multiple, comma-separated values.",
"in": "query",
"items": {
"type": "string"
},
"name": "platform",
"required": false,
"type": "array",
"x-example": "WINDOWS"
},
{
"collectionFormat": "multi",
"description": "Queues to query. Supports multiple, comma-separated values.",
"in": "query",
"items": {
"type": "string"
},
"name": "queue",
"required": false,
"type": "array",
"x-example": "CLIENT_QUEUE"
},
{
"description": "Include deactivated executions into query.",
"in": "query",
"name": "include_deactivated",
"required": false,
"type": "boolean",
"x-example": "False"
},
{
"description": "Timeframe option to be used for the query. If omitted, the default value of 'all' is applied.",
"enum": [
"activation",
"start",
"end",
"all"
],
"in": "query",
"name": "time_frame_option",
"required": false,
"type": "string"
},
{
"description": "Timeframe lower bound to be used for the query.",
"in": "query",
"name": "time_frame_from",
"pattern": "^\\d{4}\\-(0[1-9]|1[012])\\-(0[1-9]|[12][0-9]|3[01])T:(?:[012345]\\d):(?:[012345]\\d)[Z]$",
"required": false,
"type": "string",
"x-example": "2015-04-15T06:37:59Z"
},
{
"description": "Timeframe upper bound to be used for the query.",
"in": "query",
"name": "time_frame_to",
"pattern": "^\\d{4}\\-(0[1-9]|1[012])\\-(0[1-9]|[12][0-9]|3[01])T:(?:[012345]\\d):(?:[012345]\\d)[Z]$",
"required": false,
"type": "string",
"x-example": "2015-04-15T06:37:59Z"
},
{
"description": "Username to query. Supports wildcards (*).",
"in": "query",
"name": "user",
"required": false,
"type": "string",
"x-example": "TEST/DEP"
},
{
"description": "Exclude username.",
"in": "query",
"name": "user_exclude",
"required": false,
"type": "boolean",
"x-example": "False"
},
{
"description": "Archive key1 to query. Supports wildcards (*).",
"in": "query",
"name": "archive_key1",
"required": false,
"type": "string",
"x-example": "key1"
},
{
"description": "Exclude archive key1.",
"in": "query",
"name": "archive_key1_exclude",
"required": false,
"type": "boolean",
"x-example": "False"
},
{
"description": "Archive key2 to query. Supports wildcards (*).",
"in": "query",
"name": "archive_key2",
"required": false,
"type": "string",
"x-example": "key2"
},
{
"description": "Exclude archive key2.",
"in": "query",
"name": "archive_key2_exclude",
"required": false,
"type": "boolean",
"x-example": "False"
},
{
"description": "Query only commented tasks.",
"in": "query",
"name": "commented_only",
"required": false,
"type": "boolean",
"x-example": "False"
},
{
"description": "Query only modified workflows.",
"in": "query",
"name": "modified_only",
"required": false,
"type": "boolean",
"x-example": "False"
},
{
"description": "Remote status text to query.",
"format": "int32",
"in": "query",
"name": "remote_status_number",
"required": false,
"type": "integer",
"x-example": 1200
},
{
"description": "Remote status number to query.",
"in": "query",
"name": "remote_status_text",
"required": false,
"type": "string",
"x-example": "Executed"
},
{
"description": "RunID of the original execution, zero if this was not a restart.",
"format": "int32",
"in": "query",
"name": "reference_run_id",
"required": false,
"type": "integer",
"x-example": 1000031
},
{
"description": "Query ZDU Version.",
"enum": [
"B",
"T"
],
"in": "query",
"name": "zdu_version",
"pattern": "([BT])",
"required": false,
"type": "string"
},
{
"collectionFormat": "multi",
"description": "Sync objects to query. Supports multiple, comma-separated values.",
"in": "query",
"items": {
"type": "string"
},
"name": "sync_usage",
"required": false,
"type": "array",
"x-example": "SYNC1"
},
{
"collectionFormat": "multi",
"description": "Parameter to include various additional information about an execution.
restarts - Includes the number of restarts
predecessors - Includes a list of the predecessors of a workflow taskrecurring - Includes details of a C_PERIOD task",
"in": "query",
"items": {
"enum": [
"restarts",
"predecessors",
"recurring"
],
"type": "string"
},
"name": "fields",
"required": false,
"type": "array"
}
]
CODE
[
{
"description": "Type of a execution report",
"in": "path",
"name": "report_type",
"required": true,
"type": "string"
},
{
"default": 1,
"description": "Maximum number of report pages. If this parameter is omitted the default value 1 is applied.",
"format": "int32",
"in": "query",
"name": "max_results",
"required": false,
"type": "integer",
"x-example": 5
},
{
"default": 1,
"description": "Response lists report pages with numbers > this parameter.",
"format": "int32",
"in": "query",
"name": "start_at",
"required": false,
"type": "integer",
"x-example": 3
}
]
CODE
""
CODE
""
CODE
[
{
"in": "body",
"name": "body",
"required": true
}
]
CODE
[
{
"in": "body",
"name": "body",
"required": false
}
]
CODE
[
{
"description": "ID of the forecast.",
"format": "int32",
"in": "path",
"name": "forecast_id",
"pattern": "\\d+",
"required": true,
"type": "integer"
},
{
"description": "Object name to query. Supports wildcards (*).",
"in": "query",
"name": "name",
"required": false,
"type": "string",
"x-example": "SCRI.NEW.1"
},
{
"collectionFormat": "multi",
"description": "Object types to query. Supports multiple, comma-separated values. If omitted, all executable object types are used as default value.",
"in": "query",
"items": {
"type": "string"
},
"name": "type",
"required": false,
"type": "array",
"x-example": "SCRI"
},
{
"description": "Logical start date lower bound to be used for the query.",
"in": "query",
"name": "estimated_start_from",
"required": false,
"type": "string",
"x-example": "2018-02-18T10:00:00Z"
},
{
"description": "Logical start date upper bound to be used for the query.",
"in": "query",
"name": "estimated_start_to",
"required": false,
"type": "string",
"x-example": "2018-02-19T10:00:00Z"
},
{
"description": "Agent name to query. Supports wildcards (*).",
"in": "query",
"name": "agent_destination",
"required": false,
"type": "string",
"x-example": "WIN01"
},
{
"description": "Source agent name to query. Supports wildcards (*).",
"in": "query",
"name": "agent_source",
"required": false,
"type": "string",
"x-example": "WIN01"
},
{
"collectionFormat": "multi",
"description": "Agent platform to query. Supports multiple, comma-separated values.",
"in": "query",
"items": {
"type": "string"
},
"name": "platform_destination",
"required": false,
"type": "array",
"x-example": "WINDOWS"
},
{
"collectionFormat": "multi",
"description": "Parameter to include various additional information about a forecast.
entries - Includes a list of all entries within a forecast",
"in": "query",
"items": {
"enum": [
"entries"
],
"type": "string"
},
"name": "fields",
"required": false,
"type": "array"
}
]
CODE
[
{
"description": "Agent name to query. Supports wildcards (*).",
"in": "query",
"name": "name",
"required": false,
"type": "string",
"x-example": "WIN01"
},
{
"description": "Agent types to query. Supports multiple, comma-separated values.",
"in": "query",
"name": "type",
"required": false,
"type": "string",
"x-example": "WINDOWS"
},
{
"description": "Agent version to query. Supports wildcards (*).",
"in": "query",
"name": "version",
"required": false,
"type": "string",
"x-example": "12.3.0+low.build.1100"
},
{
"description": "Timeframe lower bound to be used for the query.",
"in": "query",
"name": "from",
"required": true,
"type": "string",
"x-example": "2015-04-15T06:37:59Z"
},
{
"description": "Timeframe upper bound to be used for the query.",
"in": "query",
"name": "to",
"required": true,
"type": "string",
"x-example": "2015-04-15T06:37:59Z"
},
{
"description": "Timeframe upper bound to be used for the query.",
"in": "query",
"name": "execution_name",
"required": false,
"type": "string",
"x-example": "2015-04-15T06:37:59Z"
},
{
"description": "Minimal duration of the gap.",
"in": "query",
"name": "min_duration",
"pattern": "([-+]?)P(?:([-+]?[0-9]+)D)?(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:.,)?S)?)?",
"required": false,
"type": "string",
"x-example": "PT9H11M34S"
}
]
CODE
[
{
"description": "Forecast title to query. Supports wildcards (*).",
"in": "query",
"name": "fc_title",
"required": false,
"type": "string",
"x-example": "JOBP.NEW.FORECAST"
},
{
"description": "Minimum start time to query.",
"in": "query",
"name": "fc_start_time",
"required": false,
"type": "string",
"x-example": "2018-02-18T10:00:00Z"
},
{
"description": "Maximum end time to query.",
"in": "query",
"name": "fc_end_time",
"required": false,
"type": "string",
"x-example": "2018-02-19T10:00:00Z"
},
{
"description": "Forecast type to query. Omit to get all types.",
"enum": [
"FCST",
"AFCST"
],
"in": "query",
"name": "fc_type",
"required": false,
"type": "string",
"x-example": "FCST"
},
{
"description": "Object name to query. Supports wildcards (*).",
"in": "query",
"name": "name",
"required": false,
"type": "string",
"x-example": "SCRI.NEW.1"
},
{
"collectionFormat": "multi",
"description": "Object types to query. Supports multiple, comma-separated values. If omitted, all executable object types are used as default value.",
"in": "query",
"items": {
"type": "string"
},
"name": "type",
"required": false,
"type": "array",
"x-example": "SCRI"
},
{
"description": "Logical start date lower bound to be used for the query.",
"in": "query",
"name": "estimated_start_from",
"required": false,
"type": "string",
"x-example": "2018-02-18T10:00:00Z"
},
{
"description": "Logical start date upper bound to be used for the query.",
"in": "query",
"name": "estimated_start_to",
"required": false,
"type": "string",
"x-example": "2018-02-19T10:00:00Z"
},
{
"description": "Agent name to query. Supports wildcards (*).",
"in": "query",
"name": "agent_destination",
"required": false,
"type": "string",
"x-example": "WIN01"
},
{
"description": "Source agent name to query. Supports wildcards (*).",
"in": "query",
"name": "agent_source",
"required": false,
"type": "string",
"x-example": "WIN01"
},
{
"collectionFormat": "multi",
"description": "Agent platform to query. Supports multiple, comma-separated values.",
"in": "query",
"items": {
"type": "string"
},
"name": "platform_destination",
"required": false,
"type": "array",
"x-example": "WINDOWS"
},
{
"collectionFormat": "multi",
"description": "Parameter to include various additional information about a forecast.
entries - Includes a list of all entries within a forecast",
"in": "query",
"items": {
"enum": [
"entries"
],
"type": "string"
},
"name": "fields",
"required": false,
"type": "array"
}
]
CODE
[
{
"description": "ID of the forecast.",
"format": "int32",
"in": "path",
"name": "forecast_id",
"required": true,
"type": "integer"
},
{
"in": "body",
"name": "body",
"required": true
}
]
CODE
[
{
"collectionFormat": "multi",
"description": "Optional list of additional fields.
modification_details - Includes modification/creation date and user name.
",
"in": "query",
"items": {
"enum": [
"modification_details"
],
"type": "string"
},
"name": "fields",
"required": false,
"type": "array"
}
]
CODE
""
CODE
""
CODE
[
{
"in": "body",
"name": "body",
"required": false
},
{
"default": false,
"description": "Determines whether existing objects should get overwritten by the import",
"in": "query",
"name": "overwrite_existing_objects",
"required": false,
"type": "boolean",
"x-example": true
}
]
CODE
[
{
"description": "Name of the Calendar Event.",
"in": "path",
"name": "event_name",
"required": true,
"type": "string"
}
]
CODE
""
CODE
""
CODE
[
{
"description": "Branch name where our file is located.",
"in": "path",
"name": "branch_name",
"required": true,
"type": "string",
"x-example": "master"
},
{
"description": "Branch name where their file is located.",
"in": "query",
"name": "branch_name_theirs",
"required": true,
"type": "string",
"x-example": "dev"
},
{
"description": "Path of the object on our branch which should be compared.",
"in": "query",
"name": "object_path_ours",
"required": true,
"type": "string",
"x-example": "I.AM.CONFLICTING.SCRI"
},
{
"description": "Path of the object on their branch which should be compared.",
"in": "query",
"name": "object_path_theirs",
"required": true,
"type": "string",
"x-example": "I.AM.CONFLICTING.SCRI"
}
]
CODE
[
{
"description": "Name of the branch.",
"in": "path",
"name": "branch_name",
"required": true,
"type": "string"
},
{
"description": "Maximum number of executions for a page result set. If this parameter is omitted the default value 50 is applied.",
"format": "int32",
"in": "query",
"minimum": 1,
"name": "max_results",
"required": false,
"type": "integer",
"x-example": 50
},
{
"description": "From which history entry paging should be started.",
"format": "int32",
"in": "query",
"minimum": 0,
"name": "start_at",
"required": false,
"type": "integer"
}
]
CODE
[
{
"in": "body",
"name": "body",
"required": false
}
]
CODE
[
{
"in": "body",
"name": "body",
"required": false
}
]
CODE
[
{
"in": "body",
"name": "body",
"required": false
}
]
CODE
""
CODE
[
{
"collectionFormat": "multi",
"description": "Parameter to include various additional information about changes.
total - the total number of uncommitted files.
",
"in": "query",
"items": {
"enum": [
"total"
],
"type": "string"
},
"name": "fields",
"required": false,
"type": "array"
}
]
CODE
""
CODE
[
{
"description": "Maximum number of executions for a page result set. If this parameter is omitted the default value 50 is applied.",
"format": "int32",
"in": "query",
"minimum": 1,
"name": "max_results",
"required": false,
"type": "integer",
"x-example": 50
},
{
"description": "From which branch list entry paging should start.",
"format": "int32",
"in": "query",
"minimum": 0,
"name": "start_at",
"required": false,
"type": "integer"
}
]
CODE
[
{
"in": "body",
"name": "body",
"required": false
}
]
CODE
[
{
"description": "GIT Hash of the target commit.",
"in": "path",
"name": "commit_id",
"required": true,
"type": "string",
"x-example": "1"
}
]
CODE
[
{
"description": "Parameters for importing after a pull. The pull will abort if there are conflicts and overwriting is not enabled.",
"in": "body",
"name": "body",
"required": true
}
]
CODE
[
{
"in": "body",
"name": "body",
"required": true
}
]
CODE
[
{
"in": "body",
"name": "body",
"required": false
}
]
CODE
""
CODE
""
CODE
""
CODE
""
CODE
""
CODE
[
{
"description": "Maximum number of executions for a page result set. If this parameter is omitted the default value 50 is applied.",
"format": "int32",
"in": "query",
"minimum": 1,
"name": "max_results",
"required": false,
"type": "integer",
"x-example": 5000
},
{
"description": "Filter after the name of the agent. Supports wildcards (*).",
"in": "query",
"name": "name",
"required": false,
"type": "string",
"x-example": "WIN01"
},
{
"description": "Filter after running agents.",
"in": "query",
"name": "active",
"required": false,
"type": "boolean",
"x-example": true
},
{
"description": "Filter after IP address. Supports wildcards (*).",
"in": "query",
"name": "ip_address",
"required": false,
"type": "string",
"x-example": "10.243.20.155"
},
{
"description": "Filter after the agents version. Supports wildcards (*).",
"in": "query",
"name": "version",
"required": false,
"type": "string",
"x-example": "12.3.0+low.build.1100"
},
{
"description": "Filter after the computer's hardware information. Supports wildcards (*).",
"in": "query",
"name": "hardware",
"required": false,
"type": "string",
"x-example": "x86/2/64"
},
{
"description": "Filter after the Computer's operating system. Supports wildcards (*).",
"in": "query",
"name": "software",
"required": false,
"type": "string",
"x-example": "WinNT"
},
{
"description": "Filter after agents that are linked to the service manager",
"in": "query",
"name": "linked",
"required": false,
"type": "boolean",
"x-example": "False"
},
{
"description": "Filter after agent platform (type). Supports wildcards (*).",
"in": "query",
"name": "platform",
"required": false,
"type": "string",
"x-example": "WINDOWS"
}
]
CODE
""
CODE
[
{
"description": "Timeframe lower bound to be used for the query.",
"format": "int32",
"in": "path",
"name": "start_from",
"required": true,
"type": "integer"
}
]
CODE
""
CODE