Merge pull request #24999 from ismailmmd/catelog-documentation-fix
Updated API documentation for software-catelog
This commit is contained in:
@@ -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": "<string>"
|
||||
}
|
||||
```
|
||||
|
||||
### `POST /validate-entity`
|
||||
|
||||
Validate that a passed in entity has no errors in schema.
|
||||
|
||||
Request body is JSON, on the form
|
||||
|
||||
```json
|
||||
{
|
||||
"location": "<string>",
|
||||
"entity": {}
|
||||
}
|
||||
```
|
||||
|
||||
## Locations
|
||||
|
||||
### `GET /locations`
|
||||
@@ -504,6 +533,23 @@ Response type is JSON, on the form
|
||||
}
|
||||
```
|
||||
|
||||
### `GET /entity-facets?facet=<string>&facet=<string>&filter=<string>&filter=<string>`
|
||||
|
||||
Get all entity facets that match the given filters.
|
||||
|
||||
Response type is JSON, on the form
|
||||
|
||||
```json
|
||||
{
|
||||
"facets": [
|
||||
{
|
||||
"value": "<string>",
|
||||
"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/<uid>`
|
||||
### `POST /analyze-location`
|
||||
|
||||
Validate a given location.
|
||||
|
||||
Request body is JSON, on the form
|
||||
|
||||
```json
|
||||
{
|
||||
"location": {
|
||||
"type": "<string>",
|
||||
"target": "<string>"
|
||||
},
|
||||
"catalogFileName": "<string>"
|
||||
}
|
||||
```
|
||||
|
||||
And Response type is JSON, on the form
|
||||
|
||||
```json
|
||||
{
|
||||
"generateEntities": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"description": "<string>",
|
||||
"value": "<string>",
|
||||
"state": "needsUserInput",
|
||||
"field": "<string>"
|
||||
},
|
||||
{
|
||||
"description": "<string>",
|
||||
"value": {},
|
||||
"state": "analysisSuggestedNoValue",
|
||||
"field": "<string>"
|
||||
}
|
||||
],
|
||||
"entity": {}
|
||||
}
|
||||
],
|
||||
"existingEntityFiles": [
|
||||
{
|
||||
"entity": "<Entity>",
|
||||
"isRegistered": "<boolean>",
|
||||
"location": {
|
||||
"target": "<string>",
|
||||
"type": "<string>"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### `DELETE /locations/{id}`
|
||||
|
||||
Delete a location by its id. On success response code will be `HTTP/1.1 204 No Content`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user