Skip to content

Actor forks

Fork an app's actors: copy one actor, its state and its files, into a new key.

Create⁠

POSThttps://api.akter.dev/v1/organizations/{organization}/apps/{app}/environments/{environment}/actors/{actor}/{key}/forks
actorForks.createBearer tokenSafe to retryAsks a person to confirm

Fork an environment's actor into a free key at a cut between two of its commands, or at an earlier seq of its journal with at. The copy holds the actor's state and files as of that commit, under its own key, and carries on from there: its open jobs, pending timers and undelivered messages run on in the copy. A key already holding an actor is refused, and so is a fork id asked again into another key or at another point. A fork still running answers 503: ask again with the same fork id, which never forks twice. An API key needs the fork scope and a person's approval token in the akter-approval header.

Path parameters

  • appstringrequired

    An app's name, unique within its organization. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.

  • organizationstringrequired

    An organization's name, unique across Akter Cloud. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.

  • actorstringrequired

    The actor's name in the app's contract, such as Room.

  • environmentstringrequired

    An environment of an app, such as prod or pr-42. Each environment has its own store. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.

  • keystringrequired

    The actor's key, as the app's contract encodes it.

Request bodyForkActor

  • atinteger

    A seq of the actor's journal to fork at. The copy is the actor as it was right after that command, rebuilt by replaying its journal to it, and carries on from there: what the actor did after it stays the actor's. Absent, the copy is the actor at the cut. A journal pruned before the seq, or a command that replays to another outcome than it recorded, is refused.

  • forkIdstringrequired

    Names this fork. A retry with the same id answers the same version and never forks twice; the same id into another key is refused.

  • intostringrequired

    The free key the copy is created under. It may be on another shard than the parent's; the copy's computers are copied there too.

Response 201ActorFork

  • intostringrequired

    The actor's key, as the app's contract encodes it.

  • versionintegerrequired

    The parent's commit version the copy holds its state as of: the cut's, or the journal seq the fork names.

Errors

  • 401UnauthorizedError
  • 403ForbiddenError
  • 404NotFoundError
  • 409AlreadyExistsError
  • 410ActorErasedError
  • 428ConfirmationRequiredError
  • 503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError