Introduction

Pulse provides REST and GraphQL APIs that enable you to automate administrative tasks, integrate with external applications, and manage Pulse programmatically.

You can use the Pulse APIs to:

  • Authenticate with the Pulse server.

  • Create and manage users and roles.

  • Retrieve cluster and service information.

  • Access monitoring and operational data.

  • Automate common administration tasks.

  • Integrate Pulse with third-party tools and workflows.

The Pulse API documentation includes authentication procedures, API reference information, request and response examples, and usage guidelines to help you interact with the Pulse platform.


Overview

Pulse exposes both REST and GraphQL APIs.

  • REST APIs are primarily used for resource-oriented operations such as retrieving system information and performing bulk operations.

  • GraphQL APIs provide a flexible interface for creating and managing Pulse resources, including users, roles, and administrative objects.

Most administrative APIs use GraphQL and require authentication before they can be invoked.


Authentication

Before invoking the Pulse APIs, authenticate with the Pulse server to obtain the credentials required for subsequent API requests.

The authentication process consists of the following steps:

  1. Authenticate using the /login endpoint.

  2. Save the JWT session cookie returned by the login request.

  3. Extract the Base64-encoded role token from the login response.

  4. Include both the JWT session cookie and the role token in every GraphQL request.

Every GraphQL request requires:

  • The JWT session cookie returned by the login request.

  • The role HTTP header containing the Base64-encoded role value returned in the login response.

If the role header is omitted, the request fails even when the JWT session is valid.

For detailed authentication steps, see


API Conventions

The Pulse APIs follow these conventions:

  • REST APIs use standard HTTP methods such as GET, POST, PUT, and DELETE.

  • GraphQL APIs are available through the /graphql endpoint.

  • Requests and responses use the application/json content type.

  • Passwords supplied during authentication and user creation must be Base64 encoded.

  • GraphQL mutations and queries require valid authentication credentials.

  • Store large request payloads in JSON files and reference them using the curl -d @<file> option.


Error Handling

Pulse APIs return standard HTTP status codes to indicate the outcome of an API request.

Status Code

Description

200 OK

The request completed successfully.

201 Created

The requested resource was created successfully.

400 Bad Request

The request contains invalid or malformed data.

401 Unauthorized

Authentication failed or required credentials are missing.

403 Forbidden

The authenticated user does not have permission to perform the requested operation.

404 Not Found

The requested resource was not found.

500 Internal Server Error

An unexpected server error occurred. Verify that all required request headers, including the role header for GraphQL APIs, are present.




Best Practices

Follow these recommendations when working with the Pulse APIs:

  • Authenticate once and reuse the JWT session cookie until it expires.

  • Include the required role header in every GraphQL request.

  • Grant only the permissions required for each role.

  • Store large GraphQL request bodies in separate JSON files to simplify maintenance.

  • Validate API requests in a non-production environment before running them in production.

  • Protect authentication credentials and avoid embedding passwords or tokens in scripts stored in source control.