Spectra Logic
1-800-833-1132 : 1-303-449-6400


Notification Operations : Notification Operations : Create Job Completed Notification Registration

Create Job Completed Notification Registration
Description
Create a notification registration for job completed events.
Requests
Syntax
POST http[s]://{datapathDNSname}/_rest_/job_completed_notification_registration?notification_end_point={string}[&format=DEFAULT|JSON|XML][&job_id={string}][&naming_convention=CONCAT_LOWERCASE|CONSTANT|​​​​UNDERSCORED|CAMEL_CASE_WITH_FIRST_LETTER_UPPERCASE|CAMEL_CASE_WITH_FIRST_LETTER_LOWERCASE][&notification_http_method=POST|PUT]
Request Parameters
The scheme used for naming within the notification sent. Values: CONCAT_LOWERCASE, CONSTANT, UNDERSCORED, CAMEL_CASE_WITH_FIRST_LETTER_UPPERCASE (default), CAMEL_CASE_WITH_FIRST_LETTER_LOWERCASE
Responses
Response Elements
<Data>
   <CreationDate>{
YYYY-MM-DDThh:mm:ss.xxxZ}</CreationDate>
   <Format>DEFAULT|JSON|XML</Format>
   <Id>{string}</Id>
   <JobId>{string}</JobId>
   <LastFailure>{string}</LastFailure>
   <LastHttpResponseCode>{32‑bit integer}</LastHttpResponseCode>
   <LastNotification>{YYYY-MM-DDThh:mm:ss.xxxZ}</LastNotification>
   <NamingConvention>
      CONCAT_LOWERCASE|CONSTANT|UNDERSCORED|
      CAMEL_CASE_WITH_FIRST_LETTER_UPPERCASE|
      CAMEL_CASE_WITH_FIRST_LETTER_LOWERCASE
   </NamingConvention>
   <NotificationEndPoint>{string}</NotificationEndPoint>
   <NotificationHttpMethod>POST|PUT</NotificationHttpMethod>
   <NumberOfFailuresSinceLastSuccess>
      {32‑bit integer}
   </NumberOfFailuresSinceLastSuccess>
   <UserId>{string}</UserId>
</Data>
where the response elements are defined as follows:
The scheme used for naming within the notification sent. Values: CONCAT_LOWERCASE, CONSTANT, UNDERSCORED, CAMEL_CASE_WITH_FIRST_LETTER_UPPERCASE, CAMEL_CASE_WITH_FIRST_LETTER_LOWERCASE
Example
Sample Request
This request creates a registration for job completed notifications to be sent to Spectra-S3-client-hostname.
POST http://blackpearl-hostname/_rest_/job_completed_notification_registration
?notification_end_point=Spectra-S3-client-hostname HTTP/1.1
Sample Response
HTTP/1.1 201 CREATED
<Data>
   <CreationDate>2014-10-02T11:40:25.683Z</CreationDate>
   <Format>DEFAULT</Format>
   <Id>e2ae9bc2-d70e-46d4-9af7-82d971827cb8</Id>
   <JobId/>
   <LastFailure/>
   <LastHttpResponseCode/>
   <LastNotification/>
   <NamingConvention>
      CAMEL_CASE_WITH_FIRST_LETTER_UPPERCASE
   </NamingConvention>
   <NotificationEndPoint>
      Spectra-S3-client-hostname
   </NotificationEndPoint>
   <NotificationHttpMethod>POST</NotificationHttpMethod>
   <NumberOfFailuresSinceLastSuccess>
      0
   </NumberOfFailuresSinceLastSuccess>
   <UserId>2bb8b755-857b-4eec-91cd-cef188f55aac</UserId>
</Data>
Sample Notification Payload
Below is a sample job completed notification payload:
<Name>JobCompletedNotificationPayload</Name>
<Payload>
   <CancelOccurred>TRUE</CancelOccurred>
   <JobId>d7f5e47c-fbe6-4067-b834-9f829f150333</JobId>
   <NotificationGenerationDate/>
   <ObjectsNotPersisted>
      <Object Id="6d0c304e-8609-4f69-8e57-ad61787c2172"
      Latest="true" Length="10" Name="o1" Offset="0" Version="1"/>
      <Object Id="628a1df8-d440-4caf-9e31-089b95b5cbe7"
      Latest="true" Length="10" Name="o1" Offset="0" Version="1"/>
   </ObjectsNotPersisted>
</Payload>