Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 111 lines (75 sloc) 2.405 kB
af517b2 @qrush convert projects endpoint
qrush authored
1 Projects
2 ========
cc33d5e @qrush add links to data reference
qrush authored
3
392a7a7 @qrush Become Basecamp
qrush authored
4 For the full XML representation of projects, [check out the data reference](https://github.com/basecamp/basecamp-classic-api/blob/master/sections/data_reference.md#project).
cc33d5e @qrush add links to data reference
qrush authored
5
af517b2 @qrush convert projects endpoint
qrush authored
6 Get projects
7 ------------
8
9 * `GET /projects.xml` returns all accessible projects. This includes active, inactive, and archived projects.
10
2829fc4 @qrush some formatting fixes
qrush authored
11 **Response:**
12
c588e59 @qrush xml syntax color everywhere
qrush authored
13 ``` xml
14 <projects>
15 <project>
16 ...
17 </project>
18 <project>
19 ...
20 </project>
21 ...
22 </projects>
23
24 ```
af517b2 @qrush convert projects endpoint
qrush authored
25
26
27 Get project
28 -----------
29
30 * `GET /projects/#{project_id}.xml` returns a single project identified by its integer ID
31
2829fc4 @qrush some formatting fixes
qrush authored
32 **Response:**
33
c588e59 @qrush xml syntax color everywhere
qrush authored
34 ``` xml
35 <project>
36 <name>Design Review</name>
37 ...
38 <company>
39 <name>Globex Corporation</name>
40 ...
41 </company>
42 </project>
43
44 ```
af517b2 @qrush convert projects endpoint
qrush authored
45
46
47 Create project
48 --------------
49
50 * `POST /projects.xml` creates a new project with the given name.
51
52 **Request:**
53
c588e59 @qrush xml syntax color everywhere
qrush authored
54 ``` xml
55 <request>
56 <project>
57 <name>Shopping Cart Redesign</name>
58 </project>
59 </request>
60 ```
61
af517b2 @qrush convert projects endpoint
qrush authored
62
63 **Response:**
64
65 Returns status code 201 (Created) on success with the Location header set to the URL for the new project. You can extract the ID of the project from the URL. Failed requests will receive a 422 (Unprocessable Entity) or 500 (Server Error) status code in the response.
66
5b16502 @qrush lots of formatting, accounts, categories, companies, messages, people
qrush authored
67
af517b2 @qrush convert projects endpoint
qrush authored
68 Update project
69 --------------
70
71 * `PUT /projects/#{project_id}.xml` updates attributes of the given project.
72
73 Only administrative users may update project records. You only need to provide the attributes you wish to update; others ought to be omitted from the request.
74
2829fc4 @qrush some formatting fixes
qrush authored
75 **Request:**
af517b2 @qrush convert projects endpoint
qrush authored
76
c588e59 @qrush xml syntax color everywhere
qrush authored
77 ``` xml
78 <project>
79 <name type="string">Shopping Cart Redesign</name>
80 <start-page type="string">log|all|todos|milestones|files</start-page>
da01c15 'on-hold' -> 'on_hold'
Jeffrey Hardy authored
81 <status>active|on_hold|archived</status>
c588e59 @qrush xml syntax color everywhere
qrush authored
82 <company-id>#{client-id}</company-id>
83 <show-writeboards>true|false</show-writeboards>
84 <announcement>...</announcement>
85 <show-announcement>true|false</show-announcement>
86 </project>
87 ```
88
af517b2 @qrush convert projects endpoint
qrush authored
89
2829fc4 @qrush some formatting fixes
qrush authored
90 **Response:**
af517b2 @qrush convert projects endpoint
qrush authored
91
2829fc4 @qrush some formatting fixes
qrush authored
92 Returns 200 OK on success. Otherwise, returns an error code (e.g. 422 or 403), possibly including a payload describing the error.
5b16502 @qrush lots of formatting, accounts, categories, companies, messages, people
qrush authored
93
94
95 Project counts
96 --------------
97
98 * `GET /projects/count.xml` returns a count of all projects, by project status.
99
100 If there are no projects with a particular status, that status entry will be omitted from the report.
101
102 **Response:**
103
c588e59 @qrush xml syntax color everywhere
qrush authored
104 ``` xml
105 <count>
106 <active type="integer">5</active>
107 <on-hold type="integer">2</active>
108 <archived type="integer">11</active>
109 </count>
110 ```
Something went wrong with that request. Please try again.