Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.1.0] - 2025-07-17

### Changed
- Switched from a pre-request script Auth workflow to the baked in OAuth 2.0
- This is necessary for OpenAPI spec generation, for the YAML to be fully usable out-of-box in other tools
- In Postman, this necessitates an additional step when authentication
- Set the `username` and `password` in your environment (same as before)
- Go to the `Authorization` tab under the collection and click `Get New Access Token`
- Once the initial token has been requested, Postman will handle auto-refresh (so long as the refresh token is not expired)
- Cleaned up some of the in-collection documentation to make it more tool-agnostic for te OpenAPI spoec
- The Postman-specific functionalities will be detailed in the public workspace docs
- Updated `README`

## [1.0.1] - 2025-06-18

### Added
Expand Down
37 changes: 24 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,50 @@ Alternatively, you can import the files directly from this repository:
2. Select **Import**
3. Drag the files from `src/` to the application

## Authentication and Utilities
### Authentication

The collection-level pre-request script manages authentication and provides helper functions.
1. **Set your credentials**
- Define the following environment variables:

* `username` – your UDNS username
* `password` – your UDNS password

2. **Manually obtain your token (first time)**
- In Postman:

* Open the **Authorization** tab at the collection level
* Click **"Get New Access Token"**, then **"Use Token"**

3. **Token refresh**
- After the initial token is retrieved, Postman will automatically refresh it when needed—provided the refresh token remains valid.

## Utilities

The collection-level pre-request script provides helper functions.

Since `utils` is defined globally by not using a declaration keyword, it is accessible to request-level scripts. This allows for the definition of reusable functions for our requests. Utility functions can be invoked like so:

```javascript
utils.functionName()
```

### Username/Password

For the pre-request script to run, you must set `username` and `password` variables containing your UDNS credentials in an environment. UDNS uses OAuth2 to generate an access token. The access token and refresh token will also be stored in your environment along with a timestamp, so the script knows when to refresh.

## Resources

The collection is organized into folders, each representing a base resource (ex: `zones`) or a specific functionality (ex: `push notifications`).

- **Zones**: Contains the DNS configuration. Some resources are not available in the latest "version" of the API, hence why "snapshot/restore" use the "v1" endpoint.

- **Records**: APIs for adding/updating/deleting RRsets for a zone. These APIs use RRset DTO definitions and pre-request/post-request scripts for managing environment variables and POST body content.

- **Tasks**: Operations that produce background tasks will return a `202` status code and have an `x-task-id` header. This ID is stored under the `currentTask` variable in the environment.

- **Reports**: After you request a report, retrieve it from the `results` endpoint using the report ID. This ID is stored in the post-request script, similar to tasks.

- **Webhook**: A set of 3 requests related to UDNS's push notification feature.

- **Subaccounts**: APIs exclusive to accounts that contain child accounts. If you don't have access to this feature, they'll produce an error.

- **Records**: APIs for adding/updating/deleting RRsets for a zone. These APIs use RRset DTO definitions and pre-request/post-request scripts for managing environment variables and POST body content.
- **Webhook**: A set of 3 requests related to UDNS's push notification feature.\

## Bypassing Automated Authentication
- **DNSSEC Multi-Signer**

To manually provide your Bearer token, go to the "Authorization" tab of the collection and modify the value. This would be necessary, as an example, to use a token produced by the subaccount authorization endpoint. Remember to revert it to the `{{accessToken}}` variable after you're done.
- **Traffic Management**

## Contributing

Expand Down
19 changes: 14 additions & 5 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,20 @@ The easiest way to get started is to:
## Environment Setup

After importing the collection, you'll need to:
1. Create a new environment
2. Set the following variables:
- `username`: Your UltraDNS account username
- `password`: Your UltraDNS account password

The collection's pre-request script will automatically handle authentication using these credentials.
1. **Set your credentials**
- Define the following environment variables:

* `username` – your UDNS username
* `password` – your UDNS password

2. **Manually obtain your token (first time)**
- In Postman:

* Open the **Authorization** tab at the collection level
* Click **"Get New Access Token"**, then **"Use Token"**

3. **Token refresh**
- After the initial token is retrieved, Postman will automatically refresh it when needed—provided the refresh token remains valid.

For more detailed information about using the collection, please refer to the [main README](../README.md).
Loading