getAssetContent method
Gets an asset's content as a zip bundle
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter agentSpaceId :
The unique identifier for the agent space containing the asset
Parameter assetId :
The unique identifier of the asset
Parameter assetVersion :
The specific asset version to export. If omitted, the latest version is
returned.
Implementation
Future<GetAssetContentResponse> getAssetContent({
required String agentSpaceId,
required String assetId,
int? assetVersion,
}) async {
final $query = <String, List<String>>{
if (assetVersion != null) 'assetVersion': [assetVersion.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/asset/agent-space/${Uri.encodeComponent(agentSpaceId)}/assets/${Uri.encodeComponent(assetId)}/content',
queryParams: $query,
hostPrefix: 'dp.',
exceptionFnMap: _exceptionFns,
);
return GetAssetContentResponse.fromJson(response);
}