Move a Question to Another Space

You can use this API request to move a question from its original space to another space.

/services/v2/question/[questionId]/move.json?space=[spaceId]

You must use the following parameters in your move a question to another space request:

Specific: space

🚧

Permissions & Notes:

  • You must have the Move question to space permission under Moderation Roles in the Advanced Editor.

    • If the question is your own, you must have the Move own question to space permission under Standard Roles in the Advanced Editor.
  • The request or query parameter spaceId specifies the identifier of the space to which you want the question moved.

  • We added this request in version 1.6.3.

Sample Request

A PUT move a question to another space request to move a question (questionId: 842) to a space (spaceId: 11) sent to https://apidocs.cloud.answerhub.com using a human-readable username and password (answerhub/test123) would look like this:

curl 
-u "answerhub:test123" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/question/842/move.json?space=11"

Expected Response

Successful Response:

  • HTTP Status 200 - OK
{
    "id": 1104,
    "ip": "172.20.0.3",
    "user": {
        "id": 108,
        "username": "admin",
        "reputation": 91
    },
    "actionDate": 1549638492006,
    "canceled": false,
    "privateAction": false,
    "verb": "moved",
    "node": {
        "id": 842,
        "type": "question",
        "creationDate": 1549550236000,
        "creationDateFormatted": "02/07/2019 02:37 PM",
        "title": "Can I cancel my own question?",
        "body": "<div class=\"fr-view clearfix\"><p>There is a permission to control this.</p></div>",
        "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>There is a permission to control this.</p></div>",
        "author": {
            "id": 112,
            "username": "ricks",
            "reputation": 1
        },
        "lastEditedAction": 1087,
        "activeRevisionId": 844,
        "revisionIds": [
            844
        ],
        "lastActiveUserId": 112,
        "lastActiveDate": 1549550236000,
        "attachments": [],
        "childrenIds": [],
        "commentIds": [],
        "marked": false,
        "topics": [
            {
                "id": 630,
                "creationDate": 1547066772000,
                "creationDateFormatted": "01/09/2019 08:46 PM",
                "name": "testing",
                "author": {
                    "id": 43,
                    "username": "Tom.Pryce",
                    "reputation": 0
                },
                "usedCount": 6,
                "getImmediateChildren": [],
                "getParents": []
            }
        ],
        "primaryContainerId": 11,
        "containerIds": [
            11,
            7
        ],
        "slug": "can-i-cancel-my-own-question",
        "wiki": false,
        "score": 0,
        "depth": 0,
        "viewCount": 2,
        "upVoteCount": 0,
        "downVoteCount": 0,
        "nodeStates": [
            "closed"
        ]
    },
    "rootNode": {
        "id": 842,
        "type": "question",
        "creationDate": 1549550236000,
        "creationDateFormatted": "02/07/2019 02:37 PM",
        "title": "Can I cancel my own question?",
        "body": "<div class=\"fr-view clearfix\"><p>There is a permission to control this.</p></div>",
        "bodyAsHTML": "<div class=\"fr-view clearfix\"><p>There is a permission to control this.</p></div>",
        "author": {
            "id": 112,
            "username": "ricks",
            "reputation": 1
        },
        "lastEditedAction": 1087,
        "activeRevisionId": 844,
        "revisionIds": [
            844
        ],
        "lastActiveUserId": 112,
        "lastActiveDate": 1549550236000,
        "attachments": [],
        "childrenIds": [],
        "commentIds": [],
        "marked": false,
        "topics": [
            {
                "id": 630,
                "creationDate": 1547066772000,
                "creationDateFormatted": "01/09/2019 08:46 PM",
                "name": "testing",
                "author": {
                    "id": 43,
                    "username": "Tom.Pryce",
                    "reputation": 0
                },
                "usedCount": 6,
                "getImmediateChildren": [],
                "getParents": []
            }
        ],
        "primaryContainerId": 11,
        "containerIds": [
            11,
            7
        ],
        "slug": "can-i-cancel-my-own-question",
        "wiki": false,
        "score": 0,
        "depth": 0,
        "viewCount": 2,
        "upVoteCount": 0,
        "downVoteCount": 0,
        "nodeStates": [
            "closed"
        ]
    },
    "topics": [
        {
            "id": 630,
            "creationDate": 1547066772000,
            "creationDateFormatted": "01/09/2019 08:46 PM",
            "name": "testing",
            "author": {
                "id": 43,
                "username": "Tom.Pryce",
                "reputation": 0
            },
            "usedCount": 6,
            "getImmediateChildren": [],
            "getParents": []
        }
    ]
}
Language
Authentication
Basic
base64
:
Click Try It! to start a request and see the response here!