openapi: 3.1.0 info: title: Asana Allocations Stories API description: The Asana Allocations API allows users to manage and allocate resources within their Asana project management system. An allocation object represents how much of a resource (e.g. person, team) is dedicated to a specific work object (e.g. project, portfolio) over a specific period of time. The effort value can be a percentage or number of hours. version: '1.0' 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 servers: - url: https://app.asana.com/api/1.0 description: Main endpoint. security: - personalAccessToken: [] - oauth2: [] tags: - name: Stories description: '*See [our forum post](https://forum.asana.com/t/no-more-parsing-story-text-new-fields-on-stories/42924) for more info on when conditional fields are returned.* A story represents an activity associated with an object in the Asana system. Stories are generated by the system whenever users take actions such as creating or assigning tasks, or moving tasks between projects. "Comments" are also a form of user-generated story.' paths: /stories/{story_gid}: parameters: - $ref: '#/components/parameters/story_path_gid' - $ref: '#/components/parameters/pretty' get: summary: Asana Get a story description: Returns the full record for a single story. tags: - Stories operationId: getStory parameters: - name: opt_fields in: query description: This endpoint returns a compact 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: - assignee - assignee.name - created_at - created_by - created_by.name - custom_field - custom_field.date_value - custom_field.date_value.date - custom_field.date_value.date_time - custom_field.display_value - custom_field.enabled - custom_field.enum_options - custom_field.enum_options.color - custom_field.enum_options.enabled - custom_field.enum_options.name - custom_field.enum_value - custom_field.enum_value.color - custom_field.enum_value.enabled - custom_field.enum_value.name - custom_field.id_prefix - custom_field.is_formula_field - custom_field.multi_enum_values - custom_field.multi_enum_values.color - custom_field.multi_enum_values.enabled - custom_field.multi_enum_values.name - custom_field.name - custom_field.number_value - custom_field.representation_type - custom_field.resource_subtype - custom_field.text_value - custom_field.type - dependency - dependency.created_by - dependency.name - dependency.resource_subtype - duplicate_of - duplicate_of.created_by - duplicate_of.name - duplicate_of.resource_subtype - duplicated_from - duplicated_from.created_by - duplicated_from.name - duplicated_from.resource_subtype - follower - follower.name - hearted - hearts - hearts.user - hearts.user.name - html_text - is_editable - is_edited - is_pinned - liked - likes - likes.user - likes.user.name - new_approval_status - new_date_value - new_dates - new_dates.due_at - new_dates.due_on - new_dates.start_on - new_enum_value - new_enum_value.color - new_enum_value.enabled - new_enum_value.name - new_multi_enum_values - new_multi_enum_values.color - new_multi_enum_values.enabled - new_multi_enum_values.name - new_name - new_number_value - new_people_value - new_people_value.name - new_resource_subtype - new_section - new_section.name - new_text_value - num_hearts - num_likes - old_approval_status - old_date_value - old_dates - old_dates.due_at - old_dates.due_on - old_dates.start_on - old_enum_value - old_enum_value.color - old_enum_value.enabled - old_enum_value.name - old_multi_enum_values - old_multi_enum_values.color - old_multi_enum_values.enabled - old_multi_enum_values.name - old_name - old_number_value - old_people_value - old_people_value.name - old_resource_subtype - old_section - old_section.name - old_text_value - previews - previews.fallback - previews.footer - previews.header - previews.header_link - previews.html_text - previews.text - previews.title - previews.title_link - project - project.name - resource_subtype - source - sticker_name - story - story.created_at - story.created_by - story.created_by.name - story.resource_subtype - story.text - tag - tag.name - target - target.created_by - target.name - target.resource_subtype - task - task.created_by - task.name - task.resource_subtype - text - type schema: type: array items: type: string enum: - assignee - assignee.name - created_at - created_by - created_by.name - custom_field - custom_field.date_value - custom_field.date_value.date - custom_field.date_value.date_time - custom_field.display_value - custom_field.enabled - custom_field.enum_options - custom_field.enum_options.color - custom_field.enum_options.enabled - custom_field.enum_options.name - custom_field.enum_value - custom_field.enum_value.color - custom_field.enum_value.enabled - custom_field.enum_value.name - custom_field.id_prefix - custom_field.is_formula_field - custom_field.multi_enum_values - custom_field.multi_enum_values.color - custom_field.multi_enum_values.enabled - custom_field.multi_enum_values.name - custom_field.name - custom_field.number_value - custom_field.representation_type - custom_field.resource_subtype - custom_field.text_value - custom_field.type - dependency - dependency.created_by - dependency.name - dependency.resource_subtype - duplicate_of - duplicate_of.created_by - duplicate_of.name - duplicate_of.resource_subtype - duplicated_from - duplicated_from.created_by - duplicated_from.name - duplicated_from.resource_subtype - follower - follower.name - hearted - hearts - hearts.user - hearts.user.name - html_text - is_editable - is_edited - is_pinned - liked - likes - likes.user - likes.user.name - new_approval_status - new_date_value - new_dates - new_dates.due_at - new_dates.due_on - new_dates.start_on - new_enum_value - new_enum_value.color - new_enum_value.enabled - new_enum_value.name - new_multi_enum_values - new_multi_enum_values.color - new_multi_enum_values.enabled - new_multi_enum_values.name - new_name - new_number_value - new_people_value - new_people_value.name - new_resource_subtype - new_section - new_section.name - new_text_value - num_hearts - num_likes - old_approval_status - old_date_value - old_dates - old_dates.due_at - old_dates.due_on - old_dates.start_on - old_enum_value - old_enum_value.color - old_enum_value.enabled - old_enum_value.name - old_multi_enum_values - old_multi_enum_values.color - old_multi_enum_values.enabled - old_multi_enum_values.name - old_name - old_number_value - old_people_value - old_people_value.name - old_resource_subtype - old_section - old_section.name - old_text_value - previews - previews.fallback - previews.footer - previews.header - previews.header_link - previews.html_text - previews.text - previews.title - previews.title_link - project - project.name - resource_subtype - source - sticker_name - story - story.created_at - story.created_by - story.created_by.name - story.resource_subtype - story.text - tag - tag.name - target - target.created_by - target.name - target.resource_subtype - task - task.created_by - task.name - task.resource_subtype - text - type style: form explode: false responses: 200: description: Successfully retrieved the specified story. content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/StoryResponse' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/Unauthorized' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' 500: $ref: '#/components/responses/InternalServerError' security: - oauth2: - stories:read x-readme: code-samples: - language: java install: com.asanaasana1.0.0 code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nStory result = client.stories.getStory(storyGid)\n .option(\"pretty\", true)\n .execute();" - language: node install: npm install asana code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '';\n\nlet storiesApiInstance = new Asana.StoriesApi();\nlet story_gid = \"35678\"; // String | Globally unique identifier for the story.\nlet opts = { \n 'opt_fields': \"assignee,assignee.name,created_at,created_by,created_by.name,custom_field,custom_field.date_value,custom_field.date_value.date,custom_field.date_value.date_time,custom_field.display_value,custom_field.enabled,custom_field.enum_options,custom_field.enum_options.color,custom_field.enum_options.enabled,custom_field.enum_options.name,custom_field.enum_value,custom_field.enum_value.color,custom_field.enum_value.enabled,custom_field.enum_value.name,custom_field.id_prefix,custom_field.is_formula_field,custom_field.multi_enum_values,custom_field.multi_enum_values.color,custom_field.multi_enum_values.enabled,custom_field.multi_enum_values.name,custom_field.name,custom_field.number_value,custom_field.representation_type,custom_field.resource_subtype,custom_field.text_value,custom_field.type,dependency,dependency.created_by,dependency.name,dependency.resource_subtype,duplicate_of,duplicate_of.created_by,duplicate_of.name,duplicate_of.resource_subtype,duplicated_from,duplicated_from.created_by,duplicated_from.name,duplicated_from.resource_subtype,follower,follower.name,hearted,hearts,hearts.user,hearts.user.name,html_text,is_editable,is_edited,is_pinned,liked,likes,likes.user,likes.user.name,new_approval_status,new_date_value,new_dates,new_dates.due_at,new_dates.due_on,new_dates.start_on,new_enum_value,new_enum_value.color,new_enum_value.enabled,new_enum_value.name,new_multi_enum_values,new_multi_enum_values.color,new_multi_enum_values.enabled,new_multi_enum_values.name,new_name,new_number_value,new_people_value,new_people_value.name,new_resource_subtype,new_section,new_section.name,new_text_value,num_hearts,num_likes,old_approval_status,old_date_value,old_dates,old_dates.due_at,old_dates.due_on,old_dates.start_on,old_enum_value,old_enum_value.color,old_enum_value.enabled,old_enum_value.name,old_multi_enum_values,old_multi_enum_values.color,old_multi_enum_values.enabled,old_multi_enum_values.name,old_name,old_number_value,old_people_value,old_people_value.name,old_resource_subtype,old_section,old_section.name,old_text_value,previews,previews.fallback,previews.footer,previews.header,previews.header_link,previews.html_text,previews.text,previews.title,previews.title_link,project,project.name,resource_subtype,source,sticker_name,story,story.created_at,story.created_by,story.created_by.name,story.resource_subtype,story.text,tag,tag.name,target,target.created_by,target.name,target.resource_subtype,task,task.created_by,task.name,task.resource_subtype,text,type\"\n};\nstoriesApiInstance.getStory(story_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: node install: npm install asana@1.0.5 code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.stories.getStory(storyGid, {param: \"value\", param: \"value\", opt_pretty: true})\n .then((result) => {\n console.log(result);\n });" name: node-sdk-v1 - 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 = ''\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nstories_api_instance = asana.StoriesApi(api_client)\nstory_gid = \"35678\" # str | Globally unique identifier for the story.\nopts = {\n 'opt_fields': \"assignee,assignee.name,created_at,created_by,created_by.name,custom_field,custom_field.date_value,custom_field.date_value.date,custom_field.date_value.date_time,custom_field.display_value,custom_field.enabled,custom_field.enum_options,custom_field.enum_options.color,custom_field.enum_options.enabled,custom_field.enum_options.name,custom_field.enum_value,custom_field.enum_value.color,custom_field.enum_value.enabled,custom_field.enum_value.name,custom_field.id_prefix,custom_field.is_formula_field,custom_field.multi_enum_values,custom_field.multi_enum_values.color,custom_field.multi_enum_values.enabled,custom_field.multi_enum_values.name,custom_field.name,custom_field.number_value,custom_field.representation_type,custom_field.resource_subtype,custom_field.text_value,custom_field.type,dependency,dependency.created_by,dependency.name,dependency.resource_subtype,duplicate_of,duplicate_of.created_by,duplicate_of.name,duplicate_of.resource_subtype,duplicated_from,duplicated_from.created_by,duplicated_from.name,duplicated_from.resource_subtype,follower,follower.name,hearted,hearts,hearts.user,hearts.user.name,html_text,is_editable,is_edited,is_pinned,liked,likes,likes.user,likes.user.name,new_approval_status,new_date_value,new_dates,new_dates.due_at,new_dates.due_on,new_dates.start_on,new_enum_value,new_enum_value.color,new_enum_value.enabled,new_enum_value.name,new_multi_enum_values,new_multi_enum_values.color,new_multi_enum_values.enabled,new_multi_enum_values.name,new_name,new_number_value,new_people_value,new_people_value.name,new_resource_subtype,new_section,new_section.name,new_text_value,num_hearts,num_likes,old_approval_status,old_date_value,old_dates,old_dates.due_at,old_dates.due_on,old_dates.start_on,old_enum_value,old_enum_value.color,old_enum_value.enabled,old_enum_value.name,old_multi_enum_values,old_multi_enum_values.color,old_multi_enum_values.enabled,old_multi_enum_values.name,old_name,old_number_value,old_people_value,old_people_value.name,old_resource_subtype,old_section,old_section.name,old_text_value,previews,previews.fallback,previews.footer,previews.header,previews.header_link,previews.html_text,previews.text,previews.title,previews.title_link,project,project.name,resource_subtype,source,sticker_name,story,story.created_at,story.created_by,story.created_by.name,story.resource_subtype,story.text,tag,tag.name,target,target.created_by,target.name,target.resource_subtype,task,task.created_by,task.name,task.resource_subtype,text,type\", # list[str] | This endpoint returns a compact 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 story\n api_response = stories_api_instance.get_story(story_gid, opts)\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling StoriesApi->get_story: %s\\n\" % e)" name: python-sdk-v5 - language: python install: pip install asana==3.2.3 code: 'import asana client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'') result = client.stories.get_story(story_gid, {''param'': ''value'', ''param'': ''value''}, opt_pretty=True)' name: python-sdk-v3 - language: php install: composer require asana/asana code: 'stories->getStory($story_gid, array(''param'' => ''value'', ''param'' => ''value''), array(''opt_pretty'' => ''true''))' - language: ruby install: gem install asana code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.stories.get_story(story_gid: 'story_gid', param: \"value\", param: \"value\", options: {pretty: true})" put: summary: Asana Update a story description: Updates the story and returns the full record for the updated story. Only comment stories can have their text updated, and only comment stories and attachment stories can be pinned. Only one of `text` and `html_text` can be specified. tags: - Stories operationId: updateStory parameters: - name: opt_fields in: query description: This endpoint returns a compact 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: - assignee - assignee.name - created_at - created_by - created_by.name - custom_field - custom_field.date_value - custom_field.date_value.date - custom_field.date_value.date_time - custom_field.display_value - custom_field.enabled - custom_field.enum_options - custom_field.enum_options.color - custom_field.enum_options.enabled - custom_field.enum_options.name - custom_field.enum_value - custom_field.enum_value.color - custom_field.enum_value.enabled - custom_field.enum_value.name - custom_field.id_prefix - custom_field.is_formula_field - custom_field.multi_enum_values - custom_field.multi_enum_values.color - custom_field.multi_enum_values.enabled - custom_field.multi_enum_values.name - custom_field.name - custom_field.number_value - custom_field.representation_type - custom_field.resource_subtype - custom_field.text_value - custom_field.type - dependency - dependency.created_by - dependency.name - dependency.resource_subtype - duplicate_of - duplicate_of.created_by - duplicate_of.name - duplicate_of.resource_subtype - duplicated_from - duplicated_from.created_by - duplicated_from.name - duplicated_from.resource_subtype - follower - follower.name - hearted - hearts - hearts.user - hearts.user.name - html_text - is_editable - is_edited - is_pinned - liked - likes - likes.user - likes.user.name - new_approval_status - new_date_value - new_dates - new_dates.due_at - new_dates.due_on - new_dates.start_on - new_enum_value - new_enum_value.color - new_enum_value.enabled - new_enum_value.name - new_multi_enum_values - new_multi_enum_values.color - new_multi_enum_values.enabled - new_multi_enum_values.name - new_name - new_number_value - new_people_value - new_people_value.name - new_resource_subtype - new_section - new_section.name - new_text_value - num_hearts - num_likes - old_approval_status - old_date_value - old_dates - old_dates.due_at - old_dates.due_on - old_dates.start_on - old_enum_value - old_enum_value.color - old_enum_value.enabled - old_enum_value.name - old_multi_enum_values - old_multi_enum_values.color - old_multi_enum_values.enabled - old_multi_enum_values.name - old_name - old_number_value - old_people_value - old_people_value.name - old_resource_subtype - old_section - old_section.name - old_text_value - previews - previews.fallback - previews.footer - previews.header - previews.header_link - previews.html_text - previews.text - previews.title - previews.title_link - project - project.name - resource_subtype - source - sticker_name - story - story.created_at - story.created_by - story.created_by.name - story.resource_subtype - story.text - tag - tag.name - target - target.created_by - target.name - target.resource_subtype - task - task.created_by - task.name - task.resource_subtype - text - type schema: type: array items: type: string enum: - assignee - assignee.name - created_at - created_by - created_by.name - custom_field - custom_field.date_value - custom_field.date_value.date - custom_field.date_value.date_time - custom_field.display_value - custom_field.enabled - custom_field.enum_options - custom_field.enum_options.color - custom_field.enum_options.enabled - custom_field.enum_options.name - custom_field.enum_value - custom_field.enum_value.color - custom_field.enum_value.enabled - custom_field.enum_value.name - custom_field.id_prefix - custom_field.is_formula_field - custom_field.multi_enum_values - custom_field.multi_enum_values.color - custom_field.multi_enum_values.enabled - custom_field.multi_enum_values.name - custom_field.name - custom_field.number_value - custom_field.representation_type - custom_field.resource_subtype - custom_field.text_value - custom_field.type - dependency - dependency.created_by - dependency.name - dependency.resource_subtype - duplicate_of - duplicate_of.created_by - duplicate_of.name - duplicate_of.resource_subtype - duplicated_from - duplicated_from.created_by - duplicated_from.name - duplicated_from.resource_subtype - follower - follower.name - hearted - hearts - hearts.user - hearts.user.name - html_text - is_editable - is_edited - is_pinned - liked - likes - likes.user - likes.user.name - new_approval_status - new_date_value - new_dates - new_dates.due_at - new_dates.due_on - new_dates.start_on - new_enum_value - new_enum_value.color - new_enum_value.enabled - new_enum_value.name - new_multi_enum_values - new_multi_enum_values.color - new_multi_enum_values.enabled - new_multi_enum_values.name - new_name - new_number_value - new_people_value - new_people_value.name - new_resource_subtype - new_section - new_section.name - new_text_value - num_hearts - num_likes - old_approval_status - old_date_value - old_dates - old_dates.due_at - old_dates.due_on - old_dates.start_on - old_enum_value - old_enum_value.color - old_enum_value.enabled - old_enum_value.name - old_multi_enum_values - old_multi_enum_values.color - old_multi_enum_values.enabled - old_multi_enum_values.name - old_name - old_number_value - old_people_value - old_people_value.name - old_resource_subtype - old_section - old_section.name - old_text_value - previews - previews.fallback - previews.footer - previews.header - previews.header_link - previews.html_text - previews.text - previews.title - previews.title_link - project - project.name - resource_subtype - source - sticker_name - story - story.created_at - story.created_by - story.created_by.name - story.resource_subtype - story.text - tag - tag.name - target - target.created_by - target.name - target.resource_subtype - task - task.created_by - task.name - task.resource_subtype - text - type style: form explode: false requestBody: description: The comment story to update. required: true content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/StoryRequest' responses: 200: description: Successfully retrieved the specified story. content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/StoryResponse' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/Unauthorized' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' 500: $ref: '#/components/responses/InternalServerError' x-readme: code-samples: - language: java install: com.asanaasana1.0.0 code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nStory result = client.stories.updateStory(storyGid)\n .data(\"field\", \"value\")\n .data(\"field\", \"value\")\n .option(\"pretty\", true)\n .execute();" - language: node install: npm install asana code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '';\n\nlet storiesApiInstance = new Asana.StoriesApi();\nlet body = {\"data\": {\"\": \"\", \"\": \"\",}}; // Object | The comment story to update.\nlet story_gid = \"35678\"; // String | Globally unique identifier for the story.\nlet opts = { \n 'opt_fields': \"assignee,assignee.name,created_at,created_by,created_by.name,custom_field,custom_field.date_value,custom_field.date_value.date,custom_field.date_value.date_time,custom_field.display_value,custom_field.enabled,custom_field.enum_options,custom_field.enum_options.color,custom_field.enum_options.enabled,custom_field.enum_options.name,custom_field.enum_value,custom_field.enum_value.color,custom_field.enum_value.enabled,custom_field.enum_value.name,custom_field.id_prefix,custom_field.is_formula_field,custom_field.multi_enum_values,custom_field.multi_enum_values.color,custom_field.multi_enum_values.enabled,custom_field.multi_enum_values.name,custom_field.name,custom_field.number_value,custom_field.representation_type,custom_field.resource_subtype,custom_field.text_value,custom_field.type,dependency,dependency.created_by,dependency.name,dependency.resource_subtype,duplicate_of,duplicate_of.created_by,duplicate_of.name,duplicate_of.resource_subtype,duplicated_from,duplicated_from.created_by,duplicated_from.name,duplicated_from.resource_subtype,follower,follower.name,hearted,hearts,hearts.user,hearts.user.name,html_text,is_editable,is_edited,is_pinned,liked,likes,likes.user,likes.user.name,new_approval_status,new_date_value,new_dates,new_dates.due_at,new_dates.due_on,new_dates.start_on,new_enum_value,new_enum_value.color,new_enum_value.enabled,new_enum_value.name,new_multi_enum_values,new_multi_enum_values.color,new_multi_enum_values.enabled,new_multi_enum_values.name,new_name,new_number_value,new_people_value,new_people_value.name,new_resource_subtype,new_section,new_section.name,new_text_value,num_hearts,num_likes,old_approval_status,old_date_value,old_dates,old_dates.due_at,old_dates.due_on,old_dates.start_on,old_enum_value,old_enum_value.color,old_enum_value.enabled,old_enum_value.name,old_multi_enum_values,old_multi_enum_values.color,old_multi_enum_values.enabled,old_multi_enum_values.name,old_name,old_number_value,old_people_value,old_people_value.name,old_resource_subtype,old_section,old_section.name,old_text_value,previews,previews.fallback,previews.footer,previews.header,previews.header_link,previews.html_text,previews.text,previews.title,previews.title_link,project,project.name,resource_subtype,source,sticker_name,story,story.created_at,story.created_by,story.created_by.name,story.resource_subtype,story.text,tag,tag.name,target,target.created_by,target.name,target.resource_subtype,task,task.created_by,task.name,task.resource_subtype,text,type\"\n};\nstoriesApiInstance.updateStory(body, story_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: node install: npm install asana@1.0.5 code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.stories.updateStory(storyGid, {field: \"value\", field: \"value\", pretty: true})\n .then((result) => {\n console.log(result);\n });" name: node-sdk-v1 - 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 = ''\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nstories_api_instance = asana.StoriesApi(api_client)\nbody = {\"data\": {\"\": \"\", \"\": \"\",}} # dict | The comment story to update.\nstory_gid = \"35678\" # str | Globally unique identifier for the story.\nopts = {\n 'opt_fields': \"assignee,assignee.name,created_at,created_by,created_by.name,custom_field,custom_field.date_value,custom_field.date_value.date,custom_field.date_value.date_time,custom_field.display_value,custom_field.enabled,custom_field.enum_options,custom_field.enum_options.color,custom_field.enum_options.enabled,custom_field.enum_options.name,custom_field.enum_value,custom_field.enum_value.color,custom_field.enum_value.enabled,custom_field.enum_value.name,custom_field.id_prefix,custom_field.is_formula_field,custom_field.multi_enum_values,custom_field.multi_enum_values.color,custom_field.multi_enum_values.enabled,custom_field.multi_enum_values.name,custom_field.name,custom_field.number_value,custom_field.representation_type,custom_field.resource_subtype,custom_field.text_value,custom_field.type,dependency,dependency.created_by,dependency.name,dependency.resource_subtype,duplicate_of,duplicate_of.created_by,duplicate_of.name,duplicate_of.resource_subtype,duplicated_from,duplicated_from.created_by,duplicated_from.name,duplicated_from.resource_subtype,follower,follower.name,hearted,hearts,hearts.user,hearts.user.name,html_text,is_editable,is_edited,is_pinned,liked,likes,likes.user,likes.user.name,new_approval_status,new_date_value,new_dates,new_dates.due_at,new_dates.due_on,new_dates.start_on,new_enum_value,new_enum_value.color,new_enum_value.enabled,new_enum_value.name,new_multi_enum_values,new_multi_enum_values.color,new_multi_enum_values.enabled,new_multi_enum_values.name,new_name,new_number_value,new_people_value,new_people_value.name,new_resource_subtype,new_section,new_section.name,new_text_value,num_hearts,num_likes,old_approval_status,old_date_value,old_dates,old_dates.due_at,old_dates.due_on,old_dates.start_on,old_enum_value,old_enum_value.color,old_enum_value.enabled,old_enum_value.name,old_multi_enum_values,old_multi_enum_values.color,old_multi_enum_values.enabled,old_multi_enum_values.name,old_name,old_number_value,old_people_value,old_people_value.name,old_resource_subtype,old_section,old_section.name,old_text_value,previews,previews.fallback,previews.footer,previews.header,previews.header_link,previews.html_text,previews.text,previews.title,previews.title_link,project,project.name,resource_subtype,source,sticker_name,story,story.created_at,story.created_by,story.created_by.name,story.resource_subtype,story.text,tag,tag.name,target,target.created_by,target.name,target.resource_subtype,task,task.created_by,task.name,task.resource_subtype,text,type\", # list[str] | This endpoint returns a compact 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 # Update a story\n api_response = stories_api_instance.update_story(body, story_gid, opts)\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling StoriesApi->update_story: %s\\n\" % e)" name: python-sdk-v5 - language: python install: pip install asana==3.2.3 code: 'import asana client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'') result = client.stories.update_story(story_gid, {''field'': ''value'', ''field'': ''value''}, opt_pretty=True)' name: python-sdk-v3 - language: php install: composer require asana/asana code: 'stories->updateStory($story_gid, array(''field'' => ''value'', ''field'' => ''value''), array(''opt_pretty'' => ''true''))' - language: ruby install: gem install asana code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.stories.update_story(story_gid: 'story_gid', field: \"value\", field: \"value\", options: {pretty: true})" delete: summary: Asana Delete a story description: 'Deletes a story. A user can only delete stories they have created. Returns an empty data record.' tags: - Stories operationId: deleteStory responses: 200: description: Successfully deleted the specified story. content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/EmptyResponse' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/Unauthorized' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' 500: $ref: '#/components/responses/InternalServerError' x-readme: code-samples: - language: java install: com.asanaasana1.0.0 code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nJsonElement result = client.stories.deleteStory(storyGid)\n .option(\"pretty\", true)\n .execute();" - language: node install: npm install asana code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '';\n\nlet storiesApiInstance = new Asana.StoriesApi();\nlet story_gid = \"35678\"; // String | Globally unique identifier for the story.\n\nstoriesApiInstance.deleteStory(story_gid).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: node install: npm install asana@1.0.5 code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.stories.deleteStory(storyGid)\n .then((result) => {\n console.log(result);\n });" name: node-sdk-v1 - 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 = ''\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nstories_api_instance = asana.StoriesApi(api_client)\nstory_gid = \"35678\" # str | Globally unique identifier for the story.\n\n\ntry:\n # Delete a story\n api_response = stories_api_instance.delete_story(story_gid)\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling StoriesApi->delete_story: %s\\n\" % e)" name: python-sdk-v5 - language: python install: pip install asana==3.2.3 code: 'import asana client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'') result = client.stories.delete_story(story_gid, opt_pretty=True)' name: python-sdk-v3 - language: php install: composer require asana/asana code: 'stories->deleteStory($story_gid, array(''opt_pretty'' => ''true''))' - language: ruby install: gem install asana code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.stories.delete_story(story_gid: 'story_gid', options: {pretty: true})" /tasks/{task_gid}/stories: parameters: - $ref: '#/components/parameters/task_path_gid' - $ref: '#/components/parameters/pretty' get: summary: Asana Get stories from a task description: Returns the compact records for all stories on the task. tags: - Stories operationId: getStoriesForTask parameters: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' - name: opt_fields in: query description: This endpoint returns a compact 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: - assignee - assignee.name - created_at - created_by - created_by.name - custom_field - custom_field.date_value - custom_field.date_value.date - custom_field.date_value.date_time - custom_field.display_value - custom_field.enabled - custom_field.enum_options - custom_field.enum_options.color - custom_field.enum_options.enabled - custom_field.enum_options.name - custom_field.enum_value - custom_field.enum_value.color - custom_field.enum_value.enabled - custom_field.enum_value.name - custom_field.id_prefix - custom_field.is_formula_field - custom_field.multi_enum_values - custom_field.multi_enum_values.color - custom_field.multi_enum_values.enabled - custom_field.multi_enum_values.name - custom_field.name - custom_field.number_value - custom_field.representation_type - custom_field.resource_subtype - custom_field.text_value - custom_field.type - dependency - dependency.created_by - dependency.name - dependency.resource_subtype - duplicate_of - duplicate_of.created_by - duplicate_of.name - duplicate_of.resource_subtype - duplicated_from - duplicated_from.created_by - duplicated_from.name - duplicated_from.resource_subtype - follower - follower.name - hearted - hearts - hearts.user - hearts.user.name - html_text - is_editable - is_edited - is_pinned - liked - likes - likes.user - likes.user.name - new_approval_status - new_date_value - new_dates - new_dates.due_at - new_dates.due_on - new_dates.start_on - new_enum_value - new_enum_value.color - new_enum_value.enabled - new_enum_value.name - new_multi_enum_values - new_multi_enum_values.color - new_multi_enum_values.enabled - new_multi_enum_values.name - new_name - new_number_value - new_people_value - new_people_value.name - new_resource_subtype - new_section - new_section.name - new_text_value - num_hearts - num_likes - offset - old_approval_status - old_date_value - old_dates - old_dates.due_at - old_dates.due_on - old_dates.start_on - old_enum_value - old_enum_value.color - old_enum_value.enabled - old_enum_value.name - old_multi_enum_values - old_multi_enum_values.color - old_multi_enum_values.enabled - old_multi_enum_values.name - old_name - old_number_value - old_people_value - old_people_value.name - old_resource_subtype - old_section - old_section.name - old_text_value - path - previews - previews.fallback - previews.footer - previews.header - previews.header_link - previews.html_text - previews.text - previews.title - previews.title_link - project - project.name - resource_subtype - source - sticker_name - story - story.created_at - story.created_by - story.created_by.name - story.resource_subtype - story.text - tag - tag.name - target - target.created_by - target.name - target.resource_subtype - task - task.created_by - task.name - task.resource_subtype - text - type - uri schema: type: array items: type: string enum: - assignee - assignee.name - created_at - created_by - created_by.name - custom_field - custom_field.date_value - custom_field.date_value.date - custom_field.date_value.date_time - custom_field.display_value - custom_field.enabled - custom_field.enum_options - custom_field.enum_options.color - custom_field.enum_options.enabled - custom_field.enum_options.name - custom_field.enum_value - custom_field.enum_value.color - custom_field.enum_value.enabled - custom_field.enum_value.name - custom_field.id_prefix - custom_field.is_formula_field - custom_field.multi_enum_values - custom_field.multi_enum_values.color - custom_field.multi_enum_values.enabled - custom_field.multi_enum_values.name - custom_field.name - custom_field.number_value - custom_field.representation_type - custom_field.resource_subtype - custom_field.text_value - custom_field.type - dependency - dependency.created_by - dependency.name - dependency.resource_subtype - duplicate_of - duplicate_of.created_by - duplicate_of.name - duplicate_of.resource_subtype - duplicated_from - duplicated_from.created_by - duplicated_from.name - duplicated_from.resource_subtype - follower - follower.name - hearted - hearts - hearts.user - hearts.user.name - html_text - is_editable - is_edited - is_pinned - liked - likes - likes.user - likes.user.name - new_approval_status - new_date_value - new_dates - new_dates.due_at - new_dates.due_on - new_dates.start_on - new_enum_value - new_enum_value.color - new_enum_value.enabled - new_enum_value.name - new_multi_enum_values - new_multi_enum_values.color - new_multi_enum_values.enabled - new_multi_enum_values.name - new_name - new_number_value - new_people_value - new_people_value.name - new_resource_subtype - new_section - new_section.name - new_text_value - num_hearts - num_likes - offset - old_approval_status - old_date_value - old_dates - old_dates.due_at - old_dates.due_on - old_dates.start_on - old_enum_value - old_enum_value.color - old_enum_value.enabled - old_enum_value.name - old_multi_enum_values - old_multi_enum_values.color - old_multi_enum_values.enabled - old_multi_enum_values.name - old_name - old_number_value - old_people_value - old_people_value.name - old_resource_subtype - old_section - old_section.name - old_text_value - path - previews - previews.fallback - previews.footer - previews.header - previews.header_link - previews.html_text - previews.text - previews.title - previews.title_link - project - project.name - resource_subtype - source - sticker_name - story - story.created_at - story.created_by - story.created_by.name - story.resource_subtype - story.text - tag - tag.name - target - target.created_by - target.name - target.resource_subtype - task - task.created_by - task.name - task.resource_subtype - text - type - uri style: form explode: false responses: 200: description: Successfully retrieved the specified task's stories. content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/StoryCompact' next_page: $ref: '#/components/schemas/NextPage' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/Unauthorized' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' 500: $ref: '#/components/responses/InternalServerError' security: - oauth2: - stories:read x-readme: code-samples: - language: java install: com.asanaasana1.0.0 code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nList result = client.stories.getStoriesForTask(taskGid)\n .option(\"pretty\", true)\n .execute();" - language: node install: npm install asana code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '';\n\nlet storiesApiInstance = new Asana.StoriesApi();\nlet task_gid = \"321654\"; // String | The task to operate on.\nlet opts = { \n 'limit': 50, \n 'offset': \"eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9\", \n 'opt_fields': \"assignee,assignee.name,created_at,created_by,created_by.name,custom_field,custom_field.date_value,custom_field.date_value.date,custom_field.date_value.date_time,custom_field.display_value,custom_field.enabled,custom_field.enum_options,custom_field.enum_options.color,custom_field.enum_options.enabled,custom_field.enum_options.name,custom_field.enum_value,custom_field.enum_value.color,custom_field.enum_value.enabled,custom_field.enum_value.name,custom_field.id_prefix,custom_field.is_formula_field,custom_field.multi_enum_values,custom_field.multi_enum_values.color,custom_field.multi_enum_values.enabled,custom_field.multi_enum_values.name,custom_field.name,custom_field.number_value,custom_field.representation_type,custom_field.resource_subtype,custom_field.text_value,custom_field.type,dependency,dependency.created_by,dependency.name,dependency.resource_subtype,duplicate_of,duplicate_of.created_by,duplicate_of.name,duplicate_of.resource_subtype,duplicated_from,duplicated_from.created_by,duplicated_from.name,duplicated_from.resource_subtype,follower,follower.name,hearted,hearts,hearts.user,hearts.user.name,html_text,is_editable,is_edited,is_pinned,liked,likes,likes.user,likes.user.name,new_approval_status,new_date_value,new_dates,new_dates.due_at,new_dates.due_on,new_dates.start_on,new_enum_value,new_enum_value.color,new_enum_value.enabled,new_enum_value.name,new_multi_enum_values,new_multi_enum_values.color,new_multi_enum_values.enabled,new_multi_enum_values.name,new_name,new_number_value,new_people_value,new_people_value.name,new_resource_subtype,new_section,new_section.name,new_text_value,num_hearts,num_likes,offset,old_approval_status,old_date_value,old_dates,old_dates.due_at,old_dates.due_on,old_dates.start_on,old_enum_value,old_enum_value.color,old_enum_value.enabled,old_enum_value.name,old_multi_enum_values,old_multi_enum_values.color,old_multi_enum_values.enabled,old_multi_enum_values.name,old_name,old_number_value,old_people_value,old_people_value.name,old_resource_subtype,old_section,old_section.name,old_text_value,path,previews,previews.fallback,previews.footer,previews.header,previews.header_link,previews.html_text,previews.text,previews.title,previews.title_link,project,project.name,resource_subtype,source,sticker_name,story,story.created_at,story.created_by,story.created_by.name,story.resource_subtype,story.text,tag,tag.name,target,target.created_by,target.name,target.resource_subtype,task,task.created_by,task.name,task.resource_subtype,text,type,uri\"\n};\nstoriesApiInstance.getStoriesForTask(task_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: node install: npm install asana@1.0.5 code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.stories.getStoriesForTask(taskGid, {param: \"value\", param: \"value\", opt_pretty: true})\n .then((result) => {\n console.log(result);\n });" name: node-sdk-v1 - 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 = ''\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nstories_api_instance = asana.StoriesApi(api_client)\ntask_gid = \"321654\" # str | The task to operate on.\nopts = {\n 'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.\n 'offset': \"eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9\", # str | Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*\n 'opt_fields': \"assignee,assignee.name,created_at,created_by,created_by.name,custom_field,custom_field.date_value,custom_field.date_value.date,custom_field.date_value.date_time,custom_field.display_value,custom_field.enabled,custom_field.enum_options,custom_field.enum_options.color,custom_field.enum_options.enabled,custom_field.enum_options.name,custom_field.enum_value,custom_field.enum_value.color,custom_field.enum_value.enabled,custom_field.enum_value.name,custom_field.id_prefix,custom_field.is_formula_field,custom_field.multi_enum_values,custom_field.multi_enum_values.color,custom_field.multi_enum_values.enabled,custom_field.multi_enum_values.name,custom_field.name,custom_field.number_value,custom_field.representation_type,custom_field.resource_subtype,custom_field.text_value,custom_field.type,dependency,dependency.created_by,dependency.name,dependency.resource_subtype,duplicate_of,duplicate_of.created_by,duplicate_of.name,duplicate_of.resource_subtype,duplicated_from,duplicated_from.created_by,duplicated_from.name,duplicated_from.resource_subtype,follower,follower.name,hearted,hearts,hearts.user,hearts.user.name,html_text,is_editable,is_edited,is_pinned,liked,likes,likes.user,likes.user.name,new_approval_status,new_date_value,new_dates,new_dates.due_at,new_dates.due_on,new_dates.start_on,new_enum_value,new_enum_value.color,new_enum_value.enabled,new_enum_value.name,new_multi_enum_values,new_multi_enum_values.color,new_multi_enum_values.enabled,new_multi_enum_values.name,new_name,new_number_value,new_people_value,new_people_value.name,new_resource_subtype,new_section,new_section.name,new_text_value,num_hearts,num_likes,offset,old_approval_status,old_date_value,old_dates,old_dates.due_at,old_dates.due_on,old_dates.start_on,old_enum_value,old_enum_value.color,old_enum_value.enabled,old_enum_value.name,old_multi_enum_values,old_multi_enum_values.color,old_multi_enum_values.enabled,old_multi_enum_values.name,old_name,old_number_value,old_people_value,old_people_value.name,old_resource_subtype,old_section,old_section.name,old_text_value,path,previews,previews.fallback,previews.footer,previews.header,previews.header_link,previews.html_text,previews.text,previews.title,previews.title_link,project,project.name,resource_subtype,source,sticker_name,story,story.created_at,story.created_by,story.created_by.name,story.resource_subtype,story.text,tag,tag.name,target,target.created_by,target.name,target.resource_subtype,task,task.created_by,task.name,task.resource_subtype,text,type,uri\", # list[str] | This endpoint returns a compact 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 stories from a task\n api_response = stories_api_instance.get_stories_for_task(task_gid, opts)\n for data in api_response:\n pprint(data)\nexcept ApiException as e:\n print(\"Exception when calling StoriesApi->get_stories_for_task: %s\\n\" % e)" name: python-sdk-v5 - language: python install: pip install asana==3.2.3 code: 'import asana client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'') result = client.stories.get_stories_for_task(task_gid, {''param'': ''value'', ''param'': ''value''}, opt_pretty=True)' name: python-sdk-v3 - language: php install: composer require asana/asana code: 'stories->getStoriesForTask($task_gid, array(''param'' => ''value'', ''param'' => ''value''), array(''opt_pretty'' => ''true''))' - language: ruby install: gem install asana code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.stories.get_stories_for_task(task_gid: 'task_gid', param: \"value\", param: \"value\", options: {pretty: true})" post: summary: Asana Create a story on a task description: 'Adds a story to a task. This endpoint currently only allows for comment stories to be created. The comment will be authored by the currently authenticated user, and timestamped when the server receives the request. Returns the full record for the new story added to the task.' tags: - Stories operationId: createStoryForTask parameters: - name: opt_fields in: query description: This endpoint returns a compact 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: - assignee - assignee.name - created_at - created_by - created_by.name - custom_field - custom_field.date_value - custom_field.date_value.date - custom_field.date_value.date_time - custom_field.display_value - custom_field.enabled - custom_field.enum_options - custom_field.enum_options.color - custom_field.enum_options.enabled - custom_field.enum_options.name - custom_field.enum_value - custom_field.enum_value.color - custom_field.enum_value.enabled - custom_field.enum_value.name - custom_field.id_prefix - custom_field.is_formula_field - custom_field.multi_enum_values - custom_field.multi_enum_values.color - custom_field.multi_enum_values.enabled - custom_field.multi_enum_values.name - custom_field.name - custom_field.number_value - custom_field.representation_type - custom_field.resource_subtype - custom_field.text_value - custom_field.type - dependency - dependency.created_by - dependency.name - dependency.resource_subtype - duplicate_of - duplicate_of.created_by - duplicate_of.name - duplicate_of.resource_subtype - duplicated_from - duplicated_from.created_by - duplicated_from.name - duplicated_from.resource_subtype - follower - follower.name - hearted - hearts - hearts.user - hearts.user.name - html_text - is_editable - is_edited - is_pinned - liked - likes - likes.user - likes.user.name - new_approval_status - new_date_value - new_dates - new_dates.due_at - new_dates.due_on - new_dates.start_on - new_enum_value - new_enum_value.color - new_enum_value.enabled - new_enum_value.name - new_multi_enum_values - new_multi_enum_values.color - new_multi_enum_values.enabled - new_multi_enum_values.name - new_name - new_number_value - new_people_value - new_people_value.name - new_resource_subtype - new_section - new_section.name - new_text_value - num_hearts - num_likes - old_approval_status - old_date_value - old_dates - old_dates.due_at - old_dates.due_on - old_dates.start_on - old_enum_value - old_enum_value.color - old_enum_value.enabled - old_enum_value.name - old_multi_enum_values - old_multi_enum_values.color - old_multi_enum_values.enabled - old_multi_enum_values.name - old_name - old_number_value - old_people_value - old_people_value.name - old_resource_subtype - old_section - old_section.name - old_text_value - previews - previews.fallback - previews.footer - previews.header - previews.header_link - previews.html_text - previews.text - previews.title - previews.title_link - project - project.name - resource_subtype - source - sticker_name - story - story.created_at - story.created_by - story.created_by.name - story.resource_subtype - story.text - tag - tag.name - target - target.created_by - target.name - target.resource_subtype - task - task.created_by - task.name - task.resource_subtype - text - type schema: type: array items: type: string enum: - assignee - assignee.name - created_at - created_by - created_by.name - custom_field - custom_field.date_value - custom_field.date_value.date - custom_field.date_value.date_time - custom_field.display_value - custom_field.enabled - custom_field.enum_options - custom_field.enum_options.color - custom_field.enum_options.enabled - custom_field.enum_options.name - custom_field.enum_value - custom_field.enum_value.color - custom_field.enum_value.enabled - custom_field.enum_value.name - custom_field.id_prefix - custom_field.is_formula_field - custom_field.multi_enum_values - custom_field.multi_enum_values.color - custom_field.multi_enum_values.enabled - custom_field.multi_enum_values.name - custom_field.name - custom_field.number_value - custom_field.representation_type - custom_field.resource_subtype - custom_field.text_value - custom_field.type - dependency - dependency.created_by - dependency.name - dependency.resource_subtype - duplicate_of - duplicate_of.created_by - duplicate_of.name - duplicate_of.resource_subtype - duplicated_from - duplicated_from.created_by - duplicated_from.name - duplicated_from.resource_subtype - follower - follower.name - hearted - hearts - hearts.user - hearts.user.name - html_text - is_editable - is_edited - is_pinned - liked - likes - likes.user - likes.user.name - new_approval_status - new_date_value - new_dates - new_dates.due_at - new_dates.due_on - new_dates.start_on - new_enum_value - new_enum_value.color - new_enum_value.enabled - new_enum_value.name - new_multi_enum_values - new_multi_enum_values.color - new_multi_enum_values.enabled - new_multi_enum_values.name - new_name - new_number_value - new_people_value - new_people_value.name - new_resource_subtype - new_section - new_section.name - new_text_value - num_hearts - num_likes - old_approval_status - old_date_value - old_dates - old_dates.due_at - old_dates.due_on - old_dates.start_on - old_enum_value - old_enum_value.color - old_enum_value.enabled - old_enum_value.name - old_multi_enum_values - old_multi_enum_values.color - old_multi_enum_values.enabled - old_multi_enum_values.name - old_name - old_number_value - old_people_value - old_people_value.name - old_resource_subtype - old_section - old_section.name - old_text_value - previews - previews.fallback - previews.footer - previews.header - previews.header_link - previews.html_text - previews.text - previews.title - previews.title_link - project - project.name - resource_subtype - source - sticker_name - story - story.created_at - story.created_by - story.created_by.name - story.resource_subtype - story.text - tag - tag.name - target - target.created_by - target.name - target.resource_subtype - task - task.created_by - task.name - task.resource_subtype - text - type style: form explode: false requestBody: description: The story to create. required: true content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/StoryRequest' responses: 201: description: Successfully created a new story. content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/StoryResponse' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/Unauthorized' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' 500: $ref: '#/components/responses/InternalServerError' x-readme: code-samples: - language: java install: com.asanaasana1.0.0 code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nStory result = client.stories.createStoryForTask(taskGid)\n .data(\"field\", \"value\")\n .data(\"field\", \"value\")\n .option(\"pretty\", true)\n .execute();" - language: node install: npm install asana code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '';\n\nlet storiesApiInstance = new Asana.StoriesApi();\nlet body = {\"data\": {\"\": \"\", \"\": \"\",}}; // Object | The story to create.\nlet task_gid = \"321654\"; // String | The task to operate on.\nlet opts = { \n 'opt_fields': \"assignee,assignee.name,created_at,created_by,created_by.name,custom_field,custom_field.date_value,custom_field.date_value.date,custom_field.date_value.date_time,custom_field.display_value,custom_field.enabled,custom_field.enum_options,custom_field.enum_options.color,custom_field.enum_options.enabled,custom_field.enum_options.name,custom_field.enum_value,custom_field.enum_value.color,custom_field.enum_value.enabled,custom_field.enum_value.name,custom_field.id_prefix,custom_field.is_formula_field,custom_field.multi_enum_values,custom_field.multi_enum_values.color,custom_field.multi_enum_values.enabled,custom_field.multi_enum_values.name,custom_field.name,custom_field.number_value,custom_field.representation_type,custom_field.resource_subtype,custom_field.text_value,custom_field.type,dependency,dependency.created_by,dependency.name,dependency.resource_subtype,duplicate_of,duplicate_of.created_by,duplicate_of.name,duplicate_of.resource_subtype,duplicated_from,duplicated_from.created_by,duplicated_from.name,duplicated_from.resource_subtype,follower,follower.name,hearted,hearts,hearts.user,hearts.user.name,html_text,is_editable,is_edited,is_pinned,liked,likes,likes.user,likes.user.name,new_approval_status,new_date_value,new_dates,new_dates.due_at,new_dates.due_on,new_dates.start_on,new_enum_value,new_enum_value.color,new_enum_value.enabled,new_enum_value.name,new_multi_enum_values,new_multi_enum_values.color,new_multi_enum_values.enabled,new_multi_enum_values.name,new_name,new_number_value,new_people_value,new_people_value.name,new_resource_subtype,new_section,new_section.name,new_text_value,num_hearts,num_likes,old_approval_status,old_date_value,old_dates,old_dates.due_at,old_dates.due_on,old_dates.start_on,old_enum_value,old_enum_value.color,old_enum_value.enabled,old_enum_value.name,old_multi_enum_values,old_multi_enum_values.color,old_multi_enum_values.enabled,old_multi_enum_values.name,old_name,old_number_value,old_people_value,old_people_value.name,old_resource_subtype,old_section,old_section.name,old_text_value,previews,previews.fallback,previews.footer,previews.header,previews.header_link,previews.html_text,previews.text,previews.title,previews.title_link,project,project.name,resource_subtype,source,sticker_name,story,story.created_at,story.created_by,story.created_by.name,story.resource_subtype,story.text,tag,tag.name,target,target.created_by,target.name,target.resource_subtype,task,task.created_by,task.name,task.resource_subtype,text,type\"\n};\nstoriesApiInstance.createStoryForTask(body, task_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: node install: npm install asana@1.0.5 code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.stories.createStoryForTask(taskGid, {field: \"value\", field: \"value\", pretty: true})\n .then((result) => {\n console.log(result);\n });" name: node-sdk-v1 - 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 = ''\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\nstories_api_instance = asana.StoriesApi(api_client)\nbody = {\"data\": {\"\": \"\", \"\": \"\",}} # dict | The story to create.\ntask_gid = \"321654\" # str | The task to operate on.\nopts = {\n 'opt_fields': \"assignee,assignee.name,created_at,created_by,created_by.name,custom_field,custom_field.date_value,custom_field.date_value.date,custom_field.date_value.date_time,custom_field.display_value,custom_field.enabled,custom_field.enum_options,custom_field.enum_options.color,custom_field.enum_options.enabled,custom_field.enum_options.name,custom_field.enum_value,custom_field.enum_value.color,custom_field.enum_value.enabled,custom_field.enum_value.name,custom_field.id_prefix,custom_field.is_formula_field,custom_field.multi_enum_values,custom_field.multi_enum_values.color,custom_field.multi_enum_values.enabled,custom_field.multi_enum_values.name,custom_field.name,custom_field.number_value,custom_field.representation_type,custom_field.resource_subtype,custom_field.text_value,custom_field.type,dependency,dependency.created_by,dependency.name,dependency.resource_subtype,duplicate_of,duplicate_of.created_by,duplicate_of.name,duplicate_of.resource_subtype,duplicated_from,duplicated_from.created_by,duplicated_from.name,duplicated_from.resource_subtype,follower,follower.name,hearted,hearts,hearts.user,hearts.user.name,html_text,is_editable,is_edited,is_pinned,liked,likes,likes.user,likes.user.name,new_approval_status,new_date_value,new_dates,new_dates.due_at,new_dates.due_on,new_dates.start_on,new_enum_value,new_enum_value.color,new_enum_value.enabled,new_enum_value.name,new_multi_enum_values,new_multi_enum_values.color,new_multi_enum_values.enabled,new_multi_enum_values.name,new_name,new_number_value,new_people_value,new_people_value.name,new_resource_subtype,new_section,new_section.name,new_text_value,num_hearts,num_likes,old_approval_status,old_date_value,old_dates,old_dates.due_at,old_dates.due_on,old_dates.start_on,old_enum_value,old_enum_value.color,old_enum_value.enabled,old_enum_value.name,old_multi_enum_values,old_multi_enum_values.color,old_multi_enum_values.enabled,old_multi_enum_values.name,old_name,old_number_value,old_people_value,old_people_value.name,old_resource_subtype,old_section,old_section.name,old_text_value,previews,previews.fallback,previews.footer,previews.header,previews.header_link,previews.html_text,previews.text,previews.title,previews.title_link,project,project.name,resource_subtype,source,sticker_name,story,story.created_at,story.created_by,story.created_by.name,story.resource_subtype,story.text,tag,tag.name,target,target.created_by,target.name,target.resource_subtype,task,task.created_by,task.name,task.resource_subtype,text,type\", # list[str] | This endpoint returns a compact 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 # Create a story on a task\n api_response = stories_api_instance.create_story_for_task(body, task_gid, opts)\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling StoriesApi->create_story_for_task: %s\\n\" % e)" name: python-sdk-v5 - language: python install: pip install asana==3.2.3 code: 'import asana client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'') result = client.stories.create_story_for_task(task_gid, {''field'': ''value'', ''field'': ''value''}, opt_pretty=True)' name: python-sdk-v3 - language: php install: composer require asana/asana code: 'stories->createStoryForTask($task_gid, array(''field'' => ''value'', ''field'' => ''value''), array(''opt_pretty'' => ''true''))' - language: ruby install: gem install asana code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.stories.create_story_for_task(task_gid: 'task_gid', field: \"value\", field: \"value\", options: {pretty: true})" components: schemas: EmptyResponse: type: object description: An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object. TagCompact: description: A *tag* is a label that can be attached to any task in Asana. It exists in a single workspace or organization. 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: tag x-insert-after: gid name: description: Name of the tag. 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 UserCompact: description: A *user* object represents an account in Asana that can be given access to various workspaces, projects, and tasks. 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: user x-insert-after: gid name: type: string description: '*Read-only except when same user as requester*. The user’s name.' example: Greg Sanchez StoryResponseDates: description: '*Conditional*' type: object readOnly: true properties: start_on: description: The day on which work for this goal begins, or null if the goal has no start date. This takes a date with `YYYY-MM-DD` format, and cannot be set unless there is an accompanying due date. type: string format: date example: '2019-09-14' nullable: true due_at: description: The UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with `due_on`. type: string format: date-time example: '2019-09-15T02:06:58.158Z' nullable: true due_on: description: The localized day on which this goal is due. This takes a date with format `YYYY-MM-DD`. type: string format: date example: '2019-09-15' 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 occur for a wide range of reasons. In all cases, the API should return an HTTP Status Code that indicates the nature of the failure, with a response body in JSON format containing additional information. In the event of a server error the response body will contain an error phrase. These phrases are automatically generated using the [node-asana-phrase library](https://github.com/Asana/node-asana-phrase) and can be used by Asana support to quickly look up the incident that caused the server error.' 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 EnumOption: description: 'Enum options are the possible values which an enum custom field can adopt. An enum custom field must contain at least 1 enum option but no more than 500. You can add enum options to a custom field by using the `POST /custom_fields/custom_field_gid/enum_options` endpoint. **It is not possible to remove or delete an enum option**. Instead, enum options can be disabled by updating the `enabled` field to false with the `PUT /enum_options/enum_option_gid` endpoint. Other attributes can be updated similarly. On creation of an enum option, `enabled` is always set to `true`, meaning the enum option is a selectable value for the custom field. Setting `enabled=false` is equivalent to “trashing” the enum option in the Asana web app within the “Edit Fields” dialog. The enum option will no longer be selectable but, if the enum option value was previously set within a task, the task will retain the value. Enum options are an ordered list and by default new enum options are inserted at the end. Ordering in relation to existing enum options can be specified on creation by using `insert_before` or `insert_after` to reference an existing enum option. Only one of `insert_before` and `insert_after` can be provided when creating a new enum option. An enum options list can be reordered with the `POST /custom_fields/custom_field_gid/enum_options/insert` endpoint.' 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: enum_option x-insert-after: gid name: description: The name of the enum option. type: string example: Low enabled: description: Whether or not the enum option is a selectable value for the custom field. type: boolean example: true color: description: The color of the enum option. Defaults to ‘none’. type: string example: blue Like: type: object description: An object to represent a user's like. properties: gid: description: Globally unique identifier of the object, as a string. type: string readOnly: true example: '12345' user: $ref: '#/components/schemas/UserCompact' SectionCompact: description: A *section* is a subdivision of a project that groups tasks together. It can either be a header above a list of tasks in a list view or a column in a board view of a project. 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: section x-insert-after: gid name: description: The name of the section (i.e. the text displayed as the section header). type: string example: Next Actions CustomFieldCompact: description: 'Custom Fields store the metadata that is used in order to add user-specified information to tasks in Asana. Be sure to reference the [custom fields](/reference/custom-fields) developer documentation for more information about how custom fields relate to various resources in Asana. Users in Asana can [lock custom fields](https://asana.com/guide/help/premium/custom-fields#gl-lock-fields), which will make them read-only when accessed by other users. Attempting to edit a locked custom field will return HTTP error code `403 Forbidden`.' 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: custom_field x-insert-after: gid name: description: The name of the custom field. type: string example: Status resource_subtype: description: 'The type of the custom field. Must be one of the given values. ' type: string readOnly: true example: text enum: - text - enum - multi_enum - number - date - people type: description: '*Deprecated: new integrations should prefer the resource_subtype field.* The type of the custom field. Must be one of the given values. ' type: string readOnly: true enum: - text - enum - multi_enum - number - date - people enum_options: description: '*Conditional*. Only relevant for custom fields of type `enum`. This array specifies the possible values which an `enum` custom field can adopt. To modify the enum options, refer to [working with enum options](/reference/createenumoptionforcustomfield).' type: array items: $ref: '#/components/schemas/EnumOption' enabled: description: '*Conditional*. Determines if the custom field is enabled or not.' type: boolean readOnly: true example: true representation_type: description: This field tells the type of the custom field. type: string example: number readOnly: true enum: - text - enum - multi_enum - number - date - people - formula - custom_id id_prefix: description: This field is the unique custom ID string for the custom field. type: string nullable: true example: ID is_formula_field: description: '*Conditional*. This flag describes whether a custom field is a formula custom field.' type: boolean example: false date_value: description: '*Conditional*. Only relevant for custom fields of type `date`. This object reflects the chosen date (and optionally, time) value of a `date` custom field. If no date is selected, the value of `date_value` will be `null`.' type: object nullable: true properties: date: type: string description: A string representing the date in YYYY-MM-DD format. example: '2024-08-23' date_time: type: string description: A string representing the date in ISO 8601 format. If no time value is selected, the value of `date-time` will be `null`. example: '2024-08-23T22:00:00.000Z' enum_value: allOf: - $ref: '#/components/schemas/EnumOption' - type: object nullable: true description: '*Conditional*. Only relevant for custom fields of type `enum`. This object is the chosen value of an `enum` custom field.' multi_enum_values: description: '*Conditional*. Only relevant for custom fields of type `multi_enum`. This object is the chosen values of a `multi_enum` custom field.' type: array items: $ref: '#/components/schemas/EnumOption' number_value: description: '*Conditional*. This number is the value of a `number` custom field.' type: number nullable: true example: 5.2 text_value: description: '*Conditional*. This string is the value of a `text` custom field.' type: string nullable: true example: Some Value display_value: description: A string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types. type: string readOnly: true example: blue nullable: true StoryBase: description: A story represents an activity associated with an object in the Asana system. 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: story x-insert-after: gid created_at: description: The time at which this resource was created. type: string format: date-time readOnly: true example: '2012-02-22T02:06:58.147Z' resource_subtype: description: The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. type: string readOnly: true example: comment_added text: description: The plain text of the comment to add. Cannot be used with html_text. type: string example: This is a comment. html_text: description: '[Opt In](/docs/inputoutput-options). HTML formatted text for a comment. This will not include the name of the creator.' type: string example: This is a comment. is_pinned: description: '*Conditional*. Whether the story should be pinned on the resource.' type: boolean example: false sticker_name: description: The name of the sticker in this story. `null` if there is no sticker. type: string enum: - green_checkmark - people_dancing - dancing_unicorn - heart - party_popper - people_waving_flags - splashing_narwhal - trophy - yeti_riding_unicorn - celebrating_people - determined_climbers - phoenix_spreading_love example: dancing_unicorn Preview: type: object description: 'A collection of rich text that will be displayed as a preview to another app. This is read-only except for a small group of whitelisted apps.' readOnly: true properties: fallback: description: Some fallback text to display if unable to display the full preview. type: string example: 'Greg: Great! I like this idea.\n\nhttps//a_company.slack.com/archives/ABCDEFG/12345678' footer: description: Text to display in the footer. type: string example: Mar 17, 2019 1:25 PM header: description: Text to display in the header. type: string example: Asana for Slack header_link: description: Where the header will link to. type: string example: https://asana.comn/apps/slack html_text: description: HTML formatted text for the body of the preview. type: string example: Great! I like this idea. text: description: Text for the body of the preview. type: string example: Great! I like this idea. title: description: Text to display as the title. type: string example: Greg title_link: description: Where to title will link to. type: string example: https://asana.slack.com/archives/ABCDEFG/12345678 NextPage: type: object nullable: true description: '*Conditional*. This property is only present when a limit query parameter is provided in the request. When making a paginated request, the API will return a number of results as specified by the limit parameter. If more results exist, then the response will contain a next_page attribute, which will include an offset, a relative path attribute, and a full uri attribute. If there are no more pages available, next_page will be null and no offset will be provided. Note that an offset token will expire after some time, as data may have changed.' properties: offset: type: string readOnly: true description: Pagination offset for the request. example: eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9 path: type: string readOnly: true description: A relative path containing the query parameters to fetch for next_page example: /tasks/12345/attachments?limit=2&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9 uri: type: string format: uri readOnly: true description: A full uri containing the query parameters to fetch for next_page example: https://app.asana.com/api/1.0/tasks/12345/attachments?limit=2&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9 StoryResponse: allOf: - $ref: '#/components/schemas/StoryBase' - type: object properties: created_by: $ref: '#/components/schemas/UserCompact' type: type: string enum: - comment - system readOnly: true example: comment is_editable: description: '*Conditional*. Whether the text of the story can be edited after creation.' type: boolean readOnly: true example: false is_edited: description: '*Conditional*. Whether the text of the story has been edited after creation.' type: boolean readOnly: true example: false hearted: description: '*Deprecated - please use likes instead* *Conditional*. True if the story is hearted by the authorized user, false if not.' type: boolean readOnly: true example: false hearts: description: '*Deprecated - please use likes instead* *Conditional*. Array of likes for users who have hearted this story.' type: array items: $ref: '#/components/schemas/Like' readOnly: true num_hearts: description: '*Deprecated - please use likes instead* *Conditional*. The number of users who have hearted this story.' type: integer readOnly: true example: 5 liked: description: '*Conditional*. True if the story is liked by the authorized user, false if not.' type: boolean readOnly: true example: false likes: description: '*Conditional*. Array of likes for users who have liked this story.' type: array items: $ref: '#/components/schemas/Like' readOnly: true num_likes: description: '*Conditional*. The number of users who have liked this story.' type: integer readOnly: true example: 5 previews: description: '*Conditional*. A collection of previews to be displayed in the story. *Note: This property only exists for comment stories.*' type: array items: $ref: '#/components/schemas/Preview' readOnly: true old_name: description: '*Conditional*''' type: string example: This was the Old Name new_name: description: '*Conditional*' type: string nullable: true readOnly: true example: This is the New Name old_dates: $ref: '#/components/schemas/StoryResponseDates' new_dates: $ref: '#/components/schemas/StoryResponseDates' old_resource_subtype: description: '*Conditional*' type: string readOnly: true example: default_task new_resource_subtype: description: '*Conditional*' type: string readOnly: true example: milestone story: description: '*Conditional*' $ref: '#/components/schemas/StoryCompact' readOnly: true assignee: description: '*Conditional*' $ref: '#/components/schemas/UserCompact' readOnly: true follower: description: '*Conditional*' $ref: '#/components/schemas/UserCompact' readOnly: true old_section: description: '*Conditional*' $ref: '#/components/schemas/SectionCompact' readOnly: true new_section: description: '*Conditional*' $ref: '#/components/schemas/SectionCompact' readOnly: true task: description: '*Conditional*' $ref: '#/components/schemas/TaskCompact' readOnly: true project: description: '*Conditional*' $ref: '#/components/schemas/ProjectCompact' readOnly: true tag: description: '*Conditional*' $ref: '#/components/schemas/TagCompact' readOnly: true custom_field: description: '*Conditional*' $ref: '#/components/schemas/CustomFieldCompact' readOnly: true old_text_value: description: '*Conditional*' type: string readOnly: true example: This was the Old Text new_text_value: description: '*Conditional*' type: string readOnly: true example: This is the New Text old_number_value: description: '*Conditional*' type: integer nullable: true readOnly: true example: 1 new_number_value: description: '*Conditional*' type: integer readOnly: true example: 2 old_enum_value: description: '*Conditional*' $ref: '#/components/schemas/EnumOption' readOnly: true new_enum_value: description: '*Conditional*' $ref: '#/components/schemas/EnumOption' readOnly: true old_date_value: allOf: - $ref: '#/components/schemas/StoryResponseDates' - description: '*Conditional*. The old value of a date custom field story.' readOnly: true new_date_value: allOf: - $ref: '#/components/schemas/StoryResponseDates' - description: '*Conditional* The new value of a date custom field story.' readOnly: true old_people_value: description: '*Conditional*. The old value of a people custom field story.' type: array items: $ref: '#/components/schemas/UserCompact' readOnly: true new_people_value: description: '*Conditional*. The new value of a people custom field story.' type: array items: $ref: '#/components/schemas/UserCompact' readOnly: true old_multi_enum_values: description: '*Conditional*. The old value of a multi-enum custom field story.' type: array items: $ref: '#/components/schemas/EnumOption' readOnly: true new_multi_enum_values: description: '*Conditional*. The new value of a multi-enum custom field story.' type: array items: $ref: '#/components/schemas/EnumOption' readOnly: true new_approval_status: description: '*Conditional*. The new value of approval status.' type: string readOnly: true example: approved old_approval_status: description: '*Conditional*. The old value of approval status.' type: string readOnly: true example: pending duplicate_of: description: '*Conditional*' $ref: '#/components/schemas/TaskCompact' readOnly: true duplicated_from: description: '*Conditional*' $ref: '#/components/schemas/TaskCompact' readOnly: true dependency: description: '*Conditional*' $ref: '#/components/schemas/TaskCompact' readOnly: true source: description: The component of the Asana product the user used to trigger the story. type: string enum: - web - email - mobile - api - unknown readOnly: true example: web target: allOf: - $ref: '#/components/schemas/TaskCompact' - type: object readOnly: true description: The object this story is associated with. Currently may only be a task. StoryRequest: $ref: '#/components/schemas/StoryBase' TaskCompact: description: The *task* is the basic object around which many operations in Asana are centered. 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: task x-insert-after: gid name: description: The name of the task. type: string example: Bug Task resource_subtype: type: string description: 'The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. The resource_subtype `milestone` represent a single moment in time. This means tasks with this subtype cannot have a start_date.' enum: - default_task - milestone - approval example: default_task created_by: type: object readOnly: true description: '[Opt In](/docs/inputoutput-options). A *user* object represents an account in Asana that can be given access to various workspaces, projects, and tasks.' properties: gid: description: Globally unique identifier of the resource. type: string example: '1111' resource_type: description: The type of resource. type: string example: user StoryCompact: description: A story represents an activity associated with an object in the Asana system. 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: story x-insert-after: gid created_at: description: The time at which this resource was created. type: string format: date-time readOnly: true example: '2012-02-22T02:06:58.147Z' created_by: $ref: '#/components/schemas/UserCompact' resource_subtype: description: The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. type: string readOnly: true example: comment_added text: description: '*Create-only*. Human-readable text for the story or comment. This will not include the name of the creator. *Note: This is not guaranteed to be stable for a given type of story. For example, text for a reassignment may not always say “assigned to …” as the text for a story can both be edited and change based on the language settings of the user making the request.* Use the `resource_subtype` property to discover the action that created the story.' type: string example: marked today responses: 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' 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' 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' 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' parameters: offset: name: offset in: query description: 'Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. *Note: You can only pass in an offset that was returned to you via a previously paginated request.*' example: eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9 schema: type: string pretty: name: opt_pretty in: query description: 'Provides “pretty” output. Provides 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 task_path_gid: name: task_gid in: path required: true description: The task to operate on. schema: type: string example: '321654' x-env-variable: task limit: name: limit in: query description: 'Results per page. The number of objects to return per page. The value must be between 1 and 100.' example: 50 schema: type: integer minimum: 1 maximum: 100 story_path_gid: name: story_gid in: path description: Globally unique identifier for the story. required: true schema: type: string example: '35678' x-env-variable: story securitySchemes: personalAccessToken: type: http description: A personal access token for the Asana API. scheme: bearer oauth2: type: oauth2 description: OAuth 2.0 authorization code flow. flows: authorizationCode: authorizationUrl: https://app.asana.com/-/oauth_authorize tokenUrl: https://app.asana.com/-/oauth_token scopes: default: Provides access to all endpoints documented in the API reference.