Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
nameupgradechecks_restapi_1
Table of Contents
minLevel1
maxLevel2
outlinefalse
typeflat
separatorpipe
printablefalse

Status
colourGreen
titleDATA CENTER
Status
colourPurple
titleDocument Activity REST API
Status
colourBlue
titleUPGRADE CHECKS REST API

Overview

There are several Several upgrade checks and pre-upgrade checks REST API endpoints that can be used to retrieve information or run/cancel the pre-upgrade/upgrade checks process for the document activity upgrade.

These REST API endpoints are provided for customers and partners to manage and run

  • pre-upgrade checks

  • upgrade checks

It is recommended that partners have an appropriate level of scripting expertise and knowledge.

Global administrator permissions are required to use these endpoints.

Pre-upgrade checks REST API endpoints

Available in

Upgrade checks REST API endpoints

Available ONLY in

...

Excerpt
nameupgradechecks_restapi_2

The upgrade and pre-upgrade checks REST API is available as Open API (Swagger) Documentation.

This includes details of the JSON objects and response examples.

Info

The document activity entries REST API and the workflow usage statistics REST API are also available to retrieve workflow document activity information.

none
Open api
docExpansionfull
filternone
supportedSubmitMethods
showDownloadButtontrue
{
  "swagger" : "2.0",
  "info" : {
    "version" : "latest",
    "title" : "Document Activity Upgrade API (latest)"
  },
  "basePath" : "/rest/cw/2/",
  "tags" : [ {
    "name" : "documentactivity"
  } ],
  "schemes" : [ "https" ],
  "paths" : {
    "/documentactivity/upgrade/cancel" : {
      "post" : {
        "tags" : [ "documentactivity" ],
        "summary" : "Cancels the running space upgrade/pre-check task for the space provided",
        "description" : "",
        "operationId" : "cancelSpaceUpgrade",
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "in" : "body",
          "name" : "Space Upgrade/Pre-check task cancel request",
          "required" : false,
          "schema" : {
            "$ref" : "#/definitions/RestSpaceUpgradeCancelRequest"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Upgrade task successfully cancelled"
          },
          "401" : {
            "description" : "The application has no permission over this method"
          },
          "403" : {
            "description" : "The given user does not have access."
          },
          "404" : {
            "description" : "There is no upgrade process for the given space"
          },
          "500" : {
            "description" : "Something went wrong, unable to cancel the space upgrade task."
          }
        }
      }
    },
    "/documentactivity/upgrade/content/run" : {
      "post" : {
        "tags" : [ "documentactivity" ],
        "summary" : "Run the content upgrade/pre-check task given a content id (Read Only Mode is not required)",
        "description" : "",
        "operationId" : "runContentUpgrade",
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "in" : "body",
          "name" : "Page Upgrade request",
          "required" : false,
          "schema" : {
            "$ref" : "#/definitions/RestContentUpgradeRunRequest"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The content upgrade/pre-check task has been executed successfully.",
            "schema" : {
              "$ref" : "#/definitions/RestContentUpgradeRunResponse"
            }
          },
          "400" : {
            "description" : "The content id parameter is not provided or the space to which the page belongs to is not upgraded."
          },
          "401" : {
            "description" : "The application has no permission over this method."
          },
          "403" : {
            "description" : "The given user does not have access or read only mode is not enabled."
          },
          "404" : {
            "description" : "The given content id does not exist."
          },
          "500" : {
            "description" : "Something went wrong, unable to run the content upgrade/pre-check task."
          }
        }
      }
    },
    "/documentactivity/upgrade/report" : {
      "get" : {
        "tags" : [ "documentactivity" ],
        "summary" : "Retrieves the upgrade report, giving the information about the spaces with workflows and their respective statistics.",
        "description" : "",
        "operationId" : "getUpgradesReport",
        "produces" : [ "application/json" ],
        "responsesparameters" : [ {
          "200name" : {
 "start",
          "descriptionin" : "The upgrade report is generated and returned.query",
 
          "schemarequired" : {
  false,
           "$reftype" : "#/definitions/RestUpgradeResponseinteger",
          "format" : }"int32"
          }, {
          "401name" : {
"limit",
           "descriptionin" : "The application has no permission over this method"query",
          "required" :    }false,
          "403type" : {"integer",
          "format" : "descriptionint32"
:   "The given user does not have access."} ],
        "responses" : },{
          "500200" : {
            "description" : "SomethingThe wentupgrade wrong,report unableis togenerated retrieve space upgrade reportand returned.",
          }   "schema" : {
   }       }     },
   "$ref" : "#/documentactivitydefinitions/upgrade/runRestUpgradeResponse"
: {       "post" : {  }
      "tags" : [ "documentactivity" ]},
          "summary401" : "Run{
the space upgrade/pre-check task given a list of space keys to upgrade "description", : "The application has no permission over this method"description"
: "",         "operationId"},
: "runSpaceUpgrade",         "consumes403" : {
[ "application/json" ],           "producesdescription" : [ "application/json" ],
"The given user does not have access."
       "parameters" : [ {},
          "in500" : "body", {
            "namedescription" : "SpaceSomething Upgradewent request"wrong, unable to retrieve space upgrade report."
      "required" : false,  }
        "schema"}
: {     }
    },
  "$ref" : "#/documentactivity/definitionsupgrade/RestSpaceUpgradeRunRequestrun" : {
      "post" : }{
        } ]"tags" : [ "documentactivity" ],
        "responsessummary" : {"Run the space upgrade/pre-check task given a list of space keys "200"to : {
   upgrade ",
        "description" : ""The,
 upgrade task is running for the list of"operationId" given: spaces."runSpaceUpgrade",
   
        "schemaconsumes" : {[ "application/json" ],
            "$refproduces" : [ "#application/definitions/RestSpaceUpgradeRunResponsejson" ],
        "parameters" : [ }{
          },"in" : "body",
          "400name" : {"Space Upgrade request",
          "descriptionrequired" : "The given space key does not exist."false,
          "schema" : {
 },           "401$ref" : {"#/definitions/RestSpaceUpgradeRunRequest"
          }
 "description" : "The application has no permission over} this],
method"        "responses" :  },{
          "403200" : {
            "description" : "The givenupgrade usertask doesis notrunning havefor access."the list of given  spaces.",
     },           "500""schema" : {
              "description$ref" : "Something went wrong, unable to run the space upgrade task.""#/definitions/RestSpaceUpgradeRunResponse"
            }
          },
        }  "400" : {
  }     },     "/documentactivity/upgrade/status/{spaceKey}description" : { "The given space key does not exist."
          "get"},
: {         "tags401" : {
 [ "documentactivity" ],         "summarydescription" : "RetrievesThe theapplication space upgrade/pre-check status of the space provided.",has no permission over this method"
        "description" : ""},
          "operationId403" : "getSpaceUpgradeStatus",{
            "producesdescription" : [ "application/json" ],
 "The given user does not have access."
       "parameters" : [ {},
          "name500" : "spaceKey",{
            "indescription" : "path"Something went wrong, unable to run the space upgrade task."
   "description" : "Space key to get upgrade/pre-check data", }
        }
 "required" : true,   }
    },
  "type" : "string",
   /documentactivity/upgrade/status/{spaceKey}" : {
      "x-exampleget" : "spacekey"{
        }"tags" : [ "documentactivity" ],
        "responsessummary" : {"Retrieves the space upgrade/pre-check status of the space provided.",
  "200" : {    "description" : "",
        "descriptionoperationId" : "getSpaceUpgradeStatus"The,
space upgrade/pre-check status is returned.",
           "produces" : [ "application/json" ],
        "schemaparameters" : [ {

             "$refname" : "#/definitions/RestSpaceUpgradeTaskspaceKey",
          "in"  }: "path",
          "description" : "Space key to get  }upgrade/pre-check data",
          "401required" : {
 true,
          "descriptiontype" : "Thestring",
application has no permission over this method"    "x-example" :   "spacekey"
        } ],
 
        "403responses" : {

           "description200" : "The given user does not have access."{
            "description" : "The space upgrade/pre-check status is }returned.",
            "500schema" : {
              "description$ref" : "Something went wrong, Unable to retrieve the space pre-check status.""#/definitions/RestSpaceUpgradeTask"
            }
          },
        }  "401" : {
  }     },     "/documentactivity/upgrade/support/{spaceKey}" : {
      "get" : {"description" : "The application has no permission over this method"
          "tags"},
: [ "documentactivity" ],
        "summary403" : "Get{
support file for the document activity upgrade",         "description" : "",The given user does not     "operationIdhave access."
: "getSupportFile",         "produces"},
: [ "application/octet-stream" ],         "parameters500" : {
[ {           "namedescription" : "spaceKey"Something went wrong, Unable to retrieve the space pre-check status."
   "in" : "path",     }
     "description" : "Space key}
to get upgrade/pre-check support package file", }
    },
    "required/documentactivity/upgrade/support/{spaceKey}" : true,
   {
      "get" : {
        "typetags" : [ "stringdocumentactivity" ],
          "x-examplesummary" : "spacekey"Get support file for the document    } ]activity upgrade",
        "responsesdescription" : {"",
        "operationId" : "200getSupportFile" : {
   ,
        "produces" : [ "application/octet-stream" ],
        "descriptionparameters" : "Support[ file{
is generated and returned"       "name"    }: "spaceKey",
          "400in" : {
 "path",
          "description" : "Space key isto null or does not exist"get upgrade/pre-check support package file",
          }"required" : true,
          "401type" : {
 "string",
          "descriptionx-example" : "spacekey"The
   application has no permission over this} method"],
        "responses" : },{
          "403200" : {
            "description" : "UserSupport file is notgenerated and administratorreturned"
          },
          "404400" : {
            "description" : "No support package contentSpace key is null or does not exist"
          },
          "500401" : {
            "description" : "Cannot generate support dataThe application has no permission over this method"
          },
        }  "403" : {
  }     }   },   "definitionsdescription" : {"User is not administrator"
 "RestContentUpgradeRunRequest" : {       "type" : "object"},
      "required" : [ "contentId", "upgrade404" ],
    : {
 "properties" : {         "contentIddescription" : {"No support package content"
        "type" : "integer"},
          "format500" : "int64",{
            "exampledescription" : 7667751,"Cannot generate support data"
       "description" : "Content(Page/BlogPost) id to perform the upgrade or pre-check process"
  }
        }
      },
    }
  },
  "upgradedefinitions" : {
    "RestContentUpgradeRunRequest" : {
      "type" : "booleanobject",
      "required" :  [ "descriptioncontentId", : "upgrade"True or],
false if we want to perform the"properties" upgrade: or{
pre-check process respectively."      "contentId" : {
}       },
      "descriptiontype" : "Thisinteger",
is the specification of content upgrade/pre-check run request."   "format" : }"int64",
    "RestContentUpgradeRunResponse" : {       "typeexample" : "object"7667751,
      "properties" : {
        "contentId" : {
    "description" : "Content(Page/BlogPost) id to perform the upgrade or pre-check process"
        },
        "typeupgrade" : "integer",{
          "formattype" : "int64boolean",
          "description" : "Content idTrue or false if we want to perform the upgrade or pre-check process respectively."
        },
      },
 "status" : {   "description" : "This is the specification of  "type" : "string",content upgrade/pre-check run request."
    },
     "exampleRestContentUpgradeRunResponse" : "CHECK_SUCCESS",{
          "descriptiontype" : "object"Status,
of the actual state, possible outcomes: CHECK_NOT_RUN, CHECK_IN_PROGRESS, CHECK_SUCCESS, CHECK_FAIL, CHECK_CANCEL, UPGRADE_IN_PROGRESS, UPGRADE_SUCCESS, UPGRADE_FAIL, UPGRADE_CANCEL" "properties" : {
        "contentId" : {
  },         "supporttype" : {"integer",
          "typeformat" : "stringint64",
          "exampledescription" : "/rest/cw/2/documentactivity/upgrade/support/TEST",
  Content id to perform the upgrade or pre-check process"
       "description" :},
"The support file link, to complete the partial link"status" concat: the{
root url"         }"type" : "string",
    },       "descriptionexample" : "CHECK_SUCCESS"This,
is the specification of content upgrade/pre-check run response."     },
    "RestSpaceUpgrade"description" : {"Status of the actual state, possible  "type" : "object",outcomes: CHECK_NOT_RUN, CHECK_IN_PROGRESS, CHECK_SUCCESS, CHECK_FAIL, CHECK_CANCEL, UPGRADE_IN_PROGRESS, UPGRADE_SUCCESS, UPGRADE_FAIL, UPGRADE_CANCEL"
      "properties" : {},
        "namesupport" : {
          "type" : "string",
          "example" : "demo space name/rest/cw/2/documentactivity/upgrade/support/TEST",
          "description" : "spaceThe name"support file link, to complete the partial link concat the },root url"
       "key" : { }
      },
      "typedescription" : "string",This is the specification of content upgrade/pre-check run response."
  "example" : "DEMO"},
    "RestSpaceUpgrade" : {
      "descriptiontype" : "space keyobject",
      "properties" : },{
        "homename" : {
          "type" : "string",
          "example" : "/display/DEMO/demodemo space name",
          "description" : "space home urlname"
        },
        "numPagesWithHistorykey" : {
          "type" : "integerstring",
          "formatexample" : "int64DEMO",
          "exampledescription" : 4,"space key"
        },
"description" : "number of pages with a workflow history in the space  "home" : {
          "type" : "string",
          "example" : "/display/DEMO/demo",
          "description" : "space home url"
        },
        "totalPagesnumPagesWithHistory" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 54,
          "description" : "the total number of pages with a workflow history in the space"
        },
        "preChecktotalPages" : {
          "descriptiontype" : "integer"the,
space upgrade task status",           "$refformat" : "#/definitions/RestSpaceUpgradeTaskint64",
        }  "example" : 5,
   },       "description" : "Thisthe total isnumber theof specificationpages ofin the space"
with the data about the workflows and the pages."
 },
   },     "RestSpaceUpgradeCancelRequestneedsUpgrade" : {
          "type" : "objectboolean",
      "required" : [ "spaceKey", "upgradedescription" ],: "flag if the space needs to "properties"be :upgraded {or not"
       "spaceKey" :},
{           "type""preCheck" : "string",{
          "exampledescription" : "DEMOthe space upgrade task status",
          "description$ref" : "space key#/definitions/RestSpaceUpgradeTask"
        },
      },
      "upgradedescription" : {"This is the specification of the space with the data  "type" : "boolean",about the workflows and the pages."
    },
     "descriptionRestSpaceUpgradeCancelRequest" : "True{
or false if we want to perform"type" the cancel of the upgrade or pre-check process respectively."
    : "object",
      "required" : [ "spaceKey", "upgrade" ],
   }   "properties" : {
 },       "descriptionspaceKey" : "This{
is the specification of space upgrade/pre-check cancel request."   "type" : }"string",
    "RestSpaceUpgradeRunRequest" : {       "typeexample" : "objectDEMO",
          "requireddescription" : [ "spaceKeys",space key"upgrade"
],       "properties" : { },
        "spaceKeysupgrade" : {
          "type" : "arrayboolean",
          "description" : "ListTrue ofor spacefalse keysif towe want to perform the cancel of the upgrade or pre-check process", respectively."
        }
      },
      "itemsdescription" : { "This is the specification of space upgrade/pre-check cancel request."
    },
    "RestSpaceUpgradeRunRequest" : {
      "type" : "stringobject",
      "required" : [  }"spaceKeys", "upgrade" ],
      "properties" : },{
        "upgradespaceKeys" : {
          "type" : "booleanarray",
          "description" : "TrueList orof falsespace ifkeys we want to perform the upgrade or pre-check process respectively."
    ",
   }
      },       "descriptionitems" : "This{
is the specification of space upgrade/pre-check run request."     }, "type" :   "RestSpaceUpgradeRunResponsestring"
: {       "type" : "object",}
      "properties" : {},
        "upgradeTasksupgrade" : {
          "type" : "arrayboolean",
          "description" : "ListTrue ofor spacefalse upgradeif taskswe started",want to perform the upgrade or pre-check     "items" : {
            "$ref" : "#/definitions/RestSpaceUpgradeTask"
      process respectively."
   }         }
      },
      "description" : "This is the specification of space upgrade/pre-check run responserequest."
    },
    "RestSpaceUpgradeTaskRestSpaceUpgradeRunResponse" : {
      "type" : "object",
      "properties" : {
        "spaceKeyupgradeTasks" : {
          "type" : "stringarray",
          "examplexml" : "DEMO",{
            "descriptionname" : "spacesPreChecks"space
 key"         },
          "statusdescription" : {"List of space upgrade tasks started",
          "typeitems" : "string", {
            "examplexml" : "UPGRADE_IN_PROGRESS",{
              "descriptionname" : "Status of the actual state, possible outcomes: CHECK_NOT_RUN, CHECK_IN_PROGRESS, CHECK_SUCCESS, CHECK_FAIL, CHECK_CANCEL, UPGRADE_IN_PROGRESS, UPGRADE_SUCCESS, UPGRADE_FAIL, UPGRADE_CANCEL"spacesPreChecks"
            },
            "$ref" : "#/definitions/RestSpaceUpgradeTask"
          },
        }
"startedAt" : {    },
      "typexml" : "integer",
          "format" : "int64",
          "example" : 1672752415,
  {
        "name" : "RestSpaceUpgradeRunResponse"
      },
      "description" : "This is the specification of space upgrade/pre-check run response."
    },
    "RestSpaceUpgradeTask" : {
      "type" : "object",
      "properties" : {
        "spaceKey" : {
          "type" : "string",
          "example" : "DEMO",
          "xml" : {
            "name" : "key"
          },
          "description" : "space key"
        },
        "status" : {
          "type" : "string",
          "example" : "UPGRADE_IN_PROGRESS",
          "description" : "Status of the actual state, possible outcomes: CHECK_NOT_RUN, CHECK_IN_PROGRESS, CHECK_SUCCESS, CHECK_FAIL, CHECK_CANCEL, UPGRADE_IN_PROGRESS, UPGRADE_SUCCESS, UPGRADE_FAIL, UPGRADE_CANCEL"
        },
        "startedAt" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 1672752415,
          "description" : "started date of the update task, the format is the current instant with the system UTC clock."
        },
        "duration" : {
          "type" : "string",
          "example" : "2m ",
          "description" : "The time in seconds, minutes, hours that the task has taken to be executed"
        },
        "progress" : {
          "type" : "integer",
          "format" : "int32",
          "example" : 75,
          "description" : "The percentage of the upgrade process that has been completed"
        },
        "numErrors" : {
          "type" : "integer",
          "format" : "int32",
          "example" : 0,
          "description" : "The number of errors found in the pages "
        },
        "support" : {
          "type" : "string",
          "example" : "/rest/cw/2/documentactivity/upgrade/support/DEMO",
          "description" : "The support file link, to complete the partial link concat the root url"
        },
        "phase" : {
          "type" : "string",
          "example" : "Phase 2/4 DB storage (AO Tables): page 1/5",
          "description" : "Phase the upgrade process is currently in"
        }
      },
      "xml" : {
        "name" : "RestSpaceUpgradeTask"
      },
      "description" : "It is the current state of the upgrade in a space in which the upgrade task has been executed."
    },
    "RestUpgradeMetadata" : {
       "descriptiontype" : "startedobject",
date of the update task, the format"properties" is: the{
current instant with the system UTC clock."  "totalPagesWithHistory" :   {
  },         "durationtype" : {"integer",
          "typeformat" : "stringint64",
          "example" : "2m "3,
          "description" : "The time in seconds, minutes, hours that the task has taken to be executed : "the total number of pages with workflows history"
        },
        "progresstotalSpacesWithHistory" : {
          "type" : "integer",
          "format" : "int32int64",
          "example" : 752,
          "description" : "Thethe total percentagenumber of thespaces upgradewith process that has been completedworkflow history"
        },
        "numErrorstotalSpaces" : {
          "type" : "integer",
          "format" : "int32int64",
          "example" : 02,
          "description" : "The number of errors found in the pages total spaces"
        },
        "supportmedianPagesWithWorkflowPerSpace" : {
          "type" : "stringnumber",
          "exampleformat" : "/rest/cw/2/documentactivity/upgrade/support/DEMOdouble",
          "descriptionexample" : "The support file link, to complete the partial link concat the root url1.5,
          "description" : "the median number of pages with workflow per space"
        },
        "phasehighestNumPagesWithWorkflowPerSpace" : {
          "type" : "stringinteger",
          "exampleformat" : "Phase 2/4 DB storage (AO Tables): page 1/5"int64",
          "example" : 2,
          "description" : "Phase the upgrade process is currently inthe largest amount of pages with workflow per space"
        },
        },
"totalSpacesChecked" : {
     "description" : "It is the current"type" state of the upgrade in a space in which the upgrade task has been executed.": "integer",
          "format" : "int64",
     },     "RestUpgradeMetadataexample" : {2,
          "typedescription" : "object",total spaces checked for the upgrade"
      "properties" : {},
        "totalPagesWithHistorytotalSpacesUpgraded" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 32,
          "description" : "the total numberspaces ofupgraded pagesfor withthe workflows historyupgrade"
        },
        "totalSpacesWithHistorylatestSpaceUpgraded" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 2,
          "description" : "thelatest totaltimestamp number of spacesa withspace workflow historyupgraded"
        },
        "totalSpacestotalDocActivityEntries" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 23,
          "description" : "total spacestotal document activity entries"
        },
        "medianPagesWithWorkflowPerSpacetotalSpacesNeedUpgrade" : {
          "type" : "numberinteger",
          "format" : "doubleint64",
          "example" : 1.53,
          "description" : "thetotal medianspaces numberthat of pages with workflow per spaceneed upgrade"
        },
        "highestNumPagesWithWorkflowPerSpacestart" : {
          "type" : "integer",
          "format" : "int64int32",
          "example" : 20,
          "description" : "thestart largestat amountindex, ofby pages with workflow per spacedefault: 0"
        },
        "totalSpacesCheckedlimit" : {
          "type" : "integer",
          "format" : "int64int32",
          "example" : 2100,
          "description" : "totallimit the number of spaces checkedretrieved, forby thedefault: upgrade100"
        },
        "totalSpacesUpgradedhasMore" : {
          "type" : "integer",
          "formattype" : "int64boolean",
          "example" : 2true,
          "description" : "totalquickly spacesdetermine upgradedif forthere theare upgrade"more spaces to show for the pagination"
  },      }
  "latestSpaceUpgraded" : {    },
      "typedescription" : "integer",These are the workflow related statistics of the spaces that  "format" : "int64",have or have had workflows."
    },
     "exampleRestUpgradeResponse" : 2,{
          "descriptiontype" : "latest timestamp of a space upgraded"
        },
 object",
      "totalDocActivityEntriesproperties" : {
          "typerestSpaceUpgradeList" : "integer",{
          "formattype" : "int64array",
          "examplexml" : 3,{
            "descriptionname" : "spacesPreChecks"total
document activity entries"         }
  ,
   },       "description" : "Theselist of arespace theupgrades workflowstatuses",
related statistics of the spaces that have or have had workflows."items" : {
  },          "RestUpgradeResponsexml" : {
      "type"  : "object",     "name" : "propertiesspacesPreChecks"
  : {         "restSpaceUpgradeList"},
: {           "type$ref" : "array",#/definitions/RestSpaceUpgrade"
          }
"description" : "list of space upgrades statuses",  },
        "itemsrestUpgradeMetadata" : {

           "$refxml" : "#/definitions/RestSpaceUpgrade"{
          }  "name" : "metadata"
    },      },
  "restUpgradeMetadata" : {           "description" : "upgrade metadata",
          "$ref" : "#/definitions/RestUpgradeMetadata"
        },
        "readOnlyMode" : {
          "type" : "boolean"
        }
      },
      "xml" : {
        "name" : "RestUpgradeResponse"
      },
      "description" : "This is the specification of all the space upgrades statuses with some workflow metadata of the Confluence instance."
    }
  }
}

...