POST api/projectone/UpdateP1Modules

Update a P1 Project's modules based on a management space or a development space

Request Information

URI Parameters

None.

Body Parameters

If you want to automatically create a module, please set module's space id to be -1.

P1ModulesUpdateBinder
NameDescriptionTypeAdditional information
ProjectId

integer

None.

SpaceId

integer

None.

Modules

P1DataOfP1ModuleOfSpaceIdObject

None.

AdditionalSpaces

Collection of P1SpaceIdObject

None.

SupportPrimaryOption

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "ProjectId": 1,
  "SpaceId": 2,
  "Modules": {
    "Management": {
      "Enabled": true,
      "PrimarySpace": {
        "ProjectId": 1,
        "SpaceId": 2
      },
      "ReferencedSpaces": [
        {
          "ProjectId": 1,
          "SpaceId": 2
        },
        {
          "ProjectId": 1,
          "SpaceId": 2
        }
      ]
    },
    "Development": {
      "Enabled": true,
      "PrimarySpace": {
        "ProjectId": 1,
        "SpaceId": 2
      },
      "ReferencedSpaces": [
        {
          "ProjectId": 1,
          "SpaceId": 2
        },
        {
          "ProjectId": 1,
          "SpaceId": 2
        }
      ]
    },
    "Requirement": {
      "Enabled": true,
      "PrimarySpace": {
        "ProjectId": 1,
        "SpaceId": 2
      },
      "ReferencedSpaces": [
        {
          "ProjectId": 1,
          "SpaceId": 2
        },
        {
          "ProjectId": 1,
          "SpaceId": 2
        }
      ]
    },
    "Knowledge": {
      "Enabled": true,
      "PrimarySpace": {
        "ProjectId": 1,
        "SpaceId": 2
      },
      "ReferencedSpaces": [
        {
          "ProjectId": 1,
          "SpaceId": 2
        },
        {
          "ProjectId": 1,
          "SpaceId": 2
        }
      ]
    },
    "TestRun": {
      "Enabled": true,
      "PrimarySpace": {
        "ProjectId": 1,
        "SpaceId": 2
      },
      "ReferencedSpaces": [
        {
          "ProjectId": 1,
          "SpaceId": 2
        },
        {
          "ProjectId": 1,
          "SpaceId": 2
        }
      ]
    },
    "TestLiberary": {
      "Enabled": true,
      "PrimarySpace": {
        "ProjectId": 1,
        "SpaceId": 2
      },
      "ReferencedSpaces": [
        {
          "ProjectId": 1,
          "SpaceId": 2
        },
        {
          "ProjectId": 1,
          "SpaceId": 2
        }
      ]
    },
    "Defect": {
      "Enabled": true,
      "PrimarySpace": {
        "ProjectId": 1,
        "SpaceId": 2
      },
      "ReferencedSpaces": [
        {
          "ProjectId": 1,
          "SpaceId": 2
        },
        {
          "ProjectId": 1,
          "SpaceId": 2
        }
      ]
    }
  },
  "AdditionalSpaces": [
    {
      "projectId": 1,
      "spaceId": 2,
      "projectType": 3
    },
    {
      "projectId": 1,
      "spaceId": 2,
      "projectType": 3
    }
  ],
  "SupportPrimaryOption": true
}

application/xml, text/xml

Sample:
<P1ModulesUpdateBinder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.ProjectOne">
  <AdditionalSpaces>
    <P1SpaceIdObject>
      <ProjectId>1</ProjectId>
      <ProjectType>3</ProjectType>
      <SpaceId>2</SpaceId>
    </P1SpaceIdObject>
    <P1SpaceIdObject>
      <ProjectId>1</ProjectId>
      <ProjectType>3</ProjectType>
      <SpaceId>2</SpaceId>
    </P1SpaceIdObject>
  </AdditionalSpaces>
  <Modules>
    <Defect>
      <Enabled>true</Enabled>
      <PrimarySpace xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:ProjectId>1</d4p1:ProjectId>
        <d4p1:SpaceId>2</d4p1:SpaceId>
      </PrimarySpace>
      <ReferencedSpaces xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
      </ReferencedSpaces>
    </Defect>
    <Development>
      <Enabled>true</Enabled>
      <PrimarySpace xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:ProjectId>1</d4p1:ProjectId>
        <d4p1:SpaceId>2</d4p1:SpaceId>
      </PrimarySpace>
      <ReferencedSpaces xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
      </ReferencedSpaces>
    </Development>
    <Knowledge>
      <Enabled>true</Enabled>
      <PrimarySpace xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:ProjectId>1</d4p1:ProjectId>
        <d4p1:SpaceId>2</d4p1:SpaceId>
      </PrimarySpace>
      <ReferencedSpaces xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
      </ReferencedSpaces>
    </Knowledge>
    <Management>
      <Enabled>true</Enabled>
      <PrimarySpace xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:ProjectId>1</d4p1:ProjectId>
        <d4p1:SpaceId>2</d4p1:SpaceId>
      </PrimarySpace>
      <ReferencedSpaces xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
      </ReferencedSpaces>
    </Management>
    <Requirement>
      <Enabled>true</Enabled>
      <PrimarySpace xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:ProjectId>1</d4p1:ProjectId>
        <d4p1:SpaceId>2</d4p1:SpaceId>
      </PrimarySpace>
      <ReferencedSpaces xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
      </ReferencedSpaces>
    </Requirement>
    <TestLiberary>
      <Enabled>true</Enabled>
      <PrimarySpace xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:ProjectId>1</d4p1:ProjectId>
        <d4p1:SpaceId>2</d4p1:SpaceId>
      </PrimarySpace>
      <ReferencedSpaces xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
      </ReferencedSpaces>
    </TestLiberary>
    <TestRun>
      <Enabled>true</Enabled>
      <PrimarySpace xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:ProjectId>1</d4p1:ProjectId>
        <d4p1:SpaceId>2</d4p1:SpaceId>
      </PrimarySpace>
      <ReferencedSpaces xmlns:d4p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
        <d4p1:SpaceIdObject>
          <d4p1:ProjectId>1</d4p1:ProjectId>
          <d4p1:SpaceId>2</d4p1:SpaceId>
        </d4p1:SpaceIdObject>
      </ReferencedSpaces>
    </TestRun>
  </Modules>
  <P1AdditionalSpaces>
    <Defect>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
    </Defect>
    <Development>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
    </Development>
    <Knowledge>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
    </Knowledge>
    <Management>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
    </Management>
    <Requirement>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
    </Requirement>
    <TestLiberary>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
    </TestLiberary>
    <TestRun>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
      <P1SpaceIdObject>
        <ProjectId>1</ProjectId>
        <ProjectType>3</ProjectType>
        <SpaceId>2</SpaceId>
      </P1SpaceIdObject>
    </TestRun>
  </P1AdditionalSpaces>
  <P1SupportPrimaryOptions>
    <Defect>true</Defect>
    <Development>true</Development>
    <Knowledge>true</Knowledge>
    <Management>true</Management>
    <Requirement>true</Requirement>
    <TestLiberary>true</TestLiberary>
    <TestRun>true</TestRun>
  </P1SupportPrimaryOptions>
  <ProjectId>1</ProjectId>
  <SpaceId>2</SpaceId>
  <SupportPrimaryOption>true</SupportPrimaryOption>
</P1ModulesUpdateBinder>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Update a P1 Project's modules based on a management space or a development space

API_Data_P1DataOfP1ModuleUpdateResult
NameDescriptionTypeAdditional information
Success

boolean

None.

Error

ErrorInfo

None.

Data

P1DataOfP1ModuleUpdateResult

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Error": {
    "ErrorCode": 1,
    "ErrorMessage": "sample string 1"
  },
  "Data": {
    "Management": {
      "ProjectId": 1,
      "SpaceId": 2,
      "Success": true,
      "Reason": "sample string 4"
    },
    "Development": {
      "ProjectId": 1,
      "SpaceId": 2,
      "Success": true,
      "Reason": "sample string 4"
    },
    "Requirement": {
      "ProjectId": 1,
      "SpaceId": 2,
      "Success": true,
      "Reason": "sample string 4"
    },
    "Knowledge": {
      "ProjectId": 1,
      "SpaceId": 2,
      "Success": true,
      "Reason": "sample string 4"
    },
    "TestRun": {
      "ProjectId": 1,
      "SpaceId": 2,
      "Success": true,
      "Reason": "sample string 4"
    },
    "TestLiberary": {
      "ProjectId": 1,
      "SpaceId": 2,
      "Success": true,
      "Reason": "sample string 4"
    },
    "Defect": {
      "ProjectId": 1,
      "SpaceId": 2,
      "Success": true,
      "Reason": "sample string 4"
    }
  }
}

application/xml, text/xml

Sample:
<API_Data_P1DataOfP1ModuleUpdateResultbs1L93vz xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.ProjectOne">
    <d2p1:Defect xmlns:d3p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Entities">
      <d3p1:Reason>sample string 4</d3p1:Reason>
      <d3p1:Success>true</d3p1:Success>
      <d3p1:ProjectId>1</d3p1:ProjectId>
      <d3p1:SpaceId>2</d3p1:SpaceId>
    </d2p1:Defect>
    <d2p1:Development xmlns:d3p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Entities">
      <d3p1:Reason>sample string 4</d3p1:Reason>
      <d3p1:Success>true</d3p1:Success>
      <d3p1:ProjectId>1</d3p1:ProjectId>
      <d3p1:SpaceId>2</d3p1:SpaceId>
    </d2p1:Development>
    <d2p1:Knowledge xmlns:d3p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Entities">
      <d3p1:Reason>sample string 4</d3p1:Reason>
      <d3p1:Success>true</d3p1:Success>
      <d3p1:ProjectId>1</d3p1:ProjectId>
      <d3p1:SpaceId>2</d3p1:SpaceId>
    </d2p1:Knowledge>
    <d2p1:Management xmlns:d3p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Entities">
      <d3p1:Reason>sample string 4</d3p1:Reason>
      <d3p1:Success>true</d3p1:Success>
      <d3p1:ProjectId>1</d3p1:ProjectId>
      <d3p1:SpaceId>2</d3p1:SpaceId>
    </d2p1:Management>
    <d2p1:Requirement xmlns:d3p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Entities">
      <d3p1:Reason>sample string 4</d3p1:Reason>
      <d3p1:Success>true</d3p1:Success>
      <d3p1:ProjectId>1</d3p1:ProjectId>
      <d3p1:SpaceId>2</d3p1:SpaceId>
    </d2p1:Requirement>
    <d2p1:TestLiberary xmlns:d3p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Entities">
      <d3p1:Reason>sample string 4</d3p1:Reason>
      <d3p1:Success>true</d3p1:Success>
      <d3p1:ProjectId>1</d3p1:ProjectId>
      <d3p1:SpaceId>2</d3p1:SpaceId>
    </d2p1:TestLiberary>
    <d2p1:TestRun xmlns:d3p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Entities">
      <d3p1:Reason>sample string 4</d3p1:Reason>
      <d3p1:Success>true</d3p1:Success>
      <d3p1:ProjectId>1</d3p1:ProjectId>
      <d3p1:SpaceId>2</d3p1:SpaceId>
    </d2p1:TestRun>
  </Data>
  <Error>
    <ErrorCode>1</ErrorCode>
    <ErrorMessage>sample string 1</ErrorMessage>
  </Error>
  <Success>true</Success>
</API_Data_P1DataOfP1ModuleUpdateResultbs1L93vz>