Set definition key when creating deployment via REST API

Hello,

I’m creating a deployment with a DMN table via REST API.
It works. I’m providing the “deployment-name” as “contact” as described in the documentation (Camunda Platform REST API)

POST /engine-rest/deployment/create HTTP/1.1
Host: camunda-xxx.valuecare24.de
Authorization: Basic XXXXXXXXXXXX==
Cache-Control: no-cache
Postman-Token: da73edaf-9200-578a-39a4-018b8125d52e
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="deployment-name"

contact
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="enable-duplicate-filtering"

false
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="deploy-changed-only"

false
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="deployment-source"

contact.dmn
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="fileName"; filename=""
Content-Type:

Now the problem:
I cannot find a parameter in the documentation to define the Definition Key for my deployment. It ends up being set to “decision”, as you can see from the screenshot. This sounds like a generic default value to me. I want to set it to “contact”. Is there a way to achieve this?

PS: I don’t want to wrap the DMN table in a process application.

Thanks in advance and best regards

Steffen Brand

Hi Steffen,

You can define the definition key in the modeler’s advanced mode, see

Cheers,
Thorben

1 Like

Thanks a lot :smiley:
I was on a completely wrong path and wouldn’t have found this in a million years :slight_smile:

You’re welcome.

Some background: The highlighted field in the modeler is used to edit the ID of the decision table. The engine maps the ID in XML to the key of the deployed decision. Similarly, the engine interprets a BPMN process ID or CMMN case ID as defined in XML to the key attribute of the resulting process or case definition.

Hi - I think i figured it out by combing through web docs and online docs;

https://docs.camunda.org/get-started/dmn/model/

@thorben @Niall This is very helpful, however the current UI (year 2021) does not have this advanced feature. There is a DRD properties dialog for editing, but it does not seem to function in similar fashion. The xml capability is there as a tab on bottom left, but there are a lot of tags.

I just want to clearly set the ‘key’ in the Postman header: localhost:8080/engine-rest/decision-definition/key/Decision_1ayz1yn/evaluate

There appears to be no way i can find after much trying to change Decision_1ayz1yn to something more english-like (e.g.: ProvideBeverageRequest) … can you point me to a place in current manual that explains this please - we are very close to a demonstrating our telemetry MVP, and this is tripping me up ;-8

I think this was answered recently in another thread.

From your DMN table, go to “Edit DRD”
Then open the properties tab.
You can change the DRD ID from there, or by selecting the individual decision, you can change the Decision ID.

Thanks - I got this to work when I discovered clicking on the task changed the content of the properties tag.