Published on InterSystems Developer Community (https://community.intersystems.com)

Home > CreateProperty with curl

Question
Tuan Minh Do · Oct 3, 2018

CreateProperty with curl

Hello,

I have a question about creating properties with curl.

I already did create properties in Java with the following command.

<DO db.%CreateProperty("TotalSteps","%Integer","$.TotalSteps")>

It created the property TotalSteps with the type %Integer and the data path $.TotalSteps (since the header of my data source is also TotalSteps).

Now I would like to create the same property in curl with the following command

<curl -i -X POST -H "Content-Type: application/json" http://localhost:53774/api/docdb/v1/namespaceName/prop/databaseName/ propertyName?type= propertyType& path= propertyPath& unique=propertyUnique>

Port: 52773

namespaceName: fitnessnamespace

databaseName: teststream

propertyName: TotalSteps

propertyType: %Integer

propertyPath: ???

I need to insert the propertyPath like I did in the java code with "$.TotalSteps". The header from my data source is also called Kalorien. So how can I insert the propertyPath since "$.TotalSteps" doesn't work in curl?

Thank you in advance :)

#Databases #SQL #Caché

Source URL:https://community.intersystems.com/post/createproperty-curl