Merge pull request #21975 from backstage/catalog-backend/add-location-by-entity-api

[CatalogBackend] Add API to get location by entity
This commit is contained in:
Rickard Dybeck
2024-01-29 09:22:11 -05:00
committed by GitHub
17 changed files with 467 additions and 3 deletions
+28
View File
@@ -474,6 +474,34 @@ Response type is JSON, on the form
]
```
### `GET /locations/{id}`
Gets a location by it's location ID.
Response type is JSON, on the form
```json
{
"id": "b9784c38-7118-472f-9e22-5638fc73bab0",
"target": "https://git.example.com/example-project/example-repository/blob/main/catalog-info.yaml",
"type": "url"
}
```
### `GET /locations/by-entity/{kind}/{namespace}/{name}`
Gets a location referring to a given entity.
Response type is JSON, on the form
```json
{
"id": "b9784c38-7118-472f-9e22-5638fc73bab0",
"target": "https://git.example.com/example-project/example-repository/blob/main/catalog-info.yaml",
"type": "url"
}
```
### `POST /locations`
Adds a location to be ingested by the catalog.