# License configuration

# Setup use-cases

Here, we show you how to set up a use case for your repositories. This will allow us to warn you if you are using dependencies (direct or indirect) with licenses that does not comply with your use case.

# Using the UI

The first time you visit the license view, you'll notice that all repositories will be set to "unkown" in the risk column.

License default

This is because you have not yet configured any use cases for your repositories. To do this, go to "Manage"->"Repositories and Commits". Under the column "Use case" you can click and select a use case for the specific repository. The license view will then be updated accordingly.

License use case

# Using the API

Endpoints:

  • /api/{version}/open/manage/repositories/{repositoryId}/select-use-case

We need to send JSON containing which use case we want to set, i.e.,

{
  "useCase": 2
}

where useCase may be one of the following integers: 0. Unknown (sending null also results in this use case)

  1. Non-distributed internal
  2. Non-distributed public
  3. Distributed generic
  4. Distributed electronics

Example: Here we set the use case to be "Non-distributed public" for the repository with ID 1337.

curl -X 'POST' \
  'https://debricked.com/api/1.0/open/manage/repositories/1337/select-use-case' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer <token> \
  -H 'Content-Type: application/json' \
  -d '{ "useCase": 2 }'