# \#contentservice

**URL:** https://community.developer.atlassian.com/tag/contentservice/216.md

[Latest](https://community.developer.atlassian.com/latest.md) · [Categories](https://community.developer.atlassian.com/categories.md) · [Tags](https://community.developer.atlassian.com/tags.md)

---

## [Create a comment with custom properties via Java API](https://community.developer.atlassian.com/t/create-a-comment-with-custom-properties-via-java-api/58451)

<div class="topic-metadata">

**Author:** [@tova.pozen](https://community.developer.atlassian.com/u/tova.pozen)\
**Replies:** 2\
**Last updated:** [June 25, 2025, 8:32am UTC](https://community.developer.atlassian.com/t/create-a-comment-with-custom-properties-via-java-api/58451 "2025-06-25T08:32:10Z")

</div>

I want to create a comment with custom properties via the Confluence Java API (in a Rest endpoint I am exposing by a Confluence plugin). My code is as following: Content commentedPage = contentService.find(new …

---

## [Get content with ContentService fails](https://community.developer.atlassian.com/t/get-content-with-contentservice-fails/14371)

<div class="topic-metadata">

**Author:** [@ttwellmann](https://community.developer.atlassian.com/u/ttwellmann)\
**Replies:** 2\
**Last updated:** [January 3, 2024, 1:51pm UTC](https://community.developer.atlassian.com/t/get-content-with-contentservice-fails/14371 "2024-01-03T13:51:23Z")

</div>

Hi, I want to store a JsonContentProperty with a page. In order to use the corresponding builder, I need the content object of the page. I am using Content pageContent = contentService.find().withId(page.getContentEnti…

---

## [Full example for using ContentPropertyService to store JsonContentProperty with page](https://community.developer.atlassian.com/t/full-example-for-using-contentpropertyservice-to-store-jsoncontentproperty-with-page/14370)

<div class="topic-metadata">

**Author:** [@ttwellmann](https://community.developer.atlassian.com/u/ttwellmann)\
**Replies:** 5\
**Last updated:** [March 23, 2023, 6:55am UTC](https://community.developer.atlassian.com/t/full-example-for-using-contentpropertyservice-to-store-jsoncontentproperty-with-page/14370 "2023-03-23T06:55:33Z")

</div>

Hi, I am really struggling with using the ContentPropertyService for storing a JsonContentProperty with a page. Is there any example for writing and loading of a JsonContentProperty? Thanks Tuelle

---

## [Usage of "com.atlassian.confluence.api.service" in Atlassian Scheduler runJob](https://community.developer.atlassian.com/t/usage-of-com-atlassian-confluence-api-service-in-atlassian-scheduler-runjob/52418)

<div class="topic-metadata">

**Author:** [@abianche-boc](https://community.developer.atlassian.com/u/abianche-boc)\
**Replies:** 5\
**Last updated:** [April 5, 2022, 2:11pm UTC](https://community.developer.atlassian.com/t/usage-of-com-atlassian-confluence-api-service-in-atlassian-scheduler-runjob/52418 "2022-04-05T14:11:30Z")

</div>

Hi everyone! I am in the process of submitting an app for Data Center approval and it is required to remove deprecated APIs usage. I am making use of the “old” manager classes, such as PageManager, SpaceManager etc, an…

---

## [Set user profile using content service](https://community.developer.atlassian.com/t/set-user-profile-using-content-service/56157)

<div class="topic-metadata">

**Author:** [@NhanNguyen](https://community.developer.atlassian.com/u/NhanNguyen)\
**Replies:** 0\
**Last updated:** [February 23, 2022, 8:11am UTC](https://community.developer.atlassian.com/t/set-user-profile-using-content-service/56157 "2022-02-23T08:11:26Z")

</div>

I’m working on a confluence server app in which I need to set the user profile picture: AttachmentManager attachmentManager = ... PersonalInformation personalInformation = ... Attachment picture = attachmentManager.getA…

---

## [Cannot retrieve content using the Java API](https://community.developer.atlassian.com/t/cannot-retrieve-content-using-the-java-api/50200)

<div class="topic-metadata">

**Author:** [@RobertEgan](https://community.developer.atlassian.com/u/RobertEgan)\
**Replies:** 5\
**Last updated:** [January 14, 2022, 1:11pm UTC](https://community.developer.atlassian.com/t/cannot-retrieve-content-using-the-java-api/50200 "2022-01-14T13:11:48Z")

</div>

I have created a page, and found the page using Content content = contentService.find(expandAll()).withId(id).fetch().get(); where id is the ContentId and expandAll() returns an array of all Content.Expansions. I am no…

---

## [ContentService is unable to update content / page position](https://community.developer.atlassian.com/t/contentservice-is-unable-to-update-content-page-position/41227)

<div class="topic-metadata">

**Author:** [@FabianIngenhorst](https://community.developer.atlassian.com/u/FabianIngenhorst)\
**Replies:** 1\
**Last updated:** [June 15, 2021, 9:36am UTC](https://community.developer.atlassian.com/t/contentservice-is-unable-to-update-content-page-position/41227 "2021-06-15T09:36:04Z")

</div>

Hey, I am trying to programmatically update the position and title of an existing page. The idea was to use the ContentService to find and update the pages. I managed to update the title of an existing page with the fo…

---

## [Creating JsonContentProperties through Java API](https://community.developer.atlassian.com/t/creating-jsoncontentproperties-through-java-api/10210)

<div class="topic-metadata">

**Author:** [@christ.klinge](https://community.developer.atlassian.com/u/christ.klinge)\
**Replies:** 3\
**Last updated:** [November 17, 2017, 10:06am UTC](https://community.developer.atlassian.com/t/creating-jsoncontentproperties-through-java-api/10210 "2017-11-17T10:06:56Z")

</div>

Hi, I need to store ContentProperties on pages, which do not limit to being a single Long or String. Additionally, I’ll need to be able to search for these properties using CQL. I am aware of how to create this kind of …

---

## [ContentService usage](https://community.developer.atlassian.com/t/contentservice-usage/7220)

<div class="topic-metadata">

**Author:** [@srand](https://community.developer.atlassian.com/u/srand)\
**Replies:** 3\
**Last updated:** [August 10, 2017, 1:24pm UTC](https://community.developer.atlassian.com/t/contentservice-usage/7220 "2017-08-10T13:24:57Z")

</div>

Hey all, I am working on a script that will utilize the ContentService class. In particular, the streamDirectory() method. My usage is as follows: def repo = repositoryService.getById(1930) def callback = new Abs…
