Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Highlighted
cesaraccardi
Valued Contributor

Re: QRS API - updating users custom properties

Thanks for sharing that Toni, I will start using the modifiedDate from QRS from now on.

Not applicable

Re: QRS API - updating users custom properties

Hello Cesar,

I have been wrestling with the same problem for days. Your approach gave me great hints!

I think basically if we need to do any POST requests with QRS API, we need the modifiedDate field in the data model.

Thanks a lot!

Mengyi

cesaraccardi
Valued Contributor

Re: QRS API - updating users custom properties

Hi Yuan,

I am glad to see that this post has proven to be helpful to you, wish you luck on your implementation!

Cheers,

Cesar

mbj
Contributor

Re: QRS API - updating users custom properties

hey guys, great discussion.

I created a little example to help others

```

createCustomProperty('testBies', [1, 2]);

export function createCustomProperty(name, choiceValues = ['no values initialized']) {

   var customProperty = {

   "name": name,

   "valueType": "Text",

   "objectTypes": ["App", "ContentLibrary", "DataConnection", "ReloadTask", "Stream", "User"],

   "choiceValues": choiceValues

  }

   var result = qrs.post('/qrs/CustomPropertyDefinition', null, customProperty)

   console.log('result of create custom property: ', result)


   result.name = 'UpdatedName';

   var result = qrs.put('/qrs/CustomPropertyDefinition/' + result.id, null, result)

   console.log('result after update', result)

}

```

PS: You can find a lot of API documentation in the slide generator on http://integration.qlik.com/slides

balrajahlawat
Esteemed Contributor

Re: QRS API - updating users custom properties

Hey Cesar,

Can we fetch User wise assigned custom properties from Qliksense Server using QRS API?

You can look into this which I have posted:

Custom Properties for Users using QRS API's

Pls Suggest.

Regards,

Balraj Ahlawat

bekahbeets2003
Contributor

Re: QRS API - updating users custom properties

I am getting either a 409 or a 400 exception when I run the following PUT command. I mainly get a "Received error code: 400::The "GetAllByMany" operation failed" error.

What is weird is I get a response with the apps data when I comment out the customProperties attribute. When i add in the customproperties attribute and json, i get the error.

 

Put('/app/' + appId,
{

"modifiedDate": lastModifiedDate, 
"modifiedByUserName": "instance////un",
"customProperties": [
{
"modifiedDate": lastModifiedDate,
"modifiedByUserName":  "instance////un",
"value": 'Node C'
}
] 
},
'json'

  

Community Browser