Metadata - How to set it and use it?
Asked by Melissa C:

Hello Everyone,

Not sure i'm asking this question correctly. I want to be able to set the "metadata" to a number that will be supplied by the user when they import a word document into Conflucen. I will use that "metadata" in a REST API call.

Some backgroud - We currently write our documents in SharePoint and then Import them into Confluence. In SharePoint they have a Document ID # 123. Once imported into Confluence the users uses a usermacro to enter this number so that is displays in the parent page. Since the user is arealdy supplying this number, I would like to use it the metadata, but can't seem to figure out how to set it.

Thanks


Answers:
author: Tom Keidar
body: Hi [@Melissa C](/t5/user/viewprofilepage/user-id/474554)

<br />

Not sure my answer will help you but it worth giving it a try, recently we have launched a new app: [Metadata for Confluence Cloud](https://marketplace.atlassian.com/apps/1222027/metadata-for-confluence-cloud?utm_source=atlassian_community&utm_medium=comment&utm_campaign=labels_post)

using this app you can easily define custom metadata, assign it to your Confluence pages, and search accordingly.

We also support bulk metadata updating and searching.

I hope it could help and I'm here if you have any questions or requests.


author: Shawn Masters
body: Not quite the answer your looking for but we use labels on pages in the space, this works like meta for keyword searches and what not.

comments: author: Melissa C
body: Interesting! I was entered a "label" into a parent page and I was able to see it when I expanded the api results

"<https://Cofluence.com:8444/rest/api/content/6354677?expand=children.page,metadata.labels>"

Now I need to figure out a way to have the enter a label as part of my usermacro and then pass that label to the children.


author: Nic Brough -Adaptavist-
body: I would take a look at the user macro - could that be adjusted to make the data appear as metadata as well as what it shows now?

(p.s. there's a few things "metadata" might mean in Confluence, and I'm not sure which one you're talking about - is it from one of the metadata add-ons? Or something you see on the page properties, or something else?)

comments: author: Melissa C
body: Thanks Nic!

I created the User Macro on my own with very limited skills. It's it just stores the number. I'm not sure how to connect it to the "metadata" field that appears in the API.

I'm not using a Metadata add-on and won't be able to purchase one.

Melissa


author: Nic Brough -Adaptavist-
body: Ok, that makes sense, but it does not tell me what you mean by "metadata".

You've got a user macro that encourages your users to enter a document ID, and displays it for them in a nice way (I'm making assumptions here, hopefully good ones).

But what do you want from it? What is the "metadata" for?


author: Melissa C
body: Really Good Asuumptions! That's extactly what we are doing!

That doucment ID doesn't go anywhere right now. So the idea to use it as "metadata". I saw metadata in the expandable api. I thought we could store it there.

Shawn's comment (see next reply) gave me an idea I entered the document Id as a label and I was able to see in the expand api.


Tags: jira