-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added more extensive help doc to cli.py and options.py. * updating CLI docs * Update options.py * Update cli.py black didn't like the whitespace. * api and css * Update index.md Co-authored-by: douglas fulton <dfulton@ad1.systemadmin.com> Co-authored-by: Kelly Huang <kelly@ethyca.com>
- Loading branch information
1 parent
269459e
commit 7ded5af
Showing
6 changed files
with
420 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,35 @@ | ||
# API Reference | ||
# Fides Control API | ||
|
||
You can view the live, interactive [Swagger](https://swagger.io/docs/) API docs for Fidesctl by visiting `/docs` on a running instance. This is a great way to experiment with the APIs using Swagger's built-in "Try it out" functionality. | ||
The `fidesctl` API is exceedingly formulaic, so much so that it's easier to grasp the API by understanding the formula, rather than reading through a list of endpoints. The fundamental idea is that there's a set of five endpoints for each Fides resource. These endpoints let you... | ||
|
||
Below, we've embedded the latest release's API documentation as a living reference. These work largely the same, but since this documentation site isn't connected to a live instance, the "Try it out" and "Authorize" buttons won't work, sorry! | ||
| Purpose | Example | Success code | | ||
| --- | --- | --- | | ||
| Create an instance of a particular resource type. | `POST /policy` | `201` | | ||
| Retrieve all instances of a resource type. | `GET /policy` | `200` | | ||
| Retrieve the resource identified by the `fides_key` path parameter. |`GET /policy/{fides_key}` | `200`| | ||
| Completely overwrite the `fides_key` resource. |`POST /policy/{fides_key}`| `200` | | ||
| Delete the `fides_key` resource. | `DELETE /policy/{fides_key}`| `204`| | ||
|
||
## Swagger API Docs | ||
* The URLs of the endpoints emulate the names of the resources: `/organization`, `/policy`, `/registry`, `/system`, `/dataset`, `/data_category`, `/data_use`, `/data_subject`, `/data_qualifier`. | ||
|
||
* Except for the `DELETE`, the endpoints accept and/or return JSON objects that represent the named resource. The structure of these objects is given in the [Fides Language: Resources chapter](../language/resources.html) -- it's the same structure that's used in the resource manifest files. | ||
|
||
That's about all there is to it. There are an additional four endpoints that we'll look at below, but the sets of quintuplet endpoints listed above make up the core of the `fidesctl` API. | ||
|
||
After a brief review of the four addition endpoints, we'll provide a complete API reference followed by a set of cURL calls that you can use to exercise the API on your system. | ||
|
||
|
||
## Other endpoints | ||
|
||
The four additional endpoints are: | ||
|
||
* `GET /health` pings the API server to see if it's up and running. The call returns `200` if it's up and ready to receive messages, and `404` if not. | ||
|
||
* Three of the taxonomic resources, `/data_category`, `/data_use`, and `/data_qualifier` (but _not_ `/data_subject`) define a `GET /resource_type/visualize/{figure_type}` endpoint that returns a graph of the resource's taxonomy. For details, see the **API Reference**, below. | ||
|
||
|
||
## API Reference | ||
--- | ||
!!swagger openapi.json!! | ||
!!swagger openapi.json!! | ||
|
||
## cURL Calls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
/* -- Swagger UI redesign -- */ | ||
|
||
.renderedMarkdown p { | ||
margin: 0px !important; | ||
font-size: 16px !important; | ||
font-family: 'Source Sans Pro', sans-serif !important; | ||
|
||
} | ||
.models, [data-tag="Visualize"], [href="openapi.json"], .response-col_links, .response-controls, .tab, select{ | ||
display: none !important; | ||
padding: 0px !important; | ||
margin: 0px !important; | ||
} | ||
|
||
tbody .response-col_status { | ||
font-size: 16px !important; | ||
font-weight: bold !important; | ||
} | ||
|
||
.col_header { | ||
font-size: 16px !important; | ||
font-weight: bold !important; | ||
} | ||
|
||
.response-col_description p { | ||
margin: 0px !important; | ||
} | ||
.opblock-summary-description { | ||
font-size: 16px !important; | ||
} | ||
|
||
.model-example{ | ||
margin: 0px !important; | ||
} | ||
|
||
.tab { | ||
margin: 4px !important; | ||
} | ||
|
||
.tabitem { | ||
margin: 4px !important; | ||
font-size: 14px !important; | ||
} | ||
|
||
/* Get rid of the harsh lime green */ | ||
[style="color: rgb(162, 252, 162);"] { | ||
color: inherit !important; | ||
} | ||
|
||
.microlight { | ||
padding: 1px !important; | ||
} | ||
|
||
.info { | ||
margin: 12px 12px 12px 0px !important; | ||
} | ||
|
||
.opblock-tag { | ||
padding: 12px 0px 12px 0px !important; | ||
} | ||
|
||
span:after { | ||
background: none !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
|
||
|
||
var VisColorLegend = class VisColorLegend { | ||
constructor({ el }) { | ||
this.el = el; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.