# Licensing API

The Product Licensing API exposes a set of endpoints for [License Management](https://help.sonatype.com/en/license-management.html "License Management").

## Get Installed License

Get details on the current installed license.

```
curl -X 'GET' \
  'https://{nexusHost}/service/rest/v1/system/license' \
  -H 'accept: application/json' \
  -u {username}:{password}
```

### [Example Response](https://help.sonatype.com/en/licensing-api.html\#example-response-162170_body)

```
{
  "contactEmail": "string",
  "contactCompany": "string",
  "contactName": "string",
  "effectiveDate": "2025-03-27T16:58:45.032Z",
  "expirationDate": "2025-03-27T16:58:45.032Z",
  "licenseType": "string",
  "licensedUsers": "string",
  "fingerprint": "string",
  "features": "string",
  "maxRepoComponents": 0,
  "maxRepoRequests": 0
}
```

## Install a License

Install the license using the Licensing REST API. The Swagger UI does not allow for installing a license file.

```
POST /service/rest/v1/system/license
```

Example Request

```
curl -v -X 'POST' \
  'https://{nexusHost}/service/rest/v1/system/license' \
  -H 'Content-Type: application/octet-stream' \
  -H 'Accept: application/json' \
  -u {username}:{password} \
  --data-binary @/absolute/path/to/license.lic
```

## Uninstall a License

Uninstall the license using the Licensing REST API

```
DELETE /service/rest/v1/system/license
```

Example Request

```
curl -X 'DELETE' \
  'https://{nexusHost}/service/rest/v1/system/license' \
  -H 'accept: application/json' \
  -u {username}:{password}
```

## Search results

No results found
