Extended Properties

Version 2

    What is it?

    • Extended properties allows integration partners to store data within Jive instance. This data is stored in the form of key / value pair and associated with Jive objects. The data can be persisted / accessed through JS or REST APIs. The data is partitioned by app or add-on to make sure that data created by one app / add-on is not shared with other. As of today following Jive objects support extended properties - Person, Content & Places.
    • On top of Object level extended properties, Jive also supports system level extended properties. They are exactly very similar to regular system properties, except they are stored at system level and not associated with any particular Jive object.
    • One more variation of extended properties is private properties. The Person object support private properties, which only the current user can access. That means properties created using User A's creds are not accessible by REST or JS calls made using User B's creds.

     

    What are the common use cases?

    • Storing 3rd party credentials (for e.g. OAuth token) of the jive user
    • Adding custom properties to Jive objects
    • Storing 3rd party information within Jive instance

     

    How do I use it?

    • Make JS or REST API calls to get/set properties [Pointer to JS and REST API Docs]

     

    Show me an example?

    [Pointer to JS and REST API Docs]

    • Creating / Saving Extended Properties to Person
    //Load Person Object
    osapi.jive.corev3.people.get({
        id: "@me",
        fields: "emails,name"
    }).execute(function (currentUser) {
        //Save Extended Properties
        currentUser.createExtProps({
            "prop1": "val1"
        }).execute(function (resp) {});
    });
    


    • Reading Extended Properties
    //Load Person Object
    osapi.jive.corev3.people.get({
        id: "@me",
        fields: "emails,name"
    }).execute(function (currentUser) {
            //Save Extended Properties
            currentUser.getExtProps().execute(function (resp) {
                //resp.content should return properties});
            });
    

    • Creating / Saving System Extended Properties
    osapi.jive.corev3.systemExtProps.create({
        "prop1": "val1",
        "prop2": "val2"
    }).execute(function (resp) {});
    

     

     

    • Reading System Extended properties
    osapi.jive.corev3.systemExtProps.get({}).execute(function (resp) {
        //resp.content should return properties map
    });
    

     

     

    • Creating / Saving Private Properties
    osapi.jive.corev3.people.savePrivateProps({
        "prop1": "val1"
    }, {
        'personID': '@me'
    }).execute(function (resp) {});
    

     

     

    • Reading Private Properties
    osapi.jive.corev3.people.getPrivateProps({
        'personID': '@me'
    }).execute(function (resp) {
        //resp.content should return properties map
    });
    

     

    References & Further Reading