hetzner-ts
    Preparing search index...

    Actions API

    Actions show the results and progress of asynchronous requests to the API. https://docs.hetzner.cloud/#actions

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    baseUrl: string
    token: string

    Methods

    • Returns a specific Action object.

      Parameters

      • id: number

      Returns Promise<
          | { response: Action; success: true }
          | { response: APIError; success: false },
      >

    • Returns a list of Action objects, filtered by the provided ID. The API may return an array, even if the ID matches a single action.

      Parameters

      • id: number

      Returns Promise<
          | { response: ActionsResponse; success: true }
          | { response: APIError; success: false },
      >

    • Type Parameters

      • T

      Parameters

      • endpoint: string
      • options: RequestInit = {}

      Returns Promise<{ response: T; success: true } | { response: APIError; success: false }>