Information

Requires Authentication?Yes
Require admin rightsYes
Response Formatsjson
xml
HTTP expected codeHTTP/1.1 201 Created
HTTP MethodsPOST
SinceUForge 1.0

Updated on Apr 30, 2012

project_create

POST /orgs/{oid}/projects

Creates a new project container in the specified Organization.

Resource URL

/orgs/{oid}/projects

Parameters

oid
required
the id of the Organization

Example Request

curl 'http://10.0.0.20:9090/ufws-3.0/orgs/1/projects?apiKey=Qk-RWL48LjU72q5o0-n-n8Ukz4f-s8MnSM1ntpnRySuEcoc0ZHui2yzx5H8zhWwF7qqeT5FFNoj40Hjy7-&signature=mJxERyAXF9EQWJAZy66ayziOrZo%3D' -D /tmp/headers -H "Content-Type: application/xml" -H "Accept: application/xml" -X POST --data-binary "<project><name>MyOrgProject</name><version>RC2</version><release>20111105</release><category></category><description>ProjectbuildfromSVNsource</description><shortTag>{project-short-tag}</shortTag><license><type>GPLv3</type></license><distributionUri>distributions/57</distributionUri><company><name>MyCompany</name></company></project>" | tidy -xml -indent -quiet

Example Request Body

Request type: Project

<project>
  <name>MyOrgProject</name>
  <version>RC2</version>
  <release>20111105</release>
  <category></category>
  <description>ProjectbuildfromSVNsource</description>
  <shortTag>{project-short-tag}</shortTag>
  <license>
    <type>GPLv3</type>
  </license>
  <distributionUri>distributions/57</distributionUri>
  <company>
    <name>MyCompany</name>
  </company>
</project>
{"project": {
     "category": "",
     "distributionUri": "distributions/57",
     "description": "ProjectbuildfromSVNsource",
     "company": {"name": "MyCompany"},
     "name": "MyOrgProject",
     "shortTag": "{project-short-tag}",
     "license": {"type": "GPLv3"},
     "release": 20111105,
     "version": "RC2"
}}

Example Response Body

Response type: Project

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<project>
  <category></category>
  <company>
    <created>2012-01-12T14:18:47+01:00</created>
    <dbId>40</dbId>
    <lastModified>2012-01-12T14:21:18+01:00</lastModified>
    <logo>
      <created>2012-01-12T14:18:47+01:00</created>
      <dbId>49</dbId>
      <lastModified>2012-01-12T14:18:47+01:00</lastModified>
      <parentUri>orgs/1/companies/40</parentUri>
      <size>0</size>
      <uploaded>false</uploaded>
      <uri>orgs/1/companies/40/logos/49</uri>
    </logo>
    <name>MyCompany</name>
    <parentUri>orgs/1</parentUri>
    <uri>orgs/1/companies/40</uri>
  </company>
  <created>2012-04-30T11:00:46+02:00</created>
  <dbId>13327</dbId>
  <description>ProjectbuildfromSVNsource</description>
  <distributionUri>distributions/57</distributionUri>
  <distroId>57</distroId>
  <installedSize>0</installedSize>
  <lastModified>2012-04-30T11:00:46+02:00</lastModified>
  <license>
    <created>2012-04-30T11:00:46+02:00</created>
    <dbId>1072</dbId>
    <lastModified>2012-04-30T11:00:46+02:00</lastModified>
    <md5sum>8c158f3d3272ce0378887a3b70d0a89f</md5sum>
    <mimeType>text/html</mimeType>
    <name>gplv3_license.html</name>
    <parentUri>distributions/57/projects/13327</parentUri>
    <size>34158</size>
    <type>GPLv3</type>
    <uploaded>false</uploaded>
    <uri>distributions/57/projects/13327/licenses/1072</uri>
  </license>
  <name>MyOrgProject</name>
  <packageUris />
  <packagesUri>distributions/57/projects/13327/pkgs</packagesUri>
  <release>20111105</release>
  <restricted>false</restricted>
  <size>0</size>
  <uri>distributions/57/projects/13327</uri>
  <version>RC2</version>
  <baseOrgUri>distributions/57/projects/13327/orgs</baseOrgUri>
  <orgUris />
  <osPackageUris />
  <shortTag>{project-short-tag}</shortTag>
  <uploadedPackageUris />
</project>