Type flag_option

Discussion

This type describes a flag (including close reasons on questions) which could be cast against an object.

There is a hierarchy of flag_options, all options that lack an option_id are merely organizational. An application can use this hierarchy to mimic the flagging dialogs on a Stack Exchange site.

Available flags vary from object to object, user to user, and site to site. An application should not assume that particular flags are always available, or that particular option_ids are stable.

The requires_* fields indicate which parameters must be sent to a flag add method along with an option_id.

Fields

count
integer
may be absent

description
string
unchanged in unsafe filters
may be absent

dialog_title
string
unchanged in unsafe filters
may be absent

has_flagged
boolean
may be absent

is_retraction 2.3
boolean
may be absent

option_id
integer
may be absent

question 2.3

requires_comment
boolean
may be absent

requires_question_id
boolean
may be absent

requires_site
boolean
may be absent

sub_options

title
string
unchanged in unsafe filters
may be absent

Fields marked with are included in the default filter, those marked with are excluded in the default filter.

Examples

Spam Option

{"has_flagged":false,"requires_question_id":false,"requires_site":false,"requires_comment":false,"option_id":46534,"dialog_title":"I am flagging this question because","description":"This question is effectively an advertisement with no disclosure. It is not useful or relevant, but promotional.","title":"it is spam"}

Duplicate Free Form Option

{"requires_question_id":true,"requires_site":false,"requires_comment":false,"option_id":8018,"dialog_title":"Duplicate","title":"\"Java Program: Where am I going wrong?\" is a duplicate of:"}

Duplicate Pre-Filled Option

{"count":0,"requires_question_id":false,"requires_site":false,"requires_comment":false,"option_id":31261,"dialog_title":"Duplicate","description":"Due to the implementation of Java generics, you can't have code like this: \n\npublic class GenSet {\n    private E a[];\n    public GenSet()\n    {\n        a = new E[INITIAL_ARRAY_LENGTH]; // ...","title":"How to: generic array creation;\r\nduplicate of..."}

Migration Pre-Filled Option

{"count":0,"requires_question_id":false,"requires_site":false,"requires_comment":false,"option_id":37058,"dialog_title":"Migration","description":"Q&A for SharePoint enthusiasts","title":"belongs on sharepoint.stackexchange.com"}

Migration Free Form Option

{"requires_question_id":false,"requires_site":true,"requires_comment":false,"option_id":30610,"dialog_title":"Migration","title":"belongs on another site in the Stack Exchange network"}

Other Option

{"requires_question_id":false,"requires_site":false,"requires_comment":true,"option_id":22992,"dialog_title":"I am flagging this question because","description":"This question needs a moderator's attention. Please describe exactly what's wrong.","title":"other (needs ♦ moderator attention)"}

Methods That Return This Type