Login

Register

Login

Register

#cybersecurity | #hackerspace |

Four Steps to Get Started with Nexus Repository Using New REST APIs


Nexus Repository Manager (NXRM) has new supported REST API endpoints that can automate your binary management needs. REST APIs allow clients to interact with an application, providing them with the capabilities of retrieving and transforming application data. NXRM endpoints make it possible to automate and seamlessly integrate with your tools and CI/CD pipeline.

A number of programming languages can be used to interact with NXRM. In the examples below we will be using the command line tool cURL in addition to the Groovy programming language. In this tutorial we will show you how to quickly get setup with NXRM by using its API endpoints to create a user, a repo, and user permissions.

Create a Blobstore

1st. Create a blobstore. This is the blobstore that we will be associating with our new repo.

Curl:

Create a Repository

2nd. We will need to create our repository and we will be using Groovy to accomplish this.

i) Create JSON file mavenScript.json. Here we are creating a script called “mavenRepo” which will create a hosted repository titled “ny-maven-internal”:

Post Script to NXRM

ii) Post this as a script to NXRM:

Run the Script on NXRM

iii) Run this script on NXRM to create the repo:

Create a Role

3rd. We need to create a role so that this can later be assigned to our new user. This role grants read and write permissions on repo ny-maven-internal.

Curl:

Create a User

4th. Create User. In this step we will assign this user the ny-dev-role we created in step 1.

Curl:

That’s it! In four steps you have created a user that has read/write access to their team’s new repository.

You can view the full list of supported APIs in the UI or in our documentation here. For additional scripts you may find our (Read more…)



Source link

">

Leave a Reply

Shqip Shqip አማርኛ አማርኛ العربية العربية English English Français Français Deutsch Deutsch Português Português Русский Русский Español Español

National Cyber Security Consulting App

 https://apps.apple.com/us/app/id1521390354

https://play.google.com/store/apps/details?id=nationalcybersecuritycom.wpapp


Ads

NATIONAL CYBER SECURITY RADIO

Ads

ALEXA “OPEN NATIONAL CYBER SECURITY RADIO”

National Cyber Security Radio (Podcast) is now available for Alexa.  If you don't have an Alexa device, you can download the Alexa App for free for Google and Apple devices.   

nationalcybersecurity.com

FREE
VIEW