# \StoriesApi
All URIs are relative to *https://app.asana.com/api/1.0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_story_for_task**](StoriesApi.md#create_story_for_task) | **post** /tasks/{task_gid}/stories | Create a story on a task
[**delete_story**](StoriesApi.md#delete_story) | **delete** /stories/{story_gid} | Delete a story
[**get_stories_for_task**](StoriesApi.md#get_stories_for_task) | **get** /tasks/{task_gid}/stories | Get stories from a task
[**get_story**](StoriesApi.md#get_story) | **get** /stories/{story_gid} | Get a story
[**update_story**](StoriesApi.md#update_story) | **put** /stories/{story_gid} | Update a story
## create_story_for_task
> crate::models::InlineResponse20020 create_story_for_task(task_gid, inline_object32, opt_pretty, opt_fields)
Create a story on a task
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.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**task_gid** | **String** | The task to operate on. | [required] |
**inline_object32** | [**InlineObject32**](InlineObject32.md) | | [required] |
**opt_pretty** | Option<**bool**> | 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. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse20020**](inline_response_200_20.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## delete_story
> crate::models::InlineResponse2001 delete_story(story_gid, opt_pretty, opt_fields)
Delete a story
Deletes a story. A user can only delete stories they have created. Returns an empty data record.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**story_gid** | **String** | Globally unique identifier for the story. | [required] |
**opt_pretty** | Option<**bool**> | 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. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_stories_for_task
> crate::models::InlineResponse20021 get_stories_for_task(task_gid, opt_pretty, opt_fields, limit, offset)
Get stories from a task
Returns the compact records for all stories on the task.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**task_gid** | **String** | The task to operate on. | [required] |
**opt_pretty** | Option<**bool**> | 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. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
**limit** | Option<**i32**> | Results per page. The number of objects to return per page. The value must be between 1 and 100. | |
**offset** | Option<**String**> | 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.' | |
### Return type
[**crate::models::InlineResponse20021**](inline_response_200_21.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_story
> crate::models::InlineResponse20020 get_story(story_gid, opt_pretty, opt_fields, limit, offset)
Get a story
Returns the full record for a single story.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**story_gid** | **String** | Globally unique identifier for the story. | [required] |
**opt_pretty** | Option<**bool**> | 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. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
**limit** | Option<**i32**> | Results per page. The number of objects to return per page. The value must be between 1 and 100. | |
**offset** | Option<**String**> | 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.' | |
### Return type
[**crate::models::InlineResponse20020**](inline_response_200_20.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## update_story
> crate::models::InlineResponse20020 update_story(story_gid, inline_object31, opt_pretty, opt_fields)
Update a story
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.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**story_gid** | **String** | Globally unique identifier for the story. | [required] |
**inline_object31** | [**InlineObject31**](InlineObject31.md) | | [required] |
**opt_pretty** | Option<**bool**> | 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. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse20020**](inline_response_200_20.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)