diff --git a/docs/features/software-catalog/api.md b/docs/features/software-catalog/api.md index d002b12015..ec699d2760 100644 --- a/docs/features/software-catalog/api.md +++ b/docs/features/software-catalog/api.md @@ -425,6 +425,10 @@ value. These are special in that they form the entity's unique The return type is JSON, as a single [`Entity`](descriptor-format.md), or a 404 error if there was no entity with that reference triplet. +### `GET /entities/by-name/{kind}/{namespace}/{name}/ancestry` + +Get an entity's ancestry by entity ref. + ### `POST /entities/by-refs` Gets a batch of entities by their entity refs. This is useful in contexts where @@ -456,6 +460,31 @@ where the `items` array has _the same length_ and _the same order_ as the input `entityRefs` array. Each element contains the corresponding entity data, or `null` if no entity existed in the catalog with that ref. +### `POST /refresh` + +Refresh the entity related to `entityRef`. + +Request body is JSON, on the form + +```json +{ + "entityRef": "" +} +``` + +### `POST /validate-entity` + +Validate that a passed in entity has no errors in schema. + +Request body is JSON, on the form + +```json +{ + "location": "", + "entity": {} +} +``` + ## Locations ### `GET /locations` @@ -504,6 +533,23 @@ Response type is JSON, on the form } ``` +### `GET /entity-facets?facet=&facet=&filter=&filter=` + +Get all entity facets that match the given filters. + +Response type is JSON, on the form + +```json +{ + "facets": [ + { + "value": "", + "count": 1 + } + ] +} +``` + ### `POST /locations` Adds a location to be ingested by the catalog. @@ -542,7 +588,59 @@ If the location already exists the response will be `HTTP/1.1 409 Conflict` and Supports the `?dryRun=true` query parameter, which will perform validation and not write anything to the database. In the event of successfully passing validation, the `entities` field of the response JSON will be populated with entities present in the location. -### `DELETE /locations/` +### `POST /analyze-location` + +Validate a given location. + +Request body is JSON, on the form + +```json +{ + "location": { + "type": "", + "target": "" + }, + "catalogFileName": "" +} +``` + +And Response type is JSON, on the form + +```json +{ + "generateEntities": [ + { + "fields": [ + { + "description": "", + "value": "", + "state": "needsUserInput", + "field": "" + }, + { + "description": "", + "value": {}, + "state": "analysisSuggestedNoValue", + "field": "" + } + ], + "entity": {} + } + ], + "existingEntityFiles": [ + { + "entity": "", + "isRegistered": "", + "location": { + "target": "", + "type": "" + } + } + ] +} +``` + +### `DELETE /locations/{id}` Delete a location by its id. On success response code will be `HTTP/1.1 204 No Content`.