Set up a use case using the API

Learn how to set up a use case for your repositories via the API.

The first time you visit the License view, you'll notice that the value in the risk column is set to Unknown for all licenses. This is because you have not yet configured any use cases for your repositories. You can select a use case through the API using the endpoint:


To do so, send a JSON containing a choice of the use case, e.g.:

"useCase": 2

Here, the useCase can be one of the following integers:

  • 0/null - Unknown

  • 1 - Non-distributed internal

  • 2 - Non-distributed public

  • 3 - Distributed generic

  • 4 - Distributed electronics

Here’s an example showing you how to set the use case to “Non-distributed public” for a repository with ID = 1337:

curl -X 'POST' \  '' \  -H 'accept: */*' \  -H 'Authorization: Bearer <token> \  -H 'Content-Type: application/json' \  -d '{ "useCase": 2 }'

Last updated