15 comments
Comment actions Permalink
Official comment

Hello Mitko,

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

Comment actions Permalink

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

0
Comment actions Permalink

Hello Mitko,

 

Yes, you are correct.

0
Comment actions Permalink

Do you have any timeline for publishing the docs?

0
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

That's great - thanks!

0

Please sign in to leave a comment.