Copy Topic

Overview

  • This API copies an existing topic (source topic) and its contents from its parent topic to another parent topic (destination topic). All the subtopics of the source topic get copied along with it.
  • If the source topic is being copied to become a top level topic, then the destination topic ID specified in the request body must equal -1 (as the top level topic does not have any parent).
  • If the destination topic already contains a topic with the same name as the source topic in any supported language, then created copy will be named "Copy of " in languages where the conflict occurred. If the client sends the same request again, then the new copy will be called "Copy (2) of ", where the count will be incremented on each subsequent request.

Permissions

  • The user must have 'Copy' action on 'Topic' resource.
  • The user sending the request should be from the same or shared department as the topic.

Preconditions

  • The destination topic ID must be different from the current parent topic ID.
  • The source and destination topics must belong to the same department. Copying of topic between different departments is not permitted.
  • If the destination topic ID is -1, the source topic, on successful copying, becomes a top level topic.
  • The source topic ID must not be Auto Generated Topic.
  • The destination topic ID must not be Auto Generated Topic.
SecurityoAuthUser
Request
path Parameters
ID
required
string

Topic ID

Examples:
202200000002268
Request Body schema: application/json
required
object (parentTopic)
required
object (language)
Responses
201

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

406

Not acceptable

409

Conflict

412

Preconditions failed

500

Internal server error

post/topics/{ID}/copy
Request samples
application/json
{
  • "parentTopic": {
    },
  • "language": {
    }
}
Response samples
application/json
{
  • "code": "400-101",
  • "developerMessage": "Unsupported query parameter(s) supplied: '<query_parameter>'."
}