Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Send-JobSchedulerRequest [-Path] <String> [-Body] <String> [[-Id] <String>] [[-MethodBase] <String>] [[-ContentTypeMethod] <String>] [[-Headers] <Hashtable>] [[-AuditComment] ContentType] <String>] [[-AuditTimeSpentHeaders] <Int32><Hashtable>] [ [-AuditTicketLink] <Uri>] [<CommonParameters>]

DESCRIPTION

...

-Path <String>
The Path specifies the part of URL that states the operation that is used for the request,
see http://test.sos-berlin.com/JOC/raml-doc/JOC-API/ for a complete list of Paths.

The Path is prefixed by the Base parameter.

* Example: http://localhost:4446/joc/api/tasks/history
* The URL scheme (http) and authority (localhost:4446) are used from the connection
that is specified to the Web Service by the ConnectUse-JobScheduler JobSchedulerWebService cmdlet.
* The Base (/joc/api) is used for all web service requests.
* The Path (/tasks/history) is used to query the JobScheduler task history.

Required?true
Position?1
Default value
Accept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?false

...

-Body <String>
Specifies the JSON elements or XML command that are sent to the Web Serviceto be executed.

* Example JSON request
** URL: http://localhost:4446/joc/api/tasks/history
** JSON Body
{
"jobschedulerId": "jobscheduler_prod",
"compact": "true",
"limit": 1000
}
** The JobScheduler ID is specified to which the request is addressed. The request queries the recent task history for a maximum of 1000 entries.
* Example XML command
** URL: http://localhost:4446/joc/api/jobscheduler/commands
** XML Body
<show_state/>
** XML Body
<jobscheduler_commands jobschedulerId="jobscheduler_prod"><show_state/></jobscheduler_commands>
** The XML body can use the <jobscheduler_commands> element to specify the JobScheduler ID,
otherwise the JobScheduler ID is used from the ConnectUse-JobScheduler JobSchedulerWebService cmdlet or from the - Id parameter.

Required?true
Position?2
Default value
Accept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?false

...

-Id <String>
The Id specifies the JobScheduler ID that identifies an individual JobScheduler Master.

This Id is used to addresse the JobScheduler Master that should execute the request.

If no Id is specified then the JobScheduler ID is used from the ConnectUse-JobScheduler JobSchedulerWebService cmdlet.

Required?false
Position?3
Default value
Accept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?false

Base

-Base <String>
The Base is used as a prefix to the Path for the URL and is configured with the web server
that hosts the JobScheduler Web Service.

This value is fixed and should not be modified for most use cases.

Default: /joc/api

Required?false
Position?4
Default value/joc/api
Accept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?false

...

-Method <String>
This parameter specifies the HTTP method in use.

There should be no reason to modify the default value.

Default: POST

Required?false
Position?45
Default valuePOST
Accept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?false

...

-ContentType <String>
The HTTP content type is

* application/json for JSON requests
* application/xml for XML commands

The content type is automatically adjusted by the cmdlet if XML commands are used.

Default: application/json

Required?false
Position?56
Default valueapplication/xmljson
Accept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?false

...

-Headers <Hashtable>
A hashmap can be specified with name/value pairs for HTTP headers. Typicall the Accept header is required for use of the REST API.

Required?false
Position?67
Default value@{'Accept' = 'application/xml'}
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

AuditComment

...

Required?false
Position?7
Default valueAccept pipeline input?true (ByValue, ByPropertyName)
Accept wildcard characters?false

AuditTimeSpent

...

Required?false
Position?8
Default value0
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

about_jobscheduler

...

-------------------------- EXAMPLE 1 --------------------------

PS > $response $historyJson = Send-JobSchedulerRequest -Path '/tasks/history' -Body '{"jobschedulerId": "jobscheduler_prod", "compact": "true", "limit": 1000}' -Headers @{'Accept' = 'application/json'}

Returns the recent task history entries up to a limit of 1000 items for a JobScheduler Master with ID "jobscheduler_prod"

-------------------------- EXAMPLE 2 --------------------------

$response $stateXml = Send-JobSchedulerRequest -Path '/jobscheduler/commands' -Body '<show_state/> '

Returns summary information and inventory of jobs and job chains.