Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Export budget for a blueprint

GET  /blueprint/{blueprint_id}/budget/{format}

Overview

Export the budget for a blueprint in CSV or XLSX format.

Path Parameters

  • blueprint_id: UUID. Blueprint ID
  • format: String. One of “csv” or “xlsx”.

Optional query parameters

  • currency: String. Currency in ISO_4217 format. Should be one of “USD”, “AUD”, “CHF”, “CKK”, “EUR”, “GBP”, “HKD”, “JPY”, “NOK”, “NZD”, “SEK”, or “ZAR”. Defaults to “USD”.
  • period: String. Period for budget. Should be one of “h” (hourly), “d” (daily), “w” (weekly), “m” (monthly), or “y” (yearly). Defaults to “m”.
  • rate: String. Should be one of “effective” (includes upfront fees) or “stated” (excludes upfront fees). Defaults to “effective”.

Réponse

OK

Unauthorized

Forbidden, insufficient privileges

Blueprint not found

Exemple de code

from cloudcraftco import Cloudcraft

cloudcraft = Cloudcraft()

blueprint_id = 1234
bp_format = "csv"
export = cloudcraft.export_blueprint_budget(blueprint_id, bp_format)
with open(f'export.{bp_format}', "wb") as binary_file:
    binary_file.write(export)