Version 5

    Summary

    If you are interacting with Jive through the Jive v3 API system you may encounter a scenario where you reference a Jive place or piece of content using an ID and the results you get back are either incorrect or you receive a 404 error with a placeInvalidURI or contentMissing message.

     

    A possible cause for this type of error is when you use the wrong ID in the v3 API system.

     

    The v3 API system requires "Contents IDs" and "Place IDs", which are different from the standard IDs you may be familiar with when using the traditional front-end of Jive. These Contents and Place IDs are not the same as the "Group IDs" or "Document IDs".

     

    You will need to use the Jive v3 API system to get the correct ID for your content and places when you wish to look up these resources using the v3 API.

     

    Understanding the Different Types of IDs

     

    Content IDs

    When using Jive as an end user, you will see that each type of content has it's own unique ID, often shown in the URL.  For example, you may have a document at /docs/DOC-1001 and a poll at /polls/1001.

     

    When you want to reference these pieces of content through the v3 API system, you cannot fetch these resources by using the IDs from the content's URL pattern or the IDs seen in the admin console.

     

    Instead, for the API all content in Jive is gathered together and accessed under a single API end point of /contents/{content ID}. In the example above, both a document and a poll both have IDs of "1001", so a different content ID must be used since these IDs conflict with one another. You cannot access document 1001 by going to /contents/1001.  That ID may be used by both polls, documents, discussions, events, and the system does not know what type of content you are looking for.

     

    You will need to use the v3 API system to determine what the correct content ID is for your specific piece of content. This ID will likely not match the ID you see when you access the document, discussion, poll, etc from the front-end of Jive.

     

    This content ID is sometimes referred to as the browse ID, as it originates from the jivebrowsecnt table.

     

    Place IDs

    The same can be said for Places and their Place IDs.

     

    You may create a space that has a space ID of "1003" and social group with a group ID of "1003". This means that we cannot use this ID to reference these places, and instead we must use the Place ID.

     

    When interacting with places (Spaces, Groups, Projects, and Blogs) using the v3 API system, you can interact with all places under a single API end point of /places/{place ID}.

     

    The place ID is not the same as the space ID or the group ID. If you try to use the space ID or group ID instead of the place ID when using the v3 API you will likely get an error response like the following:

     

    {

    "error": {

    "code": "placeInvalidURI",

    "message": "Invalid place URI https://mytestsite/api/core/v3/places/1015",

    "status": 404

    }

    }

     

    This content ID is sometimes referred to as the browse ID, as it originates from the jivebrowsecntr table.

     

    How do I find the correct content ID or place ID for the v3 API?

    You will need to use the v3 API system to find the correct content ID or place ID.  There are two ways to quickly find the correct ID:

     

    Option 1: Using the Search filter

    The easiest way to find the correct content ID or place ID using the v3 API is to search for the resource.

     

    Example

    Social Group Name: Team Collaboration Group

    Social Group URL: https://mytestsite/groups/team-collaboration-group

    Social Group ID: 1015

     

    If I try to go to https://mytestsite/api/core/v3/places/1015 I will get an error, as 1015 is not the place ID

     

    {

    "error": {

    "code": "placeInvalidURI",

    "message": "Invalid place URI https://mytestsite/api/core/v3/places/1015",

    "status": 404

    }

    }

     

     

    To find the correct place ID for this social group, I can search for the group by its name using the following API call:

     

    https://mytestsite/api/core/v3/places?filter=search(Team%20Collaboration%20Group)

     

    To look up a place, you can use the following API end point: /api/core/v3/places?filter=search(<Place Name>)

    To look up content, you can use the following API end point: /api/core/v3/contents?filter=search(<Content Name>)

     

    With this API call I will get the API data back for the social group.  I can reference the resources.self.ref JSON element to find the exact API endpoint for this piece of content, or I can reference the placeID JSON element.

     

    In this example we learn that the social group has a placeID of 1165 and its API end point is https://mytestsite/api/core/v3/places/1165

     

    {

    "id": "1015",

    "resources": {

    "self": {

    "allowed": [

    "PUT",

    "DELETE",

    "GET"

    ],

    "ref": "https://mytestsite/api/core/v3/places/1165"

    },

    ...

    "followerCount": 1,

    "published": "2015-04-14T21:09:59.213+0000",

    "tags": [],

    "updated": "2015-04-14T21:10:16.144+0000",

    "iconCss": "jive-icon-group",

    "placeID": "1165",

    ...

     

     

    Option 2: Using the entityDescriptor filter

    An alternative to searching for the Jive resource by its name is to instead use the entityDescriptor filter.

     

    You will need two pieces of information for this method:

     

    • Jive Object Type
    • Jive Object ID

     

    To look up a place, you can use the following API end point: /api/core/v3/places?filter=entityDescriptor(<Object Type>,<Object ID>)

    To look up content, you can use the following API end point: /api/core/v3/contents?filter=entityDescriptor(<Object Type>,<Object ID>)

     

    Example 1 - Finding a Place

     

    To look up the API end point for a social group, we will need to know two things about the group: Object Type and Object ID.

     

    In this example the Object ID is the "group id", which is 1015. This is not the place ID.

    The Object Type for all social groups is 700

     

    Jive Object Type ID: 700

    Jive Object ID: 1015

     

     

    API call:

    https://mytestsite/api/core/v3/places?filter=entityDescriptor(700,1015)

     

     

    This returns the complete API data for that particular place, including the social group's place ID.

     

    Example 2 - Finding Content

     

    You can use the same method for looking up content.

     

    If we have a document with a URL of /docs/DOC-1001, the Object ID is 1001.

    The Object Type for all documents is 102

     

    Jive Object Type ID: 102

    Jive Object ID: 1001

     

    API call:

    https://mytestsite/api/core/v3/contents?filter=entityDescriptor(102,1001)

     

     

    This return the complete API data for that particular piece of content, including the document's content ID.

     

    How do I find the Object Type for content or place?

    Each different type of object in Jive has a unique object type ID.  For example, a social group has an Object Type of 700, and a document has an Object Type of 102.

     

    You will need to reference these Object Type IDs when using the entityDescriptor filter in the API.  You can reference a list of the most common object types below.

     

    If you need to reference an object type not in this list, you can see a complete list by querying the jiveobjecttype table in your Jive application database.

     

    Common Object Types

     

    -2 - systemcontainer

    1 - thread

    2 - message

    3 - user

    4 - group

    13 - attachment

    14 - community

    18 - poll

    20 - Private Message

    22 - announcement

    25 - Status Level jiveID counter

    26 - avatar

    37 - blog

    38 - blogpost

    40 - trackback

    41 - Tag

    48 - userstatus

    49 - user relationship

    73 - formattedtext

    102 - document

    105 - comment

    107 - Rating

    110 - binaryBody

    111 - image

    120 - documentversion

    129 - documentbackchannel

    370 - permissionlevel

    501 - profileimage

    600 - project

    602 - task

    604 - projectstatus

    700 - socialgroup

    701 - jiveSGroupMember MembershipID counter

    702 - privatesocialgroup

    800 - bookmark

    801 - external-site

    1200 - mobile

    2020 - usercontainer

    1100 - Video

    96891546 - Event

    535535779 - Photo Album

    1464927464 - Wall entry

    3227383 - Idea (ideation plugin)

    109400031 - Share

    1527402675 - CarouselContainerType

    106642994 - Photo

     

     

     

    jive-ask-a-question.png?a=145945776139