I have more than 5000 repos showing stopped in my fisheye instance and i want to start all of them at once. Manually starting every single repo is impossible.
Please suggest a way to start all of them.
Regards,
Anurag Sharma
+91-8826185008
Hi Anurag,
You should be able to use the Fisheye REST API to do this programmatically.
Here's the specific endpoint you can use: https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:repositories:repository:start
Since there are so may repos, you might also want to use the following REST API endpoint to get a list of the repos: https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:repositories
In the event that you'd like to know if the repo is running prior to attempting to start it, you can use this REST API endpoint to get the status of the repo: https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:repositories-v1:repository
Here are examples of the REST calls you'll make in each scenario if you were to use cURL:
Start a repo
curl -vkS -u <fisheye_admin> -H "Content-Type: application/json" -X PUT "<base_URL>/rest-service-fecru/admin/repositories/{repository}/start"
Get a paged list of repos
curl -vkS -u <fisheye_admin> -H "Content-Type: application/json" -X GET "<base_URL>/rest-service-fecru/admin/repositories"
Get the status of a repo
curl -vkS -u <fisheye_admin> -H "Content-Type: application/json" -X GET "<base_URL>/rest-service-fecru/admin/repositories-v1/{repository}"
With respect to the examples listed above:
* Be sure to change <fisheye_admin> to the username of your fisheye user with admin privileges
* Be sure to change <base_URL> to the base URL of your Fisheye instance
* Be sure to change {repository} to the actual repo's name
The implementation of the full code you will use will depend on the language you choose to write it in. However, let us know if you have any issues making the REST API calls themselves and we'll help point you in the right direction.
I hope this information is helpful!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.