addonscript-spec/docs/api/features/addons.md
Timo Ley 38997a8984
All checks were successful
continuous-integration/drone/push Build is passing
Remove namespaces endpoint from addons feature
will be part of another api feature in the future
2022-09-29 14:23:31 +02:00

40 lines
1.4 KiB
Markdown

# Addon repository
## Endpoints
### Get addon
`GET {base URL}/v2/addons/:namespace/:addon`
This endpoint can be used to retrieve information about a specific addon,
including metadata, all available versions and the [canonical namespace](../../concepts/namespaces.md#canonical-namespaces)
of the addon.
#### Path variales:
- `namespace`: The [namespace](../../concepts/namespaces.md#repository-namespaces) of a repository which contains the addon
- `addon`: The ID of the addon
#### Responses:
- `200 OK`: The addon is available in this addon repository.
The response body MUST be an [API Addon Object](../../schema/api_addon.md).
- `404 Not Found`: The addon is not available in this addon repository.
### Get addon manifest
`GET {base URL}/v2/addons/:namespace/:addon/:version`
This endpoint can be used to retrieve the manifest of a specific version of an addon.
#### Path variables:
- `namespace`: The [namespace](../../concepts/namespaces.md#repository-namespaces) of a repository which contains the addon
- `addon`: The ID of the addon
- `version`: The [version number](../../concepts/versioning.md) of the requested version
#### Responses:
- `200 OK`: This version of the addon is available in this addon repository.
The response body MUST be an [Addon Manifest](../../schema/manifest.md).
- `404 Not Found`: This version of the addon is not available in this addon repository.