Asana API

Getting access, Developing, Testing

Back to Asana

Create An Enum Option

Creates an enum option and adds it to this custom field’s list of enum options. A custom field can have at most 500 enum options (including disabled options). By default new enum options are inserted at the end of a custom field’s list. Locked custom fields can only have enum options added by the user who locked the field. Returns the full record of the newly created enum option.

Input

type: object properties: parameters: type: object properties: custom_field_gid: type: string description: Globally unique identifier for the custom field. opt_pretty: type: boolean 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. opt_fields: type: array items: type: string description: >- 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: type: integer description: >- Results per page. The number of objects to return per page. The value must be between 1 and 100. offset: type: string 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.' required: - custom_field_gid title: Parameters data: type: object properties: data: 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 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 insert_before: type: string description: >- An existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option. example: '12345' insert_after: type: string description: >- An existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option. example: '12345' title: Data

Output

type: object properties: data: 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 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