Creates controlled links for delivering files.
File links can be time-limited, revocable, and protected by a token. Creating and administering links requires a secret key; opening a link uses its public ID and token and intentionally does not send the application's secret key.
Summary
Functions
Creates a revocable public capability URL for an existing file.
Retrieves a file link without exposing token material.
Opens a token-protected public file link. Depending on delivery policy, this either streams bytes or redirects to a short-lived provider URL.
Lists file links for the authorized application, optionally filtered by file or status.
Revokes an active file link so its public capability URL can no longer serve the file.
Functions
@spec create(Inttegro.Client.t(), Inttegro.FileLinks.CreateRequest.t(), keyword()) :: {:ok, Inttegro.FileLinks.Creation.t()} | {:error, Exception.t()}
Creates a revocable public capability URL for an existing file.
Parameters
client— an authenticatedInttegro.Client.request— aInttegro.FileLinks.CreateRequestcontaining the operation input.options— request options such as:idempotency_keyand additional:headers.
Returns
Returns {:ok, Inttegro.FileLinks.Creation.t()} when Inttegro accepts and decodes the operation. Returns
{:error, exception} for API, transport, or decoding failures. A successful API response can
still describe an asynchronous resource that has not reached its terminal state.
Example
request = Inttegro.FileLinks.CreateRequest.new!(request_attributes)
case Inttegro.FileLinks.create(client, request) do
{:ok, result} -> result
{:error, error} -> {:error, error}
end
@spec lookup(Inttegro.Client.t(), Inttegro.FileLinks.LookupRequest.t(), keyword()) :: {:ok, Inttegro.FileLinks.FileLink.t()} | {:error, Exception.t()}
Retrieves a file link without exposing token material.
Parameters
client— an authenticatedInttegro.Client.request— aInttegro.FileLinks.LookupRequestcontaining the operation input.options— request options such as:idempotency_keyand additional:headers.
Returns
Returns {:ok, Inttegro.FileLinks.FileLink.t()} when Inttegro accepts and decodes the operation. Returns
{:error, exception} for API, transport, or decoding failures. A successful API response can
still describe an asynchronous resource that has not reached its terminal state.
Example
request = Inttegro.FileLinks.LookupRequest.new!(request_attributes)
case Inttegro.FileLinks.lookup(client, request) do
{:ok, result} -> result
{:error, error} -> {:error, error}
end
@spec open(Inttegro.Client.t(), Inttegro.FileLinks.OpenRequest.t()) :: {:ok, Inttegro.Files.Download.t()} | {:error, Exception.t()}
Opens a token-protected public file link. Depending on delivery policy, this either streams bytes or redirects to a short-lived provider URL.
Parameters
client— an authenticatedInttegro.Client.request— aInttegro.FileLinks.OpenRequestcontaining the operation input.options— request options such as:idempotency_keyand additional:headers.
Returns
Returns {:ok, Inttegro.Files.Download.t()} when Inttegro accepts and decodes the operation. Returns
{:error, exception} for API, transport, or decoding failures. A successful API response can
still describe an asynchronous resource that has not reached its terminal state.
Example
request = Inttegro.FileLinks.OpenRequest.new!(request_attributes)
case Inttegro.FileLinks.open(client, request) do
{:ok, result} -> result
{:error, error} -> {:error, error}
end
@spec page(Inttegro.Client.t(), Inttegro.FileLinks.PageRequest.t(), keyword()) :: {:ok, Inttegro.FileLinks.Page.t()} | {:error, Exception.t()}
Lists file links for the authorized application, optionally filtered by file or status.
Parameters
client— an authenticatedInttegro.Client.request— aInttegro.FileLinks.PageRequestcontaining the operation input.options— request options such as:idempotency_keyand additional:headers.
Returns
Returns {:ok, Inttegro.FileLinks.Page.t()} when Inttegro accepts and decodes the operation. Returns
{:error, exception} for API, transport, or decoding failures. A successful API response can
still describe an asynchronous resource that has not reached its terminal state.
Example
request = Inttegro.FileLinks.PageRequest.new!(request_attributes)
case Inttegro.FileLinks.page(client, request) do
{:ok, result} -> result
{:error, error} -> {:error, error}
end
@spec revoke(Inttegro.Client.t(), Inttegro.FileLinks.RevokeRequest.t(), keyword()) :: {:ok, Inttegro.FileLinks.FileLink.t()} | {:error, Exception.t()}
Revokes an active file link so its public capability URL can no longer serve the file.
Parameters
client— an authenticatedInttegro.Client.request— aInttegro.FileLinks.RevokeRequestcontaining the operation input.options— request options such as:idempotency_keyand additional:headers.
Returns
Returns {:ok, Inttegro.FileLinks.FileLink.t()} when Inttegro accepts and decodes the operation. Returns
{:error, exception} for API, transport, or decoding failures. A successful API response can
still describe an asynchronous resource that has not reached its terminal state.
Example
request = Inttegro.FileLinks.RevokeRequest.new!(request_attributes)
case Inttegro.FileLinks.revoke(client, request) do
{:ok, result} -> result
{:error, error} -> {:error, error}
end