Skip to main content

Liongard API

Liongard API, API

Updated over a week ago

Overview πŸ’₯

Liongard is an API-first platform, meaning that most core platform functionality is accessible through its REST API. This design enables partners and customers to automate workflows, integrate Liongard data into external systems, and build custom solutions on top of the Liongard platform.

The Liongard API supports both v1 and v2 endpoints. While v1 endpoints remain fully supported, Liongard has introduced a v2 API that provides improved consistency, performance, and usability for many commonly used operations.


API Versions Explained 🌟

βœ… v1 API

  • Original set of Liongard API endpoints

  • Covers a wide range of platform functionality

  • Fully supported for existing and legacy integrations

  • Some endpoints may have less consistent response structures

βœ… v2 API

  • Next-generation API designed for:

    • Improved consistency

    • Better performance

    • More predictable request and response formats

  • Actively expanding across the platform

  • Recommended for new development where available

‼️ Note: Not all v1 endpoints currently have a v2 equivalent. For endpoints not yet available in v2, v1 remains the supported option.


Example v2 Endpoints

The following are examples of commonly used v2 endpoints currently available:

Endpoint

Description

/api/v2/metrics/evaluate

Evaluate metrics and retrieve results

/api/v2/environments

Retrieve environment data

/api/v2/launchpoints

Access launchpoint definitions

/api/v2/environments/{environmentID}/query

Query Inspector data for a specific environment

/api/v2/asset-inventory

Retrieve asset inventory information

For the most current and complete list of endpoints, always reference the Developer Guide.


How to Use the Liongard API πŸ§‘β€πŸ«

Step 1: Review the Developer Guide

The Developer Guide provides:

  • Authentication requirements

  • Available endpoints (v1 and v2)

  • Request and response examples

  • Pagination and filtering guidance

Step 2: Authenticate Your Requests

All API requests require authentication using an API access token generated in Liongard.

General best practices:

  • Generate tokens from a user account with appropriate permissions

  • Store tokens securely

  • Rotate tokens periodically

Step 3: Discover and Test Endpoints

Liongard provides an interactive API Explorer that allows you to:

  • Browse available v1 and v2 endpoints

  • Test requests in real time

  • View request and response schemas

πŸ” API Explorer


Why You Might See Differences Between v1 and v2 πŸ€”

You may notice differences when comparing v1 and v2 endpoints because:

  • v2 endpoints use standardized naming conventions

  • Response structures are more consistent

  • Some fields may be renamed or reorganized

  • Certain advanced features are only available in v2

This is expected behavior and part of Liongard’s ongoing API modernization.


Best Practices 🌟

Recommendation

Reason

Use v2 endpoints where available

Improved consistency and future support

Secure API tokens

Prevent unauthorized access

Handle pagination

Large data sets may be paginated

Implement error handling

Gracefully manage auth, permission, and validation errors

Monitor API updates

New v2 endpoints are released over time


Troubleshooting Common Issues πŸ‘¨β€πŸ’»

βœ… Authentication Errors

  • Verify the API token is active and not revoked.

  • Confirm the Authorization header format.

βœ… Permission Issues

  • Ensure the token was generated by a user with sufficient access.

  • Some endpoints require elevated permissions.

βœ… Endpoint Not Found

  • Confirm whether the endpoint is v1 or v2.

  • Verify the correct base URL for your Liongard region.

βœ… Missing or Unexpected Data

  • Some data may only be available via v2 endpoints.

  • Permissions can affect visible fields.


When to Contact Support 🦁

Contact Liongard Support if:

  • An endpoint behaves unexpectedly.

  • You encounter persistent authentication or permission errors.

  • You need guidance.

Providing endpoint names, request IDs, and timestamps will help expedite troubleshooting.


Disclaimer ‼️

  • API availability and behavior may evolve as Liongard continues to expand v2 coverage.

  • Not all v2 endpoints may be fully documented at all times.

  • v1 endpoints remain supported unless explicitly deprecated.


Additional Resources πŸ“š

Did this answer your question?