Metadata - How to set it and use it? Edited

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

2 answers

0 votes

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?)

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

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?

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.  

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.

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. 

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 09, 2018 in Confluence

Introducing Praecipio Consulting, an Atlassian Solution Partner

Hey there Community!  My name is Vannya Vallejo, the Channel Communication Specialist at Atlassian and I want to help Atlassian users like you learn about our Solution Partners and how they c...

393 views 0 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you