AssignContentsToExtensionRepository

 

LibraryService / AssignContentsToExtensionRepository

 

Description: Assign contents to extension repository by content ids

URL: http://{your-server-url}/api/v1/core/libraries/extensions/repositories/{repositoryGuid}/contents

Method: POST

Token Required: True


Request Headers:
currentuserid: {switch to user id}
content-type: application/json or content-type: application/xml
token: {token}
Required Roles:

Portal Administrator( modification on the global repository)

Request:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Library.LibraryRequest

Parameter Type Nullable
Request.ContentIds int[] False

Request Query Parameters:
Parameter Type Nullable Description
returnrepositorycontent bool True default value is false, set to true if would like to return repository content instead of repository object

Example: http://{your-server-url}/api/v1/core/libraries/extensions/repositories/{repositoryGuid}/contents?


Response:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Library.LibraryResponse

Parameter Type Comment
Response.Repository Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Extensions.Repository[] return RepositoryContent object if returnrepositorycontent set as true

The following is an example request Xml body:
<LibraryRequest xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Library" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ContentIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <a:int>123</a:int>
  </ContentIds>
</LibraryRequest>

The following is an example request Json body:
{
	"ContentIds":[
		123
	]
}

The following is an example response Xml body:
<LibraryResponse xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Library" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <DebugMessage xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">String</DebugMessage>
  <Errors xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">
    <Error>
      <Code>String</Code>
      <Message>String</Message>
      <StackTrace>String</StackTrace>
    </Error>
  </Errors>
  <Status xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">Success</Status>
</LibraryResponse>

The following is an example response Json body:
{
	"DebugMessage":"String",
	"Errors":[
		{
			"Code":"String",
			"Message":"String",
			"StackTrace":"String"
		}
	],
	"Status":1
}