Download Swagger specification
This API is for developers that want to add a plaintext license to their project but don't want to manually search the web for a copy.
All API requests are GET
requests and all responses are strings to make consuming the API via terminal or console simple.
This API and its source code are licensed under the MIT License.
Returns a list of available endpoints.
cURL
curl http://licenses.humboldtapps.com/api/
PowerShell
Invoke-WebRequest 'http://licenses.humboldtapps.com/api/' | Select-Object -Expand Content
Example:
===============================================================
Available Endpoints
===============================================================
Endpoint: /api/
Description: List all available endpoints
-
Endpoint: /api/list
Description: List all available open source licenses by id
===============================================================
Example:
ERROR - Endpoint list not found! Contact the site administrator if the problem persists.
Returns a list of all available license IDs. Limited to 5 licenses per row for readability.
cURL
curl http://licenses.humboldtapps.com/api/list
PowerShell
Invoke-WebRequest 'http://licenses.humboldtapps.com/api/list' | Select-Object -Expand Content
Example:
gpl-2.0, gpl-3.0, isc
Example:
ERROR - License database not found! Contact the site administrator if the problem persists.
Returns a detailed list of available licenses.
cURL
curl http://licenses.humboldtapps.com/api/list/full
PowerShell
Invoke-WebRequest 'http://licenses.humboldtapps.com/api/list/full' | Select-Object -Expand Content
Example:
gpl-2.0 GNU General Public License v2.0
gpl-3.0 GNU General Public License v3.0
isc
Example:
ERROR - License database not found! Contact the site administrator if the problem persists.
Returns a single license using its ID.
parameter | type | description | required |
---|---|---|---|
license | string | The name of the license to retrieve. | yes |
cURL
curl http://licenses.humboldtapps.com/api/{license}
PowerShell
Invoke-WebRequest 'http://licenses.humboldtapps.com/api/{license}' | Select-Object -Expand Content
Example:
ISC License
Copyright (c) [year], [fullname]
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice appear
in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Example:
ERROR - NonExistentLicense is undefined. Use the 'list' endpoint to see defined licenses.