# Test, Monitor, and Visualize Geospatial APIs 1.0.0

This is documentation for Test, Monitor, and Visualize Geospatial APIs **1.0.0**, which is no longer actively maintained.

For up-to-date documentation, see the **[latest version](/content/docs/desktop/sets/index.html)** (1.1.0).

Version: 1.0.0

On this page

Organize, save, and share your API testing workflows with Quetzly Validator's Sets feature. Sets allow you to create collections of related requests, making it easy to manage complex testing scenarios and share configurations with team members.

## What are Sets?

Sets are collections of saved API requests that include:

- **Request configurations**: URLs, methods, parameters, headers, and body content
- **Service types**: WMS, WFS, ArcGIS, or standard REST API configurations
- **Export/Import capability**: Share sets with colleagues or backup your configurations

## Accessing the Sets Interface

1. **Click** the **Sets** icon in the left sidebar
2. The Sets panel displays:
   - **Download Set**: Export your current configurations
   - **Import Set**: Load saved configurations
   - **Sets List**: View all your saved request collections

## Creating and Managing Sets

### Saving Your Current Work

#### Download Set (Export)

1. **Configure** your requests in the API section
2. **Navigate** to the Sets section
3. **Click** the "Save" button under "Download Set"
4. **Choose** a location to save your `.json` configuration file
5. **Name** your file descriptively (e.g., `company-wms-services.json`)

The exported file contains:

- All current request parameters
- Headers and authentication settings
- Service type configurations
- Any custom settings or preferences

**Note**: The export feature will download a json file of all layers currently on the map.

#### What Gets Saved

- ✅ **Request URLs**: All endpoint addresses
- ✅ **HTTP methods**: GET, POST, PUT, PATCH, DELETE
- ✅ **Service types**: WMS, WFS, ArcGIS, JSON selections
- ✅ **Query parameters**: All key-value pairs
- ✅ **Headers**: Including authentication headers
- ✅ **Request bodies**: JSON content for POST/PUT requests

#### Set File Format

For a set to load successfully, it must follow this JSON structure:

```json
{
  "layers": [
    {
      "url": "https://api.example.com/endpoint",
      "method": "POST",
      "type": "JSON",
      "params": {
        "key1": "value1",
        "key2": "value2"
      },
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "Bearer [YOUR-TOKEN]"
      },
      "data": {
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [-122.4194, 37.7749]
        },
        "properties": {}
      }
    }
  ],
  "timestamp": "2025-11-30T12:00:00.000Z"
}
```

**Required fields:**

- `layers` (array): Contains all request configurations
- `url` (string): The API endpoint URL
- `method` (string): HTTP method (GET, POST, PUT, PATCH, DELETE)
- `type` (string): Service type (WMS, WFS, JSON, ArcGIS)

**Optional fields:**

- `params` (object): Query parameters as key-value pairs
- `headers` (object): HTTP headers as key-value pairs
- `data` (object): Request body for POST/PUT requests
- `timestamp` (string): ISO 8601 timestamp of export

**Common format errors:**

- Missing `layers` array
- Invalid JSON syntax (missing commas, brackets, quotes)
- Incorrect data types (string instead of object)
- Malformed URLs or invalid HTTP methods

### Loading Saved Sets

#### Import Set

1. **Click** "Import" button under "Import Set"
2. **Browse** to your saved `.json` file
3. **Select** the configuration file
4. **Confirm** the import
5. The requests will be loaded and available in your Sets list

#### Import Behavior

- **Additive**: Imported sets are added to existing sets (no overwrite)
- **Validation**: Invalid configurations are skipped.
- **Restoration**: All parameters, headers, and settings are restored
- **Immediate availability**: Imported sets appear instantly in the Sets list

### Managing Your Sets Collection

#### Sets List Interface

The Sets list shows:

- **Set names**: Descriptive names for each collection. It's defined by the files name.
- **Actions**: At the moment there is only delete action but more to come.

#### Loading a Set

1. **Locate** the desired set in the Sets list
2. **Click** on the set name or "Load" button
3. **The requests are loaded** into the API interface
4. **Switch to API section** to use the loaded requests
5. **Modify** parameters as needed before sending

## Practical Use Cases

### Development Workflows

#### API Development Testing

Create sets for:

- **Development environment**: URLs pointing to dev servers
- **Staging environment**: Pre-production testing configurations
- **Production environment**: Live service testing (use carefully)
- **Local testing**: localhost and development server configurations

#### Feature Testing Suites

Organize by functionality:

- **Authentication tests**: Login, token refresh, logout flows
- **CRUD operations**: Create, read, update, delete sequences
- **Spatial queries**: Various geometry-based requests

### Team Collaboration

#### Sharing Configurations

**Export for colleagues:**

1. Create comprehensive sets with your working configurations
2. Export to shared network locations or version control
3. Include documentation about each request's purpose
4. Share authentication setup instructions separately

**Team standards:**

- **Naming conventions**: Consistent set and file naming
- **Documentation**: Clear descriptions for each request
- **Version control**: Track changes to shared sets
- **Security**: Avoid sharing sensitive authentication data

#### Onboarding New Team Members

Create "starter sets" that include:

- **Common service endpoints**: Frequently used APIs
- **Example requests**: Well-documented example calls
- **Testing patterns**: Standard testing workflows
- **Environment configurations**: Different deployment targets

### Quality Assurance

#### Regression Testing

Build sets for:

- **Smoke tests**: Basic functionality verification
- **Full regression**: Comprehensive testing suites
- **Performance baselines**: Standard performance test configurations
- **Edge cases**: Boundary condition and error testing

#### Release Testing

Create release-specific sets:

- **Pre-release validation**: Test new features
- **Compatibility testing**: Verify backward compatibility
- **Integration testing**: Multi-service interaction tests
- **User acceptance**: End-user scenario testing
