Collection.GetStatus
  • 14 May 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Collection.GetStatus

  • Dark
    Light
  • PDF

Article summary

Description

Gets the status of a combined collection. This status helps the user understand when they can rebuild the combined collection and what has to happen before they rebuild it.

URL parameters

NameRequiredTypeDescription
CollectionIDTruenumericUnique identifier of the combined collection.

Responses

NameTypeDescription
ResultstringSuccess if the operation was successful.
ErrorMessagestringReturns a description of what the error is when the combined collection errors.
ErrorDetailstringReturns details on the error when the combined collection errors.
ErrorCodestringReturns a shorter version description of what the error is when the combined collection errors.
ActiveJobsCountnumericNumber of active jobs for agents that source the combined collection.
ActiveJobActiveJobSource agent job currently running for the combined collection . Not returned if no source agents have active jobs.
CollectionIsUnderMaintenancebooleanYes, No, True, False. Yes/True if there is an active CollectionCombinedRebuild job for collection.
RebuildJobRebuildJobActive Rebuild job for collection. Will only be returned if CollectionIsUnderMaintenace is true.
StatusstringThe status of the combined collection. It can be the following values: Ready, Canceling, RefreshingData (when there are active source agent jobs), Rebuilding (when collection is under maintenance).

Sample request

curl -X GET "https://api.mozenda.com/rest?WebServiceKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&Service=Mozenda10&Operation=Collection.GetStatus&CollectionID=1094"

Sample responses

XML

<?xml version="1.0" encoding="utf-8"?>
<ApiResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Result>Success</Result>
  <CollectionID>22308</CollectionID>
  <ErrorMessage/>
  <ErrorDetail/>
  <ErrorCode/>
  <ActiveJobsCount>2</ActiveJobsCount>
  <ActiveJobList>
    <ActiveJob>
      <JobID>114758395</JobID>
      <Status>Running</Status>
      <JobType>WebPageHarvest</JobType>
      <AgentID>11620</AgentID>
    </ActiveJob>
    <ActiveJob>
      <JobID>114758396</JobID>
      <Status/>
      <JobType>ReportRefreshData</JobType>
      <CollectionID>11777</CollectionID>
    </ActiveJob>
  </ActiveJobList>
  <CollectionIsUnderMaintenance>False</CollectionIsUnderMaintenance>
  <Status>RefreshingData</Status>
</ApiResponse>

JSON (add &ResponseFormat=JSON)

{
  "CollectionID": 22308,
  "ErrorMessage": "",
  "ErrorDetail": "",
  "ErrorCode": "",
  "ActiveJobsCount": 2,
  "ActiveJob": [
    {
      "JobID": 114758395,
      "Status": "Running",
      "JobType": "WebPageHarvest",
      "AgentID": 11620
    },
    {
      "JobID": 114758396,
      "Status": "",
      "JobType": "ReportRefreshData",
      "CollectionID": 11777
    }
  ],
  "CollectionIsUnderMaintenance": false,
  "Status": "RefreshingData",
  "JsonResult": {
    "Command": "Collection.GetStatus",
    "AutoLoggedIn": false,
    "WebConsoleKey": "",
    "Result": "Success",
    "ErrorCode": "",
    "ErrorDescription": "",
    "ErrorList": [],
    "ExecutionTime": {
      "Ticks": 0,
      "Days": 0,
      "Hours": 0,
      "Milliseconds": 0,
      "Minutes": 0,
      "Seconds": 0,
      "TotalDays": 0,
      "TotalHours": 0,
      "TotalMilliseconds": 0,
      "TotalMinutes": 0,
      "TotalSeconds": 0
    }
  }
}


Was this article helpful?