Planview AgilePlace (Leankit) API (RESTful JSON)

19 views (last 30 days)
Hi,
I am a Leankit user. I am trying to access my boards and cards via a Matlab script.
The Leankit documentation states:
Our RESTful API allows you to programmatically leverage the power of AgilePlace. All APIs use https and are based at https://<yourhostname>.leankit.com/io/. Our APIs use standard http authentication, response codes, and verbs. Data is sent and received as JSON unless specified otherwise.
I understand I should be able to access the API with the "webread" function.
data = webread(url)
  • I am not sure what url I should enter here exactly (it must be something like "https://<yourhostname>.leankit.com/io/").
  • I believe I have to generate a token. I tried to enter it by doing as follow:
opt = weboptions('KeyName','token','KeyValue','myTokenHere');
data = webread(url,opt)
In the options, there are also a Username and Password fields. Do I need to edit those? If yes, do I need to enter my Leankit logins (I find it strange to enter my password unhidden...)
Finally, the next step would be to access the different "fields" (boardLevel, card, etc).
I am thankful for any tip.
Paul
  1 Comment
Paul
Paul on 15 Aug 2023
Update:
I am now able to get access to a board's information.
apiToken = 'myTokenHere';
apiEndpoint = 'https://<MyHostName>.leankit.com/io/board/<#MyBoardNumber#>';
options = weboptions('HeaderFields', {'Authorization', ['Bearer ' apiToken]});
response = webread(apiEndpoint, options);
The response is a structure with 48 fields (title, users, tags, cardTypes, lanes, laneTypes, etc.).
I am now trying to find out how to get all the cards within a board of interest.

Sign in to comment.

Accepted Answer

Paul
Paul on 16 Aug 2023
I was able to do what I was looking for.
Here is what I had to do:
apiEndpoint='https://<HOSTNAME>.leankit.com/io/card?board=<BOARDID>';
options = weboptions('HeaderFields', {'Accept','application/json' ; 'Authorization', ['Bearer ' <apiToken>]});
response = webread(apiEndpoint, options);
The result is a structure variable with all the card fields I was expecting (id, index, version, title, size, etc).

More Answers (0)

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!