Discussions

Fields

cid
discussion project-wide unique identifier number
id
discussion unique identifier number
title
discussion title string
text
discussion text
archived
discussion archived boolean
comments-count
discussion number of comments
created-at
discussion creation time
updated-at
discussion last update time
tags
an array of tags. Only has the name field
ref_tags
an array of tags. Only has the name field
author_id
discussion author identifier number - only when returning an array of discussions
author
See User's Fields - only when returning the specific discussion
assignee
See User's Fields - only when returning the specific discussion
comments
an array of comments. See Comment's Fields - only when returning the specific discussion

Methods

get_all

returns all discussions from the given project

Parameters

  • archived: ARCHIVED (only archived or active projects) - not mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/discussions/get_all - all discussions
http://company_alias.goplanapp.com/project_alias/api/discussions/get_all?archived=0 - all active discussions
http://company_alias.goplanapp.com/project_alias/api/discussions/get_all?archived=1 - all archived discussions

http://company_alias.goplanapp.com/api/discussions/get_all?project=project_alias
http://company_alias.goplanapp.com/api/discussions/get_all?archived=1&format;=json&callback;=handlerFunction&project;=project_alias
http://company_alias.goplanapp.com/api/discussions/get_all?archived=0&project;=project_alias

Output Formats

  • XML - all discussions

    
    <?xml version="1.0" encoding="UTF-8"?>
    <discussions type="array">
    	<discussion>
    		<archived type="boolean">false</archived>
    		<author-id type="integer">1</author-id>
    		<cid type="integer">1</cid>
    		<comments-count type="integer">0</comments-count>
    		<created-at type="datetime">2009-04-09T17:14:19+01:00</created-at>
    		<text>This is a sample discussion used for the Goplan 2 API Documentation</text>
    		<title>Sample discussion</title>
    		<updated-at type="datetime">2009-04-09T17:14:19+01:00</updated-at>
    		<tags type="array"/>
    		<ref-tags type="array"/>
    	</discussion>
    	<discussion>
    		<archived type="boolean">false</archived>
    		<author-id type="integer">1</author-id>
    		<cid type="integer">2</cid>
    		<comments-count type="integer">0</comments-count>
    		<created-at type="datetime">2009-04-09T17:14:58+01:00</created-at>
    		<text>This is another sample discussion used for the Goplan 2 API Documentation, but now with tags.</text>
    		<title>Another sample discussion with tags</title>
    		<updated-at type="datetime">2009-04-09T17:14:58+01:00</updated-at>
    		<tags type="array">
    			<tag>
    				<name>sample</name>
    			</tag>
    			<tag>
    				<name>tagged</name>
    			</tag>
    		</tags>
    		<ref-tags type="array"/>
    	</discussion>
    	<discussion>
    		<archived type="boolean">false</archived>
    		<author-id type="integer">1</author-id>
    		<cid type="integer">3</cid>
    		<comments-count type="integer">0</comments-count>
    		<created-at type="datetime">2009-04-09T17:15:37+01:00</created-at>
    		<text>This is a sample discussion used for the Goplan 2 API Documentation, now with tags and ref tags</text>
    		<title>Yet another sample discussions with tags and ref tags</title>
    		<updated-at type="datetime">2009-04-09T17:15:37+01:00</updated-at>
    		<tags type="array">
    			<tag>
    				<name>sample</name>
    			</tag>
    			<tag>
    				<name>tagged</name>
    			</tag>
    		</tags>
    		<ref-tags type="array">
    			<ref-tag type="Tag">
    				<name>ticket:20</name>
    			</ref-tag>
    		</ref-tags>
    	</discussion>
    </discussions>
    		
  • JSON - all discussions

    
    [{"discussion": {"tags": [], "created_at": "2021/04/09 17:14:19 +0100", "title": "Sample discussion", "updated_at": "2021/04/09 17:14:19 +0100", "text": "This is a sample discussion used for the Goplan 2 API Documentation", "archived": false, "ref_tags": [], "comments_count": 0, "cid": 1, "author_id": 1}}, {"discussion": {"tags": [{"name": "sample"}, {"name": "tagged"}], "created_at": "2021/04/09 17:14:58 +0100", "title": "Another sample discussion with tags", "updated_at": "2021/04/09 17:14:58 +0100", "text": "This is another sample discussion used for the Goplan 2 API Documentation, but now with tags.", "archived": false, "ref_tags": [], "comments_count": 0, "cid": 2, "author_id": 1}}, {"discussion": {"tags": [{"name": "sample"}, {"name": "tagged"}], "created_at": "2021/04/09 17:15:37 +0100", "title": "Yet another sample discussions with tags and ref tags", "updated_at": "2021/04/09 17:15:37 +0100", "text": "This is a sample discussion used for the Goplan 2 API Documentation, now with tags and ref tags", "archived": false, "ref_tags": [{"name": "ticket:20"}], "comments_count": 0, "cid": 3, "author_id": 1}}]
    		

get

returns a single discussion information

Parameters

  • id: DISCUSSION_CID (project-wide unique discussion identifier #) - mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples

	
		http://company_alias.goplanapp.com/projectalias/api/discussions/get/6

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <discussion>
    	<archived type="boolean">false</archived>
    	<cid type="integer">3</cid>
    	<comments-count type="integer">1</comments-count>
    	<created-at type="datetime">2009-04-09T17:15:37+01:00</created-at>
    	<text>This is a sample discussion used for the Goplan 2 API Documentation, now with tags and ref tags</text>
    	<title>Yet another sample discussions with tags and ref tags</title>
    	<updated-at type="datetime">2009-04-09T17:15:37+01:00</updated-at>
    	<tags type="array">
    		<tag>
    			<name>sample</name>
    		</tag>
    		<tag>
    			<name>tagged</name>
    		</tag>
    	</tags>
    	<comments type="array">
    		<comment>
    			<author-id type="integer">1</author-id>
    			<created-at type="datetime">2009-04-09T17:32:32+01:00</created-at>
    			<id type="integer">21</id>
    			<text>This is a sample comment.
    			It can use *Textile* to format it.</text>
    			<updated-at type="datetime">2009-04-09T17:32:32+01:00</updated-at>
    		</comment>
    	</comments>
    	<author>
    		<alias>john</alias>
    		<created-at type="datetime">2009-02-27T15:29:47+00:00</created-at>
    		<email>user@email.com</email>
    		<name>John</name>
    		<picture-url>http://www.gravatar.com/avatar/picture.jpg</picture-url>
    		<time-zone>Lisbon</time-zone>
    		<updated-at type="datetime">2009-04-09T15:58:32+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</author>
    	<ref-tags type="array">
    		<ref-tag type="Tag">
    			<name>ticket:20</name>
    		</ref-tag>
    	</ref-tags>
    </discussion>
    		
  • JSON

    
    {"discussion": {"comments": [{"created_at": "2021/04/09 17:32:32 +0100", "updated_at": "2021/04/09 17:32:32 +0100", "text": "This is a sample comment.\n\nIt can use *Textile* to format it.", "id": 21, "author_id": 1}], "tags": [{"name": "sample"}, {"name": "tagged"}], "created_at": "2021/04/09 17:15:37 +0100", "title": "Yet another sample discussions with tags and ref tags", "updated_at": "2021/04/09 17:15:37 +0100", "author": {"name": "John", "created_at": "2021/02/27 15:29:47 +0000", "updated_at": "2021/04/09 15:58:32 +0100", "picture_url": "http://www.gravatar.com/avatar/picture.jpg", "user_type": 0, "alias": "john", "time_zone": "Lisbon", "email": "user@email.com"}, "text": "This is a sample discussion used for the Goplan 2 API Documentation, now with tags and ref tags", "archived": false, "ref_tags": [{"name": "ticket:20"}], "comments_count": 1, "cid": 3}}
    		

create

creates a new discussion and returns it

Parameters

  • discussion[title]: DISCUSSION_TITLE (title of the new discussion) - mandatory
  • discussion[text]: DISCUSSION_TEXT (text of the new discussion) - mandatory
  • tags[]: TAG_TEXT (use one tags[]=tagtext for each tag on the item. Specify project-wide hot-links with the notation ITEM_TYPE:ITEM_CID i.e.: ticket:3) - not mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/discussions/create - pass the other parameters by POST
http://company_alias.goplanapp.com/api/discussions/create?format=json&callback;=handlerfunction&project;=project_alias&discussion;[title]=Development&discussion;[text]=Let us discuss the development methodologies to use in this project
http://company_alias.goplanapp.com/api/discussions/create?format=json&callback;=handlerfunction&project;=project_alias&discussion;[title]=Development&discussion;[text]=Let us discuss the development methodologies to use in this project&tags;[]=development&tags;[]=brainstorm&tags;[]=methodologies - a discussion with tags

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <discussion>
    	<archived type="boolean">false</archived>
    	<cid type="integer">4</cid>
    	<comments-count type="integer">0</comments-count>
    	<created-at type="datetime">2009-04-09T19:10:58+01:00</created-at>
    	<text>Let us discuss the development methodologies to use in this project</text>
    	<title>Development</title>
    	<updated-at type="datetime">2009-04-09T19:10:58+01:00</updated-at>
    	<tags type="array"/>
    	<author>
    		<alias>john</alias>
    		<created-at type="datetime">2009-02-27T15:29:47+00:00</created-at>
    		<email>user@email.com</email>
    		<name>John</name>
    		<picture-url>http://www.gravatar.com/avatar/picture.jpg</picture-url>
    		<time-zone>Lisbon</time-zone>
    		<updated-at type="datetime">2009-04-09T15:58:32+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</author>
    	<ref-tags type="array"/>
    </discussion>
    		
  • JSON

    
    handlerFunction({"discussion": {"created_at": "2021/04/09 17:15:37 +0100", "title": "Development", "updated_at": "2021/04/09 17:15:37 +0100", "author": {"name": "John", "created_at": "2021/02/27 15:29:47 +0000", "updated_at": "2021/04/09 15:58:32 +0100", "picture_url": "http://www.gravatar.com/avatar/picture.jpg", "user_type": 0, "alias": "john", "time_zone": "Lisbon", "email": "user@email.com"}, "text": "Let us discuss the development methodologies to use in this project", "archived": false, "comments_count": 1, "cid": 4}})
    		

update

updates an existing discussion and returns it

Parameters

  • discussion[id]: DISCUSSION_CID (project-wide unique discussion identifier #) - mandatory
  • discussion[title]: DISCUSSION_TITLE (title of the new discussion) - not mandatory
  • discussion[text]: DISCUSSION_TEXT (text of the new discussion) - not mandatory
  • tags[]: TAG_TEXT (use one tags[]=tagtext for each tag on the item. Specify project-wide hot-links with the notation ITEM_TYPE:ITEM_CID i.e.: ticket:3) - not mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/discussions/update - pass the other parameters by POST
http://company_alias.goplanapp.com/api/discussions/update?format=json&callback;=handlerfunction&project;=project_alias&discussion;[id]=4&discussion;[title]=Development&discussion;[text]=Let us discuss the development methodologies to use in this project
http://company_alias.goplanapp.com/api/discussions/update?format=json&callback;=handlerfunction&project;=project_alias&discussion;[id]=4&discussion;[title]=Development&discussion;[text]=Let us discuss the development methodologies to use in this project&tags;[]=development&tags;[]=brainstorm&tags;[]=methodologies - a discussion with tags

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <discussion>
    	<archived type="boolean">false</archived>
    	<cid type="integer">4</cid>
    	<comments-count type="integer">0</comments-count>
    	<created-at type="datetime">2009-04-09T19:10:58+01:00</created-at>
    	<text>Let us discuss the development methodologies to use in this project</text>
    	<title>Development</title>
    	<updated-at type="datetime">2009-04-09T19:10:58+01:00</updated-at>
    	<tags type="array"/>
    	<author>
    		<alias></alias>
    		<created-at type="datetime">2009-02-27T15:29:47+00:00</created-at>
    		<email>user@email.com</email>
    		<name>john</name>
    		<picture-url>http://www.gravatar.com/avatar/picture.jpg</picture-url>
    		<time-zone>Lisbon</time-zone>
    		<updated-at type="datetime">2009-04-09T15:58:32+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</author>
    	<ref-tags type="array"/>
    </discussion>
    		
  • JSON

    
    handlerFunction({"discussion": {"created_at": "2021/04/09 17:15:37 +0100", "title": "Development", "updated_at": "2021/04/09 17:15:37 +0100", "author": {"name": "John", "created_at": "2021/02/27 15:29:47 +0000", "updated_at": "2021/04/09 15:58:32 +0100", "picture_url": "http://www.gravatar.com/avatar/picture.jpg", "user_type": 0, "alias": "john", "time_zone": "Lisbon", "email": "user@email.com"}, "text": "Let us discuss the development methodologies to use in this project", "archived": false, "comments_count": 1, "cid": 4}})
    		

destroy

deletes a discussion from the project and returns it

Parameters

  • id: DISCUSSION_CID (project-wide unique discussion identifier #) - mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/projectalias/api/discussions/destroy/6

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <discussion>
    	<archived type="boolean">false</archived>
    	<cid type="integer">3</cid>
    	<comments-count type="integer">1</comments-count>
    	<created-at type="datetime">2009-04-09T17:15:37+01:00</created-at>
    	<text>This is a sample discussion used for the Goplan 2 API Documentation, now with tags and ref tags</text>
    	<title>Yet another sample discussions with tags and ref tags</title>
    	<updated-at type="datetime">2009-04-09T17:15:37+01:00</updated-at>
    	<tags type="array">
    		<tag>
    			<name>sample</name>
    		</tag>
    		<tag>
    			<name>tagged</name>
    		</tag>
    	</tags>
    	<comments type="array">
    		<comment>
    			<author-id type="integer">1</author-id>
    			<created-at type="datetime">2009-04-09T17:32:32+01:00</created-at>
    			<id type="integer">21</id>
    			<text>This is a sample comment.
    			It can use *Textile* to format it.</text>
    			<updated-at type="datetime">2009-04-09T17:32:32+01:00</updated-at>
    		</comment>
    	</comments>
    	<author>
    		<alias>john</alias>
    		<created-at type="datetime">2009-02-27T15:29:47+00:00</created-at>
    		<email>user@email.com</email>
    		<name>John</name>
    		<picture-url>http://www.gravatar.com/avatar/picture.jpg</picture-url>
    		<time-zone>Lisbon</time-zone>
    		<updated-at type="datetime">2009-04-09T15:58:32+01:00</updated-at>
    		<user-type type="integer">0</user-type>
    	</author>
    	<ref-tags type="array">
    		<ref-tag type="Tag">
    			<name>ticket:20</name>
    		</ref-tag>
    	</ref-tags>
    </discussion>
    		
  • JSON

    
    {"discussion": {"comments": [{"created_at": "2021/04/09 17:32:32 +0100", "updated_at": "2021/04/09 17:32:32 +0100", "text": "This is a sample comment.\n\nIt can use *Textile* to format it.", "id": 21, "author_id": 1}], "tags": [{"name": "sample"}, {"name": "tagged"}], "created_at": "2021/04/09 17:15:37 +0100", "title": "Yet another sample discussions with tags and ref tags", "updated_at": "2021/04/09 17:15:37 +0100", "author": {"name": "John", "created_at": "2021/02/27 15:29:47 +0000", "updated_at": "2021/04/09 15:58:32 +0100", "picture_url": "http://www.gravatar.com/avatar/picture.jpg", "user_type": 0, "alias": "john", "time_zone": "Lisbon", "email": "user@email.com"}, "text": "This is a sample discussion used for the Goplan 2 API Documentation, now with tags and ref tags", "archived": false, "ref_tags": [{"name": "ticket:20"}], "comments_count": 1, "cid": 3}}
    		

Follow us on Twitter and Facebook. Talk to us and Get Satisfaction.

Goplan is a product of Webreakstuff | Contact support | Terms of Service