cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to create a LINK in "Content" section using oData API?

0 Kudos

Hello Experts,

Potentially, we are going to integrate our Java web-application with some groups in JAM. So, it would be great if you could answer few question which appeared after reading JAM developers guide and trying JAM API "Try" feature in practice.

I have created developer's account in SAP HANA Cloud and created experimental group for testing the API using "Try" feature:

There are 3 PDF's on the screenshot above which I have successfully uploaded using [POST] /Groups('{id}')/ContentItems service URL. According to the documentation this service "Creates a blog entry, a page (wiki), a poll, or a tool, or uploads a document, in the specified Group". So, My first question is - isn't it possible to create the item of type LINK using this service like on the screen below? If this service is not correct could you please let me know which one should I use to achieve the goal?

The second question is - Is there a way to create the link not in just general Content folder, but rather in some sub-folder (e.g. in folder level1 on the screen)?

looking forward to your reply.

Accepted Solutions (1)

Accepted Solutions (1)

former_member47640
Active Contributor
0 Kudos

Hi Danylo,

the official IANA definition for a media of type "link" is this:

application/link-format

I'm not sure yet if Jam supports that specific content type but certainly you can try it out.

You won't be able to test this though through our API documentation but you will have to use a tool like Postman for this.

Official iana documentation which is also linked from our API documentation:

Media Types

0 Kudos

Hello Christian,

Thank you, I have tried to push content using application/link-format and it seems that JAM doesn't support it. The result is the binary file with unknown format:

BTW, do you know the answer on second question, by any chance? - How to push content under some specific directory?

Former Member
0 Kudos

Hi Danylo,

Regarding your second question, you can use the following API call to post content into a folder:

[POST] /Folders(Id='{Id}', FolderType='{FolderType}')/ContentItems

For example:

https://developer.sapjam.com/api/v1/OData/Folders(Id='qqoNmYVX1l6GylhwYlwbcq', FolderType='Folder')/ContentItems

Hope this helps.

0 Kudos

Thank you, James!

Former Member
0 Kudos

Danylo,

After some investigation, it appears that the the API doesn't currently support creating a Link content item type. What is your scenario/ business requirement for creating a link through the API?

Thanks!

Answers (0)