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",
          "in" : "descriptionquery",
   : "The upgrade report is generated and returned."required", : false,
          "schematype" : {"integer",
              "$ref" "format" : "#/definitions/RestUpgradeResponseint32"
        }, {
  }        "name" :  }"limit",
          "401in" : {"query",
            "descriptionrequired" : "Thefalse,
application has no permission over this method"    "type"       }: "integer",
          "403format" : {"int32"
        } ],
  "description" : "The given user does not have access."responses" :    {
     },           "500"200" : {
            "description" : "SomethingThe wentupgrade wrong,report unableis togenerated retrieve space upgrade reportand returned.",
          }  "schema" :  {
   }       }     },
    "/documentactivity/upgrade/run" : {"$ref" : "#/definitions/RestUpgradeResponse"
        "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" : "Thefalse,
given space key does not exist."     "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.",
   },           "500schema" : {
              "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"
: {         "tags" : [ "documentactivity" ],},
           "summary401" : "Retrieves the space upgrade/pre-check status of the space provided.",{
            "description" : "",The application has no permission over this method"
        "operationId" : "getSpaceUpgradeStatus"},
          "produces403" : {
 [ "application/json" ],         "parametersdescription" : "The given [user {does not have access."
        "name" : "spaceKey"},
          "in500" : "path",{
            "description" : "Space keySomething went wrong, unable to getrun upgrade/pre-check data",the space upgrade task."
          "required"}
: true,       }
   "type" : "string", }
    },
    "x-example/documentactivity/upgrade/status/{spaceKey}" : "spacekey"
     {
  } ],         "responses"get" : {
 
        "200tags" : {[ "documentactivity"  ],
         "descriptionsummary" : "TheRetrieves the space upgrade/pre-check status is returnedof the space provided.",
  
         "schemadescription" : {"",
        "operationId" : "getSpaceUpgradeStatus",
        "$refproduces" : [ "#application/definitions/RestSpaceUpgradeTaskjson" ],
        "parameters" : [ {
 }         "name" : }"spaceKey",
          "401in" : {"path",
            "description" : "TheSpace applicationkey hasto no permission over this method"get upgrade/pre-check data",
          "required" : }true,
          "403type" : {"string",
            "descriptionx-example" : "spacekey"The
given user does not have access."   } ],
      },  "responses" : {
          "500200" : {
            "description" : "Something went wrong, Unable to retrieve theThe space upgrade/pre-check status is returned.",
          }  "schema" : {
    }       }     },
   "$ref" : "#/documentactivity/upgrade/support/{spaceKey}definitions/RestSpaceUpgradeTask"
: {       "get" : {  }
      "tags" : [ "documentactivity" ]},
          "summary401" : "Get support file for the document activity upgrade",{
             "description" : "",The application has no permission over this method"
        "operationId" : "getSupportFile"},
          "produces403" : {
 [ "application/octet-stream" ],         "parametersdescription" : [ {
 "The given user does not have access."
        "name" : "spaceKey"},
          "in500" : "path", {
            "description" : "Space keySomething went wrong, Unable to get upgrade/retrieve the space pre-check status."
support package file",        }
  "required" : true,    }
      "type"}
: "string",     },
     "x-example"/documentactivity/upgrade/support/{spaceKey}" : "spacekey"{
      "get" : } ],{
        "responsestags" : {[ "documentactivity" ],
        "200summary" : {
   "Get support file for the document activity upgrade",
        "description" : "Support file is generated and returned"",
        "operationId" : }"getSupportFile",
 
        "400produces" : {
 [ "application/octet-stream" ],
          "descriptionparameters" : "Space key is null or does not exist"[ {
          "name"    }: "spaceKey",
          "401in" : {
 "path",
          "description" : "TheSpace applicationkey hasto no permission over this method"get upgrade/pre-check support package file",
          }"required" : true,
          "403type" : {
 "string",
          "descriptionx-example" : "User is not administratorspacekey"
        }  }],
 
        "404responses" : {
            "description200" : "No{
support package content"           },
   "description" : "Support file is generated and returned"
      "500" : {  },
          "description400" : {
"Cannot   generate support data"       "description" : "Space key }is null or does not exist"
   }       },
    }   },   "definitions401" : {
    "RestContentUpgradeRunRequest" : {       "typedescription" : "object",The application has no permission over this "requiredmethod"
: [ "contentId", "upgrade" ],       "properties"},
: {         "contentId403" : {
            "typedescription" : "integer",User is not administrator"
        "format" : "int64"},
          "example404" : 7667751,{
            "description" : "Content(Page/BlogPost) id to perform the upgrade or pre-check process"No support package content"
           },
 },         "upgrade500" : {
            "typedescription" : "boolean",Cannot generate support data"
       "description" : "True or}
false if we want to perform the upgrade or}
pre-check process respectively."    }
    }
  },
  "definitions" },:  {
    "descriptionRestContentUpgradeRunRequest" : "This{
is the specification of content upgrade/pre-check run request."type" : "object",
  },     "RestContentUpgradeRunResponserequired" : {
      "type" : "object"[ "contentId", "upgrade" ],
      "properties" : {
        "contentId" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 7667751,
          "description" : "Content(Page/BlogPost) id to perform the upgrade or pre-check process"
        },
        "statusupgrade" : {
          "type" : "stringboolean",
          "exampledescription" : "CHECK_SUCCESS",True or false if we want to perform the upgrade  "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_CANCELor pre-check process respectively."
        }
      },
      "description" : "This is the specification of content upgrade/pre-check run request."
    },
    "RestContentUpgradeRunResponse" : {
      "type" : "object",
      "properties" : {
        "contentId" : {
          "type" : "integer",
          "format" : "int64",
          "description" : "Content id to perform the upgrade or pre-check process"
        },
        "status" : {
          "type" : "string",
          "example" : "CHECK_SUCCESS",
          "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"
        },
        "support" : {
          "type" : "string",
          "example" : "/rest/cw/2/documentactivity/upgrade/support/TEST",
          "description" : "The support file link, to complete the partial link concat the root url"
        }
      },
      "description" : "This is the specification of content upgrade/pre-check run response."
    },
    "RestSpaceUpgrade" : {
      "type" : "object",
      "properties" : {
        "name" : {
          "type" : "string",
          "example" : "demo space name",
          "description" : "space name"
        },
        "key" : {
          "type" : "string",
          "example" : "DEMO",
          "description" : "space key"
        },
        "home" : {
          "type" : "string",
          "example" : "/display/DEMO/demo",
          "description" : "space home url"
        },
        "numPagesWithHistory" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 4,
          "description" : "number of pages with a workflow history in the space"
        },
        "totalPages" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 5,
          "description" : "the total number of pages in the space"
        },
        "supportneedsUpgrade" : {
          "type" : "stringboolean",
          "exampledescription" : "flag if the space needs "/rest/cw/2/documentactivity/upgrade/support/TEST",to be upgraded or not"
        },
        "preCheck" : {
          "description" : "Thethe space supportupgrade filetask linkstatus",
   to  complete the partial link concat the"$ref" root url: "#/definitions/RestSpaceUpgradeTask"
        }
      },
      "description" : "This is the specification of content upgrade/pre-check run response the space with the data about the workflows and the pages."
    },
    "RestSpaceUpgradeRestSpaceUpgradeCancelRequest" : {
      "type" : "object"",
      "required" : [ "spaceKey", "upgrade" ],
      "properties" : {
        "namespaceKey" : {
          "type" : "string",
          "example" : "demo space nameDEMO",
          "description" : "space namekey"
        },
        "keyupgrade" : {
          "type" : "stringboolean",
          "exampledescription" : "DEMO",
          "description" : "space keyTrue or false if we want to perform the cancel of the upgrade or pre-check process respectively."
        },
      },
      "homedescription" : {"This is the specification of space upgrade/pre-check cancel request."
  "type" : "string"},
    "RestSpaceUpgradeRunRequest" : {
      "exampletype" : "/display/DEMO/demo",
   object",
      "descriptionrequired" : [ "space home urlspaceKeys", "upgrade" ],
       },"properties" : {
        "numPagesWithHistoryspaceKeys" : {
          "type" : "integerarray",
          "formatdescription" : "int64List of space keys to perform the upgrade or pre-check process",
          "exampleitems" : 4,{
            "descriptiontype" : "string"number
  of pages with a workflow history in the space"}
        },
        "totalPagesupgrade" : {
          "type" : "boolean",
          "typedescription" : "integer",True or false if we want to perform the upgrade  "format" : "int64",or pre-check process respectively."
        }
 "example" : 5,    },
      "description" : "This is the totalspecification number of pages in the space"
  space upgrade/pre-check run request."
     },
   
    "needsUpgradeRestSpaceUpgradeRunResponse" : {
          "type" : "booleanobject",
   
      "descriptionproperties" : "flag{
if the space needs to be upgraded or not"upgradeTasks" : {
      },         "preChecktype" : {"array",
          "descriptionxml" : "the{
space upgrade task status",           "$refname" : "#/definitions/RestSpaceUpgradeTaskspacesPreChecks"
        }  },
    },       "description" : "ThisList of isspace theupgrade specificationtasks ofstarted",
the space with the data about the workflows and the pages.""items" : {
     },       "RestSpaceUpgradeCancelRequestxml" : {
              "typename" : "objectspacesPreChecks",
         "required" : [ "spaceKey", "upgrade" ],},
            "properties$ref" : {"#/definitions/RestSpaceUpgradeTask"
        "spaceKey" : {}
        }
 "type" : "string",    },
      "examplexml" : "DEMO",
 {
        "descriptionname" : "space keyRestSpaceUpgradeRunResponse"
 
      },

       "upgradedescription" : {"This is the specification of space upgrade/pre-check run response."
  "type" : "boolean",
  },
       "descriptionRestSpaceUpgradeTask" : "True{
or false if we want to perform"type" the cancel of the upgrade or pre-check process respectively."
 : "object",
      "properties" : {
      }  "spaceKey" : {
   },       "descriptiontype" : "This is the specification of space upgrade/pre-check cancel request.""string",
          "example" : "DEMO",
    },      "RestSpaceUpgradeRunRequestxml" : {
            "typename" : "object"key"
          },
          "requireddescription" : [ "spaceKeys",space key"upgrade"
],
      "properties"  : {},
        "spaceKeysstatus" : {
          "type" : "arraystring",
          "descriptionexample" : "List of space keys to perform the upgrade or pre-check processUPGRADE_IN_PROGRESS",
          "itemsdescription" : {"Status of the actual state,         "type" : "string"
          }possible outcomes: CHECK_NOT_RUN, CHECK_IN_PROGRESS, CHECK_SUCCESS, CHECK_FAIL, CHECK_CANCEL, UPGRADE_IN_PROGRESS, UPGRADE_SUCCESS, UPGRADE_FAIL, UPGRADE_CANCEL"
          },
        "upgradestartedAt" : {
          "type" : "booleaninteger",
          "descriptionformat" : "int64"True,
or false if we want to perform the upgrade or pre-check process respectively."example"         }
  : 1672752415,
   },       "description" : "Thisstarted isdate the specification of space upgrade/pre-check run request."
    },
    "RestSpaceUpgradeRunResponse" : {the update task, the format is the current instant with the system UTC clock."
        "type" : "object",},
        "propertiesduration" : {
          "upgradeTaskstype" : {"string",
          "typeexample" : "array2m ",
          "description" : "ListThe oftime spacein upgradeseconds, tasks started",
          "items" : {minutes, hours that the task has taken to be executed"
        },
        "$refprogress" : "#/definitions/RestSpaceUpgradeTask"{
          }"type" : "integer",
      }    "format" :  }"int32",
      "description" : "This is the"example" specification of space upgrade/pre-check run response.": 75,
     },     "RestSpaceUpgradeTaskdescription" : "The percentage {of the upgrade process that has been "type" : "object",completed"
        },
        "propertiesnumErrors" : {
          "spaceKeytype" : {"integer",
          "typeformat" : "stringint32",
          "example" : "DEMO"0,
          "description" : "space keyThe number of errors found in the pages "
        },
        "statussupport" : {
          "type" : "string",
          "example" : "UPGRADE_IN_PROGRESS/rest/cw/2/documentactivity/upgrade/support/DEMO",
          "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 "The support file link, to complete the partial link concat the root url"
        },
        "startedAtphase" : {
          "type" : "integerstring",
          "formatexample" : "int64",
          "example" : 1672752415Phase 2/4 DB storage (AO Tables): page 1/5",
          "description" : "started date of the update task, : "Phase the formatupgrade process is currently thein"
current instant with the system UTC clock."  }
      },
 
      "durationxml" : {
          "typename" : "stringRestSpaceUpgradeTask",
      },
      "exampledescription" : "2m ",
          "description" : "The time in seconds, minutes, hours that the task has taken to be executed"It is the current state of the upgrade in a space in which the upgrade task has been executed."
    },
    "RestUpgradeMetadata" : {
      "type" : "object",
      "properties" : },{
        "progresstotalPagesWithHistory" : {
          "type" : "integer",
          "format" : "int32int64",
          "example" : 753,
          "description" : "Thethe total percentagenumber of thepages upgradewith process that has been completedworkflows history"
        },
        "numErrorstotalSpacesWithHistory" : {
          "type" : "integer",
          "format" : "int32int64",
          "example" : 02,
          "description" : "Thethe total number of errorsspaces foundwith in the pages workflow history"
        },
        "supporttotalSpaces" : {
          "type" : "stringinteger",
          "exampleformat" : "/rest/cw/2/documentactivity/upgrade/support/DEMOint64",
          "descriptionexample" : "The support file link, to complete the partial link concat the root url2,
          "description" : "total spaces"
        },
        "phasemedianPagesWithWorkflowPerSpace" : {
          "type" : "stringnumber",
          "exampleformat" : "Phase 2/4 DB storage (AO Tables): page 1/5""double",
          "example" : 1.5,
          "description" : "Phase the upgrade process is currently inthe median number of pages with workflow per space"
        },
        "highestNumPagesWithWorkflowPerSpace" : {
 },         "descriptiontype" : "It is the current state of the upgrade in a space in which the upgrade task has been executed.""integer",
          "format" : "int64",
          "example" : 2,
     },     "RestUpgradeMetadatadescription" : {"the largest amount of pages with workflow "type" : "object",per space"
      "properties" : {},
        "totalPagesWithHistorytotalSpacesChecked" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 32,
          "description" : "the total numberspaces ofchecked pagesfor withthe workflows historyupgrade"
        },
        "totalSpacesWithHistorytotalSpacesUpgraded" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 2,
          "description" : "the total numberspaces ofupgraded spacesfor withthe workflow historyupgrade"
        },
        "totalSpaceslatestSpaceUpgraded" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 2,
          "description" : "total spaceslatest timestamp of a space upgraded"
        },
        "medianPagesWithWorkflowPerSpacetotalDocActivityEntries" : {
          "type" : "numberinteger",
          "format" : "doubleint64",
          "example" : 1.53,
          "description" : "thetotal mediandocument number of pages with workflow per spaceactivity entries"
        },
        "highestNumPagesWithWorkflowPerSpacetotalSpacesNeedUpgrade" : {
          "type" : "integer",
          "format" : "int64",
          "example" : 23,
          "description" : "thetotal largestspaces amountthat of pages with workflow per spaceneed upgrade"
        },
        "totalSpacesCheckedstart" : {
          "type" : "integer",
          "format" : "int64int32",
          "example" : 20,
          "description" : "totalstart spacesat checkedindex, forby thedefault: upgrade0"
        },
        "totalSpacesUpgradedlimit" : {
          "type" : "integer",
          "format" : "int64int32",
          "example" : 2100,
          "description" : "total spaces upgraded for limit the upgrade"number of        }spaces retrieved, by default: 100"
     "latestSpaceUpgraded" : { },
         "typehasMore" : "integer",{
          "formattype" : "int64boolean",
          "example" : 2true,
          "description" : "latestquickly timestampdetermine ofif athere spaceare upgraded"more spaces to show for the pagination"
  },        }
"totalDocActivityEntries" : {    },
      "typedescription" : "integer",
          "format" : "int64",These are the workflow related statistics of the spaces that have or have had workflows."
     },
    "exampleRestUpgradeResponse" : 3,{
          "descriptiontype" : "total document activity entries"
        },
 object",
      "totalSpacesNeedUpgradeproperties" : {
          "typerestSpaceUpgradeList" : "integer",{
          "formattype" : "int64array",
          "examplexml" : 3,{
            "descriptionname" : "spacesPreChecks"total
spaces that need upgrade"
        }
  ,
   },       "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."
    }
  }
}

...