ArchAstro. V1. Artifacts
(archastro v0.2.0)
Copy Markdown
Artifact API resource.
Summary
Functions
Archive an artifact
Retrieve raw artifact file content
Delete an artifact
Retrieve an artifact
Update an artifact
Functions
@spec archive(ArchAstro.Client.t(), String.t()) :: {:ok, :ok} | {:error, ArchAstro.Error.reason()}
Archive an artifact
Soft-deletes the artifact identified by artifact. The artifact record is
retained in storage but is no longer returned by the list or show endpoints.
The authenticated user must have write access to the artifact's owning team or organization. Attempting to archive an artifact you do not own returns 403. Attempting to archive an artifact that does not exist or is already archived returns 404.
Returns 204 No Content on success. The artifact is soft-deleted and no longer accessible through the API.
content(client, artifact, params \\ %ArchAstro.Types.Operations.GetApiV1ArtifactsArtifactContent.Params{})
@spec content( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.GetApiV1ArtifactsArtifactContent.Params.t() ) :: {:ok, Req.Response.t()} | {:error, ArchAstro.Error.reason()}
Retrieve raw artifact file content
Returns the raw binary content of the file stored for the specified artifact.
The response Content-Type header reflects the artifact file's MIME type, so
you can pipe the response body directly to disk or display it in a browser.
By default the endpoint serves the artifact's current version. Pass the
version parameter to retrieve a specific historical version. The authenticated
user must have read access to the artifact's owning team or organization.
Raw binary content of the artifact file. The Content-Type header is set to the artifact's stored MIME type.
@spec delete(ArchAstro.Client.t(), String.t()) :: {:ok, :ok} | {:error, ArchAstro.Error.reason()}
Delete an artifact
Permanently deletes the artifact and all associated file versions. This operation is irreversible — deleted artifacts and their file content cannot be recovered.
The authenticated user must have write access to the artifact's owning team or organization. Returns 404 if the artifact does not exist or is not accessible to the caller.
Empty body. HTTP 204 indicates the artifact and all associated file versions were permanently deleted.
@spec get(ArchAstro.Client.t(), String.t()) :: {:ok, ArchAstro.Types.Artifact.t()} | {:error, ArchAstro.Error.reason()}
Retrieve an artifact
Returns the artifact identified by artifact. The response includes metadata
such as name, description, version, and a signed file_url for downloading
the current file version. Image artifacts also include an image_source object
with display-ready metadata.
The authenticated user must have read access to the artifact's owning team or organization. Returns 404 if the artifact does not exist or is not accessible to the caller.
The requested artifact, including its current version's file metadata and signed download URL.
@spec replace( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.PutApiV1ArtifactsArtifact.Input.t() ) :: {:ok, ArchAstro.Types.Artifact.t()} | {:error, ArchAstro.Error.reason()}
Update an artifact
Updates the metadata and, optionally, the file content of an existing artifact.
This endpoint uses optimistic concurrency control: you must supply the artifact's
current version number as from_version. If another update has incremented the
version since you last fetched the artifact, the request returns 409.
To replace the artifact's file, include a nested file object with Base64
data, filename, and mime_type. Omitting file leaves the existing file
unchanged. The authenticated user or developer must have write access to the
artifact's owner.
The artifact after applying the update, reflecting the new version number and any changed metadata or file.