Appearance
Get a budget
API ReferenceReturns the complete budget record for a single budget.
OpenAPI definition
json
{
"openapi": "3.0.0",
"info": {
"description": "This is the interface for interacting with the Asana Platform. Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml).",
"x-public-description": "This is the interface for interacting with the Asana Platform. Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml).",
"title": "Asana",
"termsOfService": "https://asana.com/terms",
"contact": {
"name": "Asana Support",
"url": "https://asana.com/support"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0"
},
"version": "1.0",
"x-docs-schema-whitelist": [
"AsanaResource",
"AsanaNamedResource",
"AuditLogEvent",
"AttachmentResponse",
"AttachmentCompact",
"BatchResponse",
"CustomFieldSettingResponse",
"CustomFieldSettingCompact",
"CustomTypeResponse",
"CustomTypeBase",
"CustomTypeCompact",
"CustomTypeStatusOptionResponse",
"CustomTypeStatusOptionBase",
"CustomTypeStatusOptionCompact",
"CustomFieldResponse",
"CustomFieldCompact",
"CustomFieldMembershipCompact",
"CustomFieldMembershipResponse",
"EnumOption",
"EventResponse",
"ErrorResponse",
"GoalResponse",
"GoalCompact",
"GoalMembershipCompact",
"GoalMembershipBase",
"GoalMembershipResponse",
"GoalRelationshipResponse",
"GoalRelationshipCompact",
"GraphExportResponse",
"GraphExportCompact",
"JobResponse",
"JobCompact",
"OrganizationExportResponse",
"OrganizationExportCompact",
"PortfolioMembershipResponse",
"PortfolioMembershipCompact",
"PortfolioResponse",
"PortfolioCompact",
"ProjectBriefResponse",
"ProjectBriefCompact",
"ProjectMembershipCompactResponse",
"ProjectMembershipNormalResponse",
"ProjectMembershipCompact",
"ProjectResponse",
"ProjectCompact",
"ProjectStatusResponse",
"ProjectStatusCompact",
"ProjectTemplateCompact",
"ProjectTemplateResponse",
"RuleTriggerResponse",
"ResourceExportResponse",
"ResourceExportCompact",
"ResourceExportCompact",
"RbacRoleResponse",
"RbacRoleCompact",
"SectionResponse",
"SectionCompact",
"StatusUpdateResponse",
"StatusUpdateCompact",
"StoryResponse",
"StoryCompact",
"TagResponse",
"TagCompact",
"TaskResponse",
"TaskCompact",
"TaskCountResponse",
"TeamMembershipResponse",
"TeamMembershipCompact",
"TeamResponse",
"TeamCompact",
"TimePeriodResponse",
"TimePeriodCompact",
"TimeTrackingCategoryResponse",
"TimeTrackingCategoryCompact",
"UserTaskListResponse",
"UserTaskListCompact",
"UserResponse",
"UserCompact",
"WebhookFilter",
"WebhookResponse",
"WebhookCompact",
"WorkspaceMembershipResponse",
"WorkspaceMembershipCompact",
"WorkspaceResponse",
"WorkspaceCompact"
]
},
"servers": [
{
"url": "https://app.asana.com/api/1.0",
"description": "Main endpoint."
}
],
"security": [
{
"personalAccessToken": []
},
{
"oauth2": []
}
],
"x-readme": {
"proxy-enabled": false
},
"tags": [
{
"name": "Budgets",
"description": "A *budget* object represents a budget for a specific *parent* resource (such as a project).\n\nEach budget tracks values either in *time* or *cost*, as determined by the *budget_type* field.\n\nWhen *budget_type* is `time`, all values are expressed in minutes. When *budget_type* is `cost`, all values are expressed in the domain’s currency.\n\nA budget can include up to three value objects: *estimate*, *actual*, and *total*. Each contains a `value`, `units`, and may include a `billable_status_filter` field.\n\n**estimate** Represents the aggregated estimated effort on tasks attributed to the *parent*. For time budgets: total estimated minutes. For cost budgets: total estimated cost, computed as (estimated time × resource rate).\n\n**actual** Represents the aggregated actual time logged on tasks attributed to the *parent*. For time budgets: total actual minutes from time tracking entries. For cost budgets: total actual cost, computed as (actual time × resource rate). The optional `billable_status_filter` limits aggregation to `billable`, `non_billable`, or `any` entries.\n\n**total** A user-defined target value for the budget. Stored independently per budget type, so switching between *time* and *cost* preserves each type's value. For time budgets: stored and read as minutes. For cost budgets: stored and read in the domain's currency."
}
],
"components": {
"parameters": {
"pretty": {
"name": "opt_pretty",
"in": "query",
"description": "Provides “pretty” output.\nProvides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.",
"required": false,
"allowEmptyValue": true,
"schema": {
"type": "boolean"
},
"style": "form",
"example": true
},
"budget_path_gid": {
"name": "budget_gid",
"in": "path",
"description": "Globally unique identifier for the budget.",
"required": true,
"schema": {
"type": "string"
},
"example": "12345",
"x-env-variable": "budget"
}
},
"responses": {
"BadRequest": {
"description": "This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"Unauthorized": {
"description": "A valid authentication token was not provided with the request, so the API could not associate a user with the request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"PaymentRequired": {
"description": "The request was valid, but the queried object or object mutation specified in the request is above your current premium level.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"Forbidden": {
"description": "The authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"NotFound": {
"description": "Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"InternalServerError": {
"description": "There was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"schemas": {
"BudgetCompact": {
"description": "A *budget* object represents a budget for a given parent.",
"type": "object",
"properties": {
"gid": {
"description": "Globally unique identifier of the resource, as a string.",
"type": "string",
"readOnly": true,
"example": "12345",
"x-insert-after": false
},
"resource_type": {
"description": "The base type of this resource.",
"type": "string",
"readOnly": true,
"example": "budget",
"x-insert-after": "gid"
},
"budget_type": {
"type": "string",
"description": "The type of the budget, in \"cost\" or \"time\". The value of this property will dictate how the corresponding values for actual, estimate, and total are interpreted.",
"enum": [
"cost",
"time"
]
}
}
},
"BudgetResponse": {
"allOf": [
{
"$ref": "#/components/schemas/BudgetCompact"
},
{
"type": "object",
"properties": {
"estimate": {
"allOf": [
{
"$ref": "#/components/schemas/BudgetEstimateResponse"
}
]
},
"actual": {
"allOf": [
{
"$ref": "#/components/schemas/BudgetActualResponse"
}
]
},
"total": {
"allOf": [
{
"$ref": "#/components/schemas/BudgetTotalResponse"
}
]
},
"parent": {
"allOf": [
{
"$ref": "#/components/schemas/ProjectCompact"
},
{
"type": "object"
}
]
}
}
}
]
},
"BudgetEstimateRequest": {
"description": "Defines how the estimate portion of a budget is configured. This object controls whether the estimate is enabled, what data source it uses, and which tasks (by billable status) are included in calculating the estimate value. When disabled (enabled: false and source: none), the estimate is hidden and the API response will return `value: null` and `units: null` for this field.",
"type": "object",
"properties": {
"billable_status_filter": {
"description": "Billable status filter applied to the estimate when `source` is `tasks`. Ignored when `source` is `capacity_plans` or `none`. When not provided, defaults to `billable`.",
"type": "string",
"enum": [
"billable",
"non_billable",
"any"
]
},
"source": {
"description": "The data source for the estimate. `tasks`: use task-level estimated time attributed to the parent. `capacity_plans`: use capacity plan estimates attributed to the parent. `none`: disables the estimate; only valid when `enabled` is `false`. When `enabled` is `true`, `source` must not be `none`.",
"type": "string",
"example": "tasks",
"enum": [
"none",
"tasks",
"capacity_plans"
]
},
"enabled": {
"description": "Controls whether the estimate is displayed in the budget. This flag primarily affects UI presentation and the response payload. When `false` (and `source` is `none`), the estimate is hidden and the API response will return `value: null` and `units: null` for this field.",
"type": "boolean",
"example": true
}
}
},
"BudgetEstimateResponse": {
"allOf": [
{
"$ref": "#/components/schemas/BudgetEstimateRequest"
},
{
"type": "object",
"description": "Represents the computed estimate portion of a budget. This object includes the calculated estimate value and its corresponding units. The estimate reflects aggregated data from the configured source, and when source is tasks, the specified billable_status_filter determines which tasks contribute. When disabled (enabled: false and source: none), both value and units will be null.",
"properties": {
"units": {
"description": "The units of the estimate value. When `budget_type` is `time`, units are `\"minutes\"`. When `budget_type` is `cost`, units are the ISO 4217 currency code configured at the domain level. When `source` is `none` and `enabled` is `false`, this field will be `null`.",
"type": "string",
"example": "USD",
"readOnly": true
},
"value": {
"description": "The aggregated estimate value for the budget. This value is computed based on the selected `source` and, when `source` is `tasks`, the specified `billable_status_filter`. When `budget_type` is `time`, represents the aggregated estimated minutes on the parent. When `budget_type` is `cost`, represents the aggregated estimated cost on the parent (estimated time x resource rate). When `source` is `none` and `enabled` is `false`, this field will be `null`.",
"type": "number",
"example": 100,
"readOnly": true
}
}
}
]
},
"BudgetActualRequest": {
"type": "object",
"description": "Defines the configuration of the actual portion of a budget. The actual value represents aggregated time tracking data attributed to the budget’s parent. This object controls which time entries are included based on their billable status. When no entries match the selected filter, the value will be 0.",
"properties": {
"billable_status_filter": {
"type": "string",
"description": "Billable status filter applied to time tracking entries contributing to the actual value. Determines which entries are included in aggregation. When not provided, defaults to `billable`.",
"enum": [
"billable",
"non_billable",
"any"
],
"example": "billable"
}
}
},
"BudgetActualResponse": {
"allOf": [
{
"$ref": "#/components/schemas/BudgetActualRequest"
},
{
"type": "object",
"description": "Represents the computed actual portion of a budget. The actual value is derived from time tracking entries attributed to the budget’s parent, filtered according to the specified billable_status_filter. When budget_type is time, it represents minutes; when budget_type is cost, it represents total cost (actual time × resource rate). When no applicable entries exist, value will be 0.",
"properties": {
"value": {
"description": "The aggregated actual value for the budget. * When `budget_type` is `time`, represents the total actual minutes from time tracking entries. * When `budget_type` is `cost`, represents the total actual cost, computed as (actual time × resource rate).",
"type": "number",
"example": 100,
"readOnly": true
},
"units": {
"description": "The units of the actual value. * When `budget_type` is `time`, units are `\"minutes\"`. * When `budget_type` is `cost`, units are the ISO 4217 currency code configured at the domain level.",
"type": "string",
"example": "USD",
"readOnly": true
}
}
}
]
},
"BudgetTotalRequest": {
"type": "object",
"description": "Defines how the total portion of a budget is configured. The total represents a user-defined target value, not an aggregated one. This object specifies whether the total is displayed and the current value for the selected budget_type.",
"properties": {
"enabled": {
"description": "Indicates whether the total value is active and should be displayed in the budget. This flag primarily affects UI presentation and the response payload.",
"type": "boolean",
"example": true
},
"value": {
"description": "The user-set value for the total budget. When `budget_type` is `time`, represents minutes. When `budget_type` is `cost`, represents the monetary amount in the domain's currency. This value is stored separately for each `budget_type`, so switching between types preserves each value.",
"type": "number",
"example": 100
}
}
},
"BudgetTotalResponse": {
"allOf": [
{
"$ref": "#/components/schemas/BudgetTotalRequest"
},
{
"type": "object",
"description": "Represents the configured total portion of a budget. The total value is user-defined and may differ for each budget_type. When budget_type is time, it is expressed in minutes; when budget_type is cost, it is expressed in the domain’s ISO 4217 currency code. When enabled is false, both value and units will be null.",
"properties": {
"units": {
"description": "The units of the total value. When `budget_type` is `time`, units are `\"minutes\"`. When `budget_type` is `cost`, units are the ISO 4217 currency code configured at the domain level. When `enabled` is `false`, this field will be `null`.",
"type": "string",
"example": "USD",
"readOnly": true
}
}
}
]
},
"Error": {
"type": "object",
"properties": {
"message": {
"type": "string",
"readOnly": true,
"description": "Message providing more detail about the error that occurred, if available.",
"example": "project: Missing input"
},
"help": {
"type": "string",
"readOnly": true,
"description": "Additional information directing developers to resources on how to address and fix the problem, if available.",
"example": "For more information on API status codes and how to handle them, read the docs on errors: https://asana.github.io/developer-docs/#errors'"
},
"phrase": {
"type": "string",
"readOnly": true,
"description": "*500 errors only*. A unique error phrase which can be used when contacting developer support to help identify the exact occurrence of the problem in Asana's logs.",
"example": "6 sad squid snuggle softly"
}
}
},
"ErrorResponse": {
"description": "Sadly, sometimes requests to the API are not successful. Failures can\noccur for a wide range of reasons. In all cases, the API should return\nan HTTP Status Code that indicates the nature of the failure,\nwith a response body in JSON format containing additional information.\n\n\nIn the event of a server error the response body will contain an error\nphrase. These phrases are automatically generated using the\nnode-asana-phrase\nlibrary and can be used by\nAsana support to quickly look up the incident that caused the server\nerror.",
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"ProjectCompact": {
"description": "A *project* represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.",
"type": "object",
"properties": {
"gid": {
"description": "Globally unique identifier of the resource, as a string.",
"type": "string",
"readOnly": true,
"example": "12345",
"x-insert-after": false
},
"resource_type": {
"description": "The base type of this resource.",
"type": "string",
"readOnly": true,
"example": "project",
"x-insert-after": "gid"
},
"name": {
"description": "Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.",
"type": "string",
"example": "Stuff to buy"
}
}
}
},
"securitySchemes": {
"personalAccessToken": {
"type": "http",
"description": "A personal access token allows access to the api for the user who created it. This should be kept a secret and be treated like a password.",
"scheme": "bearer"
},
"oauth2": {
"type": "oauth2",
"description": "We require that applications designed to access the Asana API on behalf of multiple users implement OAuth 2.0.\nAsana supports the Authorization Code Grant flow.",
"flows": {
"authorizationCode": {
"authorizationUrl": "https://app.asana.com/-/oauth_authorize",
"tokenUrl": "https://app.asana.com/-/oauth_token",
"refreshUrl": "https://app.asana.com/-/oauth_token",
"scopes": {
"default": "Provides access to all endpoints documented in our API reference. If no scopes are requested, this scope is assumed by default.",
"openid": "Provides access to OpenID Connect ID tokens and the OpenID Connect user info endpoint.",
"email": "Provides access to the user’s email through the OpenID Connect user info endpoint.",
"profile": "Provides access to the user’s name and profile photo through the OpenID Connect user info endpoint.",
"attachments:read": "View access to attachments",
"attachments:write": "Create and modify access to attachments",
"attachments:delete": "Delete access to attachments",
"custom_fields:read": "View access to custom fields",
"custom_fields:write": "Create and modify access to custom fields",
"goals:read": "View access to goals",
"jobs:read": "View access to jobs",
"ooo_entries:read": "View access to OOO entries",
"ooo_entries:write": "Create and modify access to OOO entries",
"ooo_entries:delete": "Delete access to OOO entries",
"tasks:read": "View access to tasks",
"tasks:write": "Create and modify access to tasks",
"tasks:delete": "Delete access to tasks",
"task_custom_types:read": "View access to task custom types",
"task_templates:read": "View access to task templates",
"team_memberships:read": "View access to team memberships",
"portfolios:read": "View access to portfolios",
"portfolios:write": "Create and modify access to portfolios",
"project_templates:read": "View access to project templates",
"project_portfolio_settings:read": "View access to project portfolio settings",
"project_portfolio_settings:write": "Create and modify access to project portfolio settings",
"projects:delete": "Delete access to projects",
"projects:read": "View access to projects",
"projects:write": "Create and modify access to projects",
"roles:read": "View access to roles",
"roles:write": "Create and modify access to roles",
"roles:delete": "Delete access to roles",
"users:read": "View access to users",
"teams:read": "View access to teams",
"time_tracking_categories:read": "View access to time tracking categories",
"time_tracking_categories:write": "Create and modify access to time tracking categories",
"time_tracking_categories:delete": "Delete access to time tracking categories",
"time_tracking_entries:read": "View access to time tracking entries",
"timesheet_approval_statuses:read": "View access to timesheet approval statuses",
"timesheet_approval_statuses:write": "Create and modify access to timesheet approval statuses",
"stories:read": "View access to stories",
"stories:write": "Create and modify access to stories",
"tags:read": "View access to tags",
"tags:write": "Create and modify access to tags",
"webhooks:read": "View access to webhooks",
"webhooks:write": "Create and modify access to webhooks",
"webhooks:delete": "Delete access to webhooks",
"workspaces:read": "View access to workspaces"
}
}
}
}
}
},
"paths": {
"/budgets/{budget_gid}": {
"parameters": [
{
"$ref": "#/components/parameters/budget_path_gid"
},
{
"$ref": "#/components/parameters/pretty"
}
],
"get": {
"summary": "Get a budget",
"description": "Returns the complete budget record for a single budget.",
"tags": [
"Budgets"
],
"operationId": "getBudget",
"parameters": [
{
"name": "opt_fields",
"in": "query",
"description": "This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.",
"required": false,
"example": [
"actual",
"actual.billable_status_filter",
"actual.units",
"actual.value",
"budget_type",
"estimate",
"estimate.billable_status_filter",
"estimate.enabled",
"estimate.source",
"estimate.units",
"estimate.value",
"parent",
"parent.name",
"total",
"total.enabled",
"total.units",
"total.value"
],
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"actual",
"actual.billable_status_filter",
"actual.units",
"actual.value",
"budget_type",
"estimate",
"estimate.billable_status_filter",
"estimate.enabled",
"estimate.source",
"estimate.units",
"estimate.value",
"parent",
"parent.name",
"total",
"total.enabled",
"total.units",
"total.value"
]
}
},
"style": "form",
"explode": false
}
],
"responses": {
"200": {
"description": "Successfully retrieved the requested budget.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/BudgetResponse"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"402": {
"$ref": "#/components/responses/PaymentRequired"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
},
"security": [
{
"personalAccessToken": []
},
{
"oauth2": []
}
],
"x-readme": {
"code-samples": [
{
"language": "node",
"install": "npm install asana",
"code": "const Asana = require('asana');\n\nlet client = new Asana.ApiClient();\nclient.authentications.token.accessToken = '<YOUR_ACCESS_TOKEN>';\n\nlet budgetsApiInstance = new Asana.BudgetsApi(client);\nlet budget_gid = \"12345\"; // String | Globally unique identifier for the budget.\nlet opts = { \n 'opt_fields': \"actual,actual.billable_status_filter,actual.units,actual.value,budget_type,estimate,estimate.billable_status_filter,estimate.enabled,estimate.source,estimate.units,estimate.value,parent,parent.name,total,total.enabled,total.units,total.value\"\n};\nbudgetsApiInstance.getBudget(budget_gid, opts).then((result) => {\n console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));\n}, (error) => {\n console.error(error.response.body);\n});",
"name": "node-sdk-v3"
},
{
"language": "python",
"install": "pip install asana",
"code": "import asana\nfrom asana.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = asana.Configuration()\nconfiguration.access_token = '<YOUR_ACCESS_TOKEN>'\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nbudgets_api_instance = asana.BudgetsApi(api_client)\nbudget_gid = \"12345\" # str | Globally unique identifier for the budget.\nopts = {\n 'opt_fields': \"actual,actual.billable_status_filter,actual.units,actual.value,budget_type,estimate,estimate.billable_status_filter,estimate.enabled,estimate.source,estimate.units,estimate.value,parent,parent.name,total,total.enabled,total.units,total.value\", # list[str] | This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.\n}\n\ntry:\n # Get a budget\n api_response = budgets_api_instance.get_budget(budget_gid, opts)\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling BudgetsApi->get_budget: %s\\n\" % e)",
"name": "python-sdk-v5"
}
]
}
}
}
}
}