<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Thu, Feb 21, 2019 at 7:15 AM Cristian Morales Vega <<a href="mailto:christian.morales.vega@gmail.com">christian.morales.vega@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">We have lots of small independent projects instead of a few big ones<br>
(in general the small ones are not really subprojects of others). So I<br>
would like to script away the creation of projects in CDash. Can this<br>
be done?<br>
<br>
In <a href="https://public.kitware.com/Wiki/CDash:API#List" rel="noreferrer" target="_blank">https://public.kitware.com/Wiki/CDash:API#List</a> I see how to list<br>
projects, but no how to create them.<br></blockquote><div><br></div><div>Yes, this should be doable.</div><div><br></div><div>When you click the "Create Project" button, CDash sends a POST request to /api/v1/project.php. An example of the JSON payload for this request is attached.<br></div><div><br></div><div>In order to use this API endpoint you'll need to provide a bearer API token from a CDash user that has permission to create projects. You can create such a token on user.php after logging in. Include it in the header of your request like so:</div><div><br></div><div>"Authorization: Bearer <token>"</div></div></div></div></div>