mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 09:23:52 -05:00
Compilers API changes (#2170)
* dont return all compilerproperties always in /api/compilers * fields=all ipv ?all * use fields=all with remote instances * add to documentation * cover more paths with tests
This commit is contained in:
12
docs/API.md
12
docs/API.md
@@ -24,6 +24,16 @@ Returns a list of compilers. In text form, there's a simple formatting of the
|
||||
information is returned as an array of compilers, with the `id` key being the
|
||||
primary identifier of each compiler.
|
||||
|
||||
Due to the amount of compilers and information available through this api call,
|
||||
by default you will only get these fields per compiler:
|
||||
`['id', 'name', 'lang', 'compilerType', 'semver', 'extensions', 'monaco']`
|
||||
|
||||
If you require different fields, you can specify them by adding `?fields=field1,field2,field3`
|
||||
to your query.
|
||||
|
||||
To see all the available fields, you can use `?fields=all`. It is not recommended
|
||||
to use this by default.
|
||||
|
||||
### `GET /api/compilers/<language-id>` - return a list of compilers with matching language
|
||||
|
||||
Returns a list of compilers for the provided language id. In text form,
|
||||
@@ -31,6 +41,8 @@ Returns a list of compilers for the provided language id. In text form,
|
||||
language ID. In JSON, all the information is returned as an array of compilers,
|
||||
with the `id` key being the primary identifier of each compiler.
|
||||
|
||||
The same field restrictions apply as with `GET /api/compilers`
|
||||
|
||||
### `GET /api/libraries/<language-id>` - return a list of libraries available with for a language
|
||||
|
||||
Returns a list of libraries and library versions available for the provided language id.
|
||||
|
||||
Reference in New Issue
Block a user