Import using Swagger
Currently, you need to execute this endpoint twice (6/c): /repository/scenario/import
We are working on the scenario import to only have to do it once in the same way as how you need to execute only once every other endpoint also and not twice.
For the prerequisites, please read the parent page first: https://jira-testifi.atlassian.net/wiki/spaces/CTF/pages/8850604037/Import+from+repository+to+CAST+GUI
Visit the Swagger page
In the “user-controller” section click on the “/login“ and click on the “Try it out“ button.
Depending on CAST:GUI uses the /login endpoint or /loginWithSSO endpoint, you have to get/fill out the payload differently:/login:
at the Authorization click on the tick right before the “Send empty value“
email: your email address/username - what you access to Jira with
jiraApiToken: your generated Jira token Log in and Set Credentials
jiraUrl: the URL for the Jira
token: this is true by default, but you should overwrite it to false
if you are using cloud - xrayClientId and xrayClientSecret: your xrayClientId and xrayClientSecret
if you are using server - xrayClientId and xrayClientSecret: can stay on the default value as “string“everything else can be “string“
click on the “Try it out“ button
/loginWithSSO:
since WEB-EAM Next is in it’s place:navigate to the CAST:GUI
navigate to the Credentials from the main menu on the home screen
get the browser’s inspector and click on the Network tab
click on the Save changes button
find the /loginWIthSSO endpoint and copy the payload from it
navigate back to the swagger page and insert the payload into the /loginWithSSO endpoint’s payload
click on the “Try it out“ button
If the response is 200, copy the jwt’s value from the response
important: jwt token is valid only once doing the import. If you want to check the import on the UI, and then continue the import then you need to generate a new jwt token for the “Authorization”Click on the Authorize button
to the Authorization first type the word “Bearer “ (with the space) and then insert the copied jwt token’s value - (Bearer with space and the jwt token), then click on Authorize button
important: if the JWT token expires or becomes invalid, e.g. due to a UI action, the user will have to repeat steps 3-4-5 to be able to start a new requestScroll up to the “git-controller“ section and open it
Repeat the steps in this order for all the 4 endpoints from the 7th step:
/repository/sui-page/import
/repository/building-block/import
/repository/scenario/import (because of the reason mentioned above, currently you need to execute this endpoint twice)
/repository/data/import
Select the endpoint that you want to Execute and click on the “Try it out“ button
fill up the json (explanation below)
click on the “Execute” button
if the response is 200 then the import is done
Explanation for the json at the gitImport:
branch: the name of the branch from which branch you’ll import (if the branch name is “feature/branch1” then the branch name will be “feature/branch1” and not just “branch1”)
password: this is the token that you generated for the repository Token generation for the repository
repoURL: when you want to clone the repo with HTTPS you can find this URL there and it should end with “.git”
skipSSLVerify: by default this is true, you don’t need to change on this
username: username for the repository (on BMW this is the QX)
projectKey: this is the project’s id https://jira-testifi.atlassian.net/wiki/spaces/CTF/pages/8983150593/How+to+find+project+s+id