Copy plan

Copy a plan. Set option to new_plan to create new plans from it (provide plan, including a preview list from POST /api/plans/preview), existing_plans to copy its content into the plans listed in plans (set template to this plan's id), or template to save it as a reusable plan template named name. The include flags control which content is copied. Returns the id and name of the first plan or template created.

Required permission: Full Write Service Plans

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int32
required
≥ 1

The id of the plan to copy

Body Params

What to copy and where to

string | null
required

What to copy the plan into: "new_plan" creates new plans from it, "existing_plans" copies its content into the plans listed in plans, and "template" saves it as a reusable plan template.

template
object | null

The plan or template whose content is copied, when the option is "existing_plans". Send the id of the plan being copied.

include
object | null

Which of the plan's content to copy.

teams
array of objects | null

The teams (groups) to copy, by id. Only used when teams are included.

teams
plans
array of objects | null

The plans to copy the content into, by id, when the option is "existing_plans".

plans
string | null

The name of the new plan template, when the option is "template".

plan
object | null

The details of the new plans, when the option is "new_plan". Include a preview list computed by POST /api/plans/preview. Also provides the service type when the option is "template".

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json