|
| 1 | +############# |
| 2 | +Authorization |
| 3 | +############# |
| 4 | + |
| 5 | + |
| 6 | +This document provides an overview of the `Authorization API` endpoints used for managing `CWMS Data API` authentication keys. |
| 7 | + |
| 8 | +Endpoints |
| 9 | +--------- |
| 10 | + |
| 11 | +*Authentication is required to access these endpoints* |
| 12 | + |
| 13 | + |
| 14 | +* GET `/cwms-data/auth/keys/{key-name}` : Retrieve `CDA` authentication keys by a specific `name`. |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +**Request** |
| 19 | +- |
| 20 | +**Response** |
| 21 | +- **Status**: 200 OK |
| 22 | +- **Body**: Returns the details of the specified authentication key. |
| 23 | + |
| 24 | +#### Retrieve a Key |
| 25 | + |
| 26 | + |
| 27 | +The following table provides an overview of the available endpoints in the Authorization API: |
| 28 | + |
| 29 | ++--------------------------------------------+---------------------------------------------+-----------------------------------+ |
| 30 | +| **Endpoint** | **Description** | **Details** | |
| 31 | ++============================================+=============================================+===================================+ |
| 32 | +| `GET /cwms-data/auth/keys/{key-name}` | Retrieve a specific auth key by `keyName`. | Returns key details in JSON. | |
| 33 | ++--------------------------------------------+---------------------------------------------+-----------------------------------+ |
| 34 | +| `DELETE /cwms-data/auth/keys/{key-name}` | Delete a specific auth key by `keyName`. | Returns `204 No Content` status. | |
| 35 | ++--------------------------------------------+---------------------------------------------+-----------------------------------+ |
| 36 | +| `GET /cwms-data/auth/keys` | Retrieve all available auth keys. | Returns list of keys in JSON. | |
| 37 | ++--------------------------------------------+---------------------------------------------+-----------------------------------+ |
| 38 | +| `POST /cwms-data/auth/keys` | Create or update an auth key. | Returns created/updated key. | |
| 39 | ++--------------------------------------------+---------------------------------------------+-----------------------------------+ |
| 40 | + |
| 41 | +========== ================================= ========================================== =========== |
| 42 | +**Method** **Endpoint** **Description** **Details** |
| 43 | +========== ================================= ========================================== =========== |
| 44 | +`GET` `/cwms-data/auth/keys/{key-name}` Retrieve a specific auth key by `keyName`. |
| 45 | +`DELETE` `/cwms-data/auth/keys/{key-name}` Delete a specific auth key by `keyName`. |
| 46 | +`GET` `/cwms-data/auth/keys` Retrieve all available auth keys. |
| 47 | +`POST` `/cwms-data/auth/keys` Create or update an auth key. |
| 48 | +========== ================================= ========================================== =========== |
| 49 | + |
| 50 | +Notes |
| 51 | +----- |
| 52 | +- Replace `{key-name}` with the name of the key you are targeting. |
| 53 | +- Ensure authentication headers are included if required. |
0 commit comments