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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user