Skip to main content
Version: 0.5.0

Swagger UI

Login

The API set forth in the TNLCM is as follows:

api

If it is the first time using the API it is necessary to create a user:

register

Once the user has been created or if it has been previously created, add the user and its password in the Basic Authorization section of the Authorize box:

basicAuthorizarion

Once the user has been added, an access token and its refresh token can be generated. This access token has a duration of one day (can be modified):

login

The next step is to add the token in the green Authorize box. It is required to put the word Bearer, a space and then the token. An example is shown:

accessToken

Now, requests that involve having an access token can be made.

If the access token expires, it can be refreshed by using the refresh token. The token in the green Authorize box must be updated with the refresh token and the post request must be made:

refreshToken

When the request is made, it will return another access token that will need to be put back into the green Authorize box.

Create trial network

Once logged into TNLCM, execute the POST request of the trial-network namespace:

createTN

Fill in the following fields:

  • tn_id: must start with a character and be at least 4 characters long. This field can be left blank, in which case a random value will be generated.
  • descriptor: descriptor file containing the definition of the trial network. To create a descriptor file, refer to the Trial Network Descriptor Schema section.
  • library_reference_type: you can specify a branch, tag, or commit of the 6G-Library repository.
  • library_reference_value: value corresponding to the type specified in the library_reference_type field.
  • sites_branch: must be one of the branches available in the 6G-Sandbox-Sites repository.
  • deployment_site: must be one directory of the sites_branch specified.
  • deployment_site_token: token to decrypt the deployment site yaml file.
  • validate: if true, the descriptor file will be validated and required all the parameters to be filled in. If false, the descriptor file will not be validated and some parameters can be left blank.

Deploy trial network

Once logged into TNLCM and the trial network has been created, execute the PUT request of the trial-network namespace:

deployTN

Fill in the following fields:

  • jenkins_deploy_pipeline: if nothing is specified, a pipeline will be created inside the TNLCM folder in Jenkins with the name TN_DEPLOY_<tn_id>. If specified, it will be checked if it exists in Jenkins and that there is nothing queued to execute.
  • tn_id: the identifier of the trial network received in the POST request.

Destroy trial network

Once logged into TNLCM, the trial network has been created and the trial network has been deployed, execute the DELETE request to destroy a trial network:

destroyTN

Fill in the following fields:

  • jenkins_destroy_pipeline: if nothing is specified, a pipeline will be created inside TNLCM folder in Jenkins with the name TN_DESTROY_<tn_id>. If specified, it will be checked if it exists in Jenkins and that there is nothing queued to execute.
  • tn_id: the identifier of the trial network received in the POST request.

Purge trial network

Once logged into TNLCM, the trial network has been created, deployed and destroyed, execute the DELETE request to purge a trial network:

purgeTN

Fill in the following fields:

  • tn_id: the identifier of the trial network received in the POST request.