19 comments
Official comment

Hello Mitko,

There are no public docs at the moment, but we are looking forward to publishing them.

Thank you Sergey Kochetkov - does that mean that the API exists, but it is just not documented yet? 

0

Hello Mitko,

 

Yes, you are correct.

0

Do you have any timeline for publishing the docs?

0

Hi!

I'm Sergey from the Youtrack team.

This is on our short-term list and we plan to start working on it in the near future, though I'm afraid, there's no exact timeline for it. Please stay tuned for further updates. 

0

Here's the REST API for articles:

"https://example.myjetbrains.com/youtrack/api/articles?fields=id,summary,project(name),content"

It gets the articles for all projects gives a JSON with the ID of article, summary(title) of article, contents of that respective article and the name of the project they are in. Also replace "example" with your YT url.

 

And if you want the articles of a certain project the API is:

"https://example.myjetbrains.com/youtrack/api/admin/projects/<project_id>/articles?fields=id,summary,content"

Where you have to replace project_id with the ID of the project whose articles you want.

0

Thank you for sharing this.

One can always find the API endpoints in the browser's network requests, as Youtrack's frontend calls them. However, generally, we don't recommend relying on them unless they are officially documented, as non-documented APIs can be subject to change. 

0

Thanks for the suggestion Sergey. Also is there a way I can help out in updating the documentation.

0

We should be good. Thank you very much for your offer, though. We really appreciate it! 

0

Hi, i'm using the REST API suggested by Nirajnandish.

Are there other fields available besides id, summary and content?

Also I would need to get the document tree in the left column

If you can help me I would be very grateful

In any case, are you going to publish official documentation on the rest api for the knowledge base?

Thanks

0

Ok I solved by myself finding them in the network requests as suggested by Sergey Merzlov. I leave here the fields that I am using in case they are useful to someone else

articles?fields=id,summary,content,parentArticle(id),ordinal

0

Thanks for the update. Glad to hear you found the supported fields in the network requests. That's currently the way to go until official documentation is published. 

In any case, are you going to publish official documentation on the rest api for the knowledge base?

We surely are, though no timetable for this yet, I'm afraid. I may also suggest following our blog where we post all the major Youtrack updates so that you won't miss it.

0

I have a quick question about creating articles.  I'm able to view/list articles based on the methods and approaches above but is it possible currently to create an article using a POST call?  I don't think that's something I can use the network requests to identify

0

Hi! 

It's also available in the network requests when you create a new article. You need to send a POST request to youtrack/api/articles. Here's the sample request body with a minimum amount of data:

{
"project": {
"shortName": "FRONTEND"
},
"summary": "This is my title",
"content": "This is my body"
}
0

That's great - thanks!

0

Just in case, the related documentation was published a while ago and is available at https://www.jetbrains.com/help/youtrack/devportal/resource-api-articles.html 

-1

Volkov A

I have fixed the link, please check it now.

1

Please sign in to leave a comment.