Provides API endpoints related to api/actors/builds
Summary
Functions
Build Actor
Get default Actor build
Get list of Actor's builds
Get OpenAPI definition of Actor build
Functions
@spec create(actor_id :: String.t(), opts :: keyword()) :: {:ok, ApifyClient.Schemas.Build.t()} | {:error, ApifyClient.Error.t()}
Build Actor
Builds an Actor. The response is the build object as returned by the Get Actor build endpoint.
Options
version: Actor version number to be built.use_cache: Iftrueor1, the system will use a cache to speed up the build process. Passfalseor0to build without the cache. By default, cache is used.beta_packages: Iftrueor1then the Actor is built with beta versions of Apify NPM packages. By default, the build useslatestpackages.tag: Tag to be applied to the build on success. By default, the tag is taken from Actor version'sbuildTagproperty.wait_for_finish: The maximum number of seconds the server waits for the build to finish. By default it is0, the maximum value is60. <!-- MAX_ACTOR_JOB_ASYNC_WAIT_SECS --> If the build finishes in time then the returned build object will have a terminal status (e.g.SUCCEEDED), otherwise it will have a transitional status (e.g.RUNNING).
@spec default(actor_id :: String.t(), opts :: keyword()) :: {:ok, ApifyClient.Schemas.Build.t()} | {:error, ApifyClient.Error.t()}
Get default Actor build
Get the default build for an Actor.
Use the optional waitForFinish parameter to synchronously wait for the build to finish.
This avoids the need for periodic polling when waiting for the build to complete.
This endpoint does not require an authentication token. Instead, calls are authenticated using the Actor's unique ID.
However, if you access the endpoint without a token, certain attributes (e.g., usageUsd and usageTotalUsd) will be hidden.
Options
wait_for_finish: The maximum number of seconds the server waits for the build to finish. By default it is0, the maximum value is60. <!-- MAX_ACTOR_JOB_ASYNC_WAIT_SECS --> If the build finishes in time then the returned build object will have a terminal status (e.g.SUCCEEDED), otherwise it will have a transitional status (e.g.RUNNING).
@spec list(actor_id :: String.t(), opts :: keyword()) :: {:ok, ApifyClient.Schemas.ListOfBuilds.t()} | {:error, ApifyClient.Error.t()}
Get list of Actor's builds
Gets the list of builds of a specific Actor. The response is a JSON with the list of objects, where each object contains basic information about a single build.
The endpoint supports pagination using the limit and offset parameters
and it will not return more than 1000 records.
By default, the records are sorted by the startedAt field in ascending order,
therefore you can use pagination to incrementally fetch all builds while new
ones are still being started. To sort the records in descending order, use
the desc=1 parameter.
Options
offset: Number of items that should be skipped at the start. The default value is0.limit: Maximum number of items to return. The default value as well as the maximum is1000.desc: Iftrueor1then the objects are sorted by thestartedAtfield in descending order. By default, they are sorted in ascending order.
@spec openapi_json(actor_id :: String.t(), build_id :: String.t(), opts :: keyword()) :: {:ok, map() | nil} | {:error, ApifyClient.Error.t()}
Get OpenAPI definition of Actor build
Get the OpenAPI definition for Actor builds. Two similar endpoints are available:
Get OpenAPI definition of Actor build (
/v2/actors/{actorId}/builds/{buildId}/openapi.json): Requires bothactorIdandbuildId. Usedefaultas thebuildIdto get the OpenAPI schema for the default Actor build.Get OpenAPI definition of Actor build (
/v2/actor-builds/{buildId}/openapi.json): Requires onlybuildId.
Get the OpenAPI definition for a specific Actor build.
To fetch the default Actor build, simply pass default as the buildId.
This endpoint doesn't require the authentication token if the Actor is public or, when you pass a build ID,
if the build's owner has general resource access
set to Anyone with ID can read. Otherwise, the token must have access to the build, or to the Actor when you
pass default.
:::note
You can also use the Get OpenAPI definition of Actor build endpoint (/v2/actor-builds/{buildId}/openapi.json) to get the OpenAPI definition for a build.
:::