Import a bundle; with dryRun only the plan is returned (desk:admin)
POST /api/desk/v1/bundle
Module: Desk · operationId: importBundle · Tag: Configuration · Auth: access token (Authorization: Bearer <accessToken>)
Request body
application/json (required)
bundle(Bundle): Portable configuration (format desk.config/v1). All references use keys: types name their workflow key, spaces their type keys, labels their space key, categories their path of names, layouts "cf.".format(string, required): Format of the bundle (one ofdesk.config/v1)categories(array of object): Categoriesdescription(string): Description of the bundleenums(object): Value lists by kindfields(array of object): Custom fieldskey(string): Key of the bundle (templates)labels(array of object): Labelsmatrix(object): Priority matrix (impact × urgency)name(string): Name of the bundleprefix(string): Suggested prefix for conflicting keyspriorities(array of object): PrioritiesprojectTemplates(array of object): Project templates: type is the project type key; blueprint tasks name their typeId by type key, blueprint fields are keyed by field keyprojectTypes(array of object): Project types: workflow, taskSpace and taskType are keys, layout "cf.", billing as in the project type settingsspaces(array of object): Spacesteams(array of object): Teamstypes(array of object): Item typesworkflows(array of object): Workflows
dryRun(boolean): Only return the plan, change nothingprefix(string): Up to 8 lower-case letters/digits for conflicting keys; default: the bundle suggestion
Example:
{
"bundle": {
"categories": [
{
"path": [
"Netzwerk",
"WLAN"
]
}
],
"format": "desk.config/v1",
"key": "muster-it",
"labels": [
{
"color": "warning",
"name": "vor-ort"
}
],
"name": "Konfiguration Muster IT"
},
"dryRun": true,
"prefix": "imp"
}
Responses
- 200 Result or plan (
application/json) - 409
in_use: the imported configuration would make a mail source, route, AI candidate, portal form or platform feedback kind deliver into a work type or a space with only work types (application/json)
Fields of the 200 answer:
changes(array of object): What the import does (or did) per entryaction(string): created: new; reused: an equal entry exists; renamed: created under another key (as) (one ofcreated,reused,renamed)as(string): Key the entry was created under (renamed)key(string): Key of the entry in the bundlekind(string): Kind of configuration entry (workflow, type, field, space, …)name(string): The name or label of the entry, when it has one
dryRun(boolean): Only the plan: nothing was changed
Example 200 answer:
{
"changes": [
{
"action": "reused",
"key": "service",
"kind": "workflow",
"name": "Service"
},
{
"action": "reused",
"key": "stoerung",
"kind": "type",
"name": "Störung"
},
{
"action": "reused",
"key": "SUP",
"kind": "space",
"name": "Support"
},
{
"action": "created",
"key": "projekt",
"kind": "workflow",
"name": "Projekt"
},
{
"action": "created",
"key": "PRJ",
"kind": "space",
"name": "Kundenprojekte"
},
{
"action": "created",
"key": "kundenprojekt",
"kind": "projectType",
"name": "Kundenprojekt"
},
{
"action": "created",
"key": "erp-einfuehrung",
"kind": "projectTemplate",
"name": "ERP-Einführung"
}
],
"dryRun": true
}
Example request
curl -X POST 'https://api.mbcom.cloud/api/desk/v1/bundle' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"bundle":{"categories":[{"path":["Netzwerk","WLAN"]}],"format":"desk.config/v1","key":"muster-it","labels":[{"color":"warning","name":"vor-ort"}],"name":"Konfiguration Muster IT"},"dryRun":true,"prefix":"imp"}'