# Added status message for initiating Copy Page Hierarchy and Long Task APIs

**URL:** <https://community.developer.atlassian.com/t/added-status-message-for-initiating-copy-page-hierarchy-and-long-task-apis/44749>\
**Category:** Confluence Cloud Announcements\
**Tags:** rest-api\
**Created:** [January 26, 2021, 11:45pm UTC](https://community.developer.atlassian.com/t/added-status-message-for-initiating-copy-page-hierarchy-and-long-task-apis/44749 "2021-01-26T23:45:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew.Ngo](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/andrew.ngo/32/40443_2.png) [@Andrew.Ngo](https://community.developer.atlassian.com/u/Andrew.Ngo)\
**Post date:** [January 26, 2021, 11:45pm UTC](https://community.developer.atlassian.com/t/added-status-message-for-initiating-copy-page-hierarchy-and-long-task-apis/44749/1 "2021-01-26T23:45:34Z")

</div>

A new status `INITIALIZING_TASK` has been added to tasks when initiating Copy Page Hierarchy API. This is to prevent null values in the message field if a task is completed prior to a status being saved.

See the response of [fetching long task](https://developer.atlassian.com/cloud/confluence/rest/api-group-long-running-task/#api-api-longtask-id-get) (Line 13 is where status is being saved):

```auto
{
    "id": "9535652",
    "name": {
        "key": "com.atlassian.confluence.api.impl.service.longtasks.BulkPageCopyTaskRunner",
        "args": []
    },
    "elapsedTime": 3708,
    "percentageComplete": 100,
    "successful": true,
    "finished": true,
    "messages": [
        {
            "translation": "{\"status\":{\"key\":\"INITIALIZING_TASK\",\"translation\":null,\"args\":[\"0\"]},\"destinationId\":null,\"totalPageNeedToCopy\":3,\"errors\":[]}",
            "args": []
        }
    ],
    "_links": {
        "base": "",
        "context": "/wiki"
    }
}

```

---

<div class="post-metadata">

**Author:** ![jbevan](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/jbevan/32/44430_2.png) [@jbevan](https://community.developer.atlassian.com/u/jbevan)\
**Post date:** [February 18, 2022, 12:47pm UTC](https://community.developer.atlassian.com/t/added-status-message-for-initiating-copy-page-hierarchy-and-long-task-apis/44749/2 "2022-02-18T12:47:31Z")

</div>

Hi @Andrew.Ngo and @SimonKliewer

I’m still seeing this structure in the response to the fetching long task API:

```auto
{
  "id":"2160164865",
  "name":{"key":"com.atlassian.confluence.api.impl.service.longtasks.BulkPageCopyTaskRunner","args":[]},
  "elapsedTime":3570,
  "percentageComplete":100,
  "successful":true,
  "finished":true,
  "messages":[{
    "translation":"{\"status\":{\"key\":\"STATUS_COPIED_PAGES\",\"translation\":null,\"args\":[\"4\"]},\"destinationUrl\":\"/spaces/A21/pages/2160001036/Home+page\",\"totalPageNeedToCopy\":4,\"errors\":[]}",
    "args":[]
  }],
  "_links":{"base":"https://jdbevan.atlassian.net/wiki","context":"/wiki"}
}

```

instead of the fields documented on the docs page or on this CDAC post [Add additional fields to “Get long-running task” & “Get long-running tasks” REST API endpoint response objects](https://community.developer.atlassian.com/t/add-additional-fields-to-get-long-running-task-get-long-running-tasks-rest-api-endpoint-response-objects/45642) from a year ago…

Can you provide any insight?
