Skip to content

Create a custom license

Request

Creates a custom license

Security
bearerAuth
Bodyapplication/jsonrequired

To create a custom license the name, shortName and licenseText is required.
Only users with Library Manager permission can create custom licenses.
Allowable values for familyName(Optional) are:
GNU LGPL 2.1 Style | Artistic License 1.0 Style | Proprietary Style | BSD 3-Clause Style | Apache 1.1 Style | CPL 1.0 Style | MIT Style | Public Domain Style | MPL 1.1 Style | MPL 1.0 Style | Academic Free License Style | Apache 2.0 Style | Sleepycat Style | EPL 1.0 Style | CDDL 1.0 Style | Commercial Style | GNU GPL 3 Style | GNU LGPL 2.0 Style | GNU LGPL 3.0 Style | GNU AGPL 3.0 Style | Ambiguous License Style | GNU GPL 2 Style | Artistic License 2.0 Style | BSD 2-Clause Style | GNU GPL 2 w/CPE Style | CDDL 1.1 Style | Apache 1.0 Style | BSD 4-Clause Style | GNU GPL 2+ Style | GNU GPL 3+ Style | GNU LGPL 2.1+ Style | GNU LGPL 3.0+ Style | GNU LGPL 2.0+ Style | MirOS Style | zlib Style | GNU GPL Style | GNU LGPL Style | GNU AGPL 3.0+ Style

namestring, [ 0 .. 127 ] characters

name

Example:"General Public License"
shortNamestring, [ 0 .. 255 ] characters

shortName

Example:"GPL"
licenseTextstring, [ 0 .. 16777215 ] characters

licenseText

Example:"License Text"
prioritystringP1|P2|P3

priority

Enum:"P1""P2""P3"
Example:"E.g. P1 | P2 | P3 | default: P3"
urlstring, [ 0 .. 2400 ] characters(^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2...

url

Example:"https://abc.xyz"
descriptionstring, [ 0 .. 65535 ] characters

description

Example:"License description"
familyNamestring

familyName

Example:"License family"
externalIdstring

externalId

Example:"External License Id Eg: 156"
curl -i -X POST \
  https://codeinsightapi.redocly.app/_mock/swagger/licenses \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "General Public License",
    "shortName": "GPL",
    "licenseText": "License Text",
    "priority": "E.g. P1 | P2 | P3 | default: P3",
    "url": "https://abc.xyz",
    "description": "License description",
    "familyName": "License family",
    "externalId": "External License Id Eg: 156"
  }'

Responses

Created