Skip to main content
Version: 2

ActorVersionCollectionClient

Client for managing the collection of Actor versions.

Actor versions represent specific builds or snapshots of an Actor's code. This client provides methods to list and create versions for a specific Actor.

@example
const client = new ApifyClient({ token: 'my-token' });
const actorClient = client.actor('my-actor-id');

// List all versions
const versionsClient = actorClient.versions();
const { items } = await versionsClient.list();

// Create a new version
const newVersion = await versionsClient.create({
versionNumber: '0.2',
buildTag: 'latest'
});
@see

Hierarchy

  • ResourceCollectionClient
    • ActorVersionCollectionClient

Index

Properties

inheritedapifyClient

apifyClient: ApifyClient

inheritedbaseUrl

baseUrl: string

inheritedhttpClient

httpClient: HttpClient

optionalinheritedid

id?: string

optionalinheritedparams

params?: Record<string, unknown>

inheritedpublicBaseUrl

publicBaseUrl: string

inheritedresourcePath

resourcePath: string

optionalinheritedsafeId

safeId?: string

inheritedurl

url: string

Methods

create

list

  • Lists all Actor versions.

    Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched items in a single API call is limited.

    const paginatedList = await client.list();

    Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are retrieved.

    for await (const singleItem of client.list()) {...}
    @see

    Parameters

    Returns Promise<ActorVersionListResult> & AsyncIterable<FinalActorVersion, any, any>

    A paginated iterator of Actor versions.