This topic provides information that is required to create an export job of private packages in the Content Network through an API.
Context
You have to refer to the topic Creating a Job for API request details such as URL and request type. Once you've the API request details, you have to provide the HTTP body and the service parameters for the request. You can check the sample HTTP body and service parameter structure below and replace the placeholders with actual values.
Attributes in Export Job Request Payload
Attribute
Type
Mandatory/Optional
Description
type
String
Mandatory
Specifies the type of the job. The value should be EXPORT for creating an export Job.
serviceParameters
String
Mandatory
It is a JSON structure that supports only string values and defines the details of the export that includes -
fields (Mandatory) - contains the name, summary, and description of the export (package). It's an array of fields. Each field specifies different field (for example, name, summary, and description) of the package and it consists of the following:
fieldType (Mandatory) - Specifies the type of the field. It can be name, description, or summary.
fieldI18n (Mandatory) - Specifies the localized value of the field. It's an array of object where each object consists of the following:
langCode (Mandatory) - The language for the value of the field.
value (Mandatory) - The value of the field.
isPrivate (Mandatory) - specifies whether the export job is for private content sharing. It should be true as only private Content sharing is supported for this endpoint.
privateItemsData (Mandatory) - specifies the below details
itemId (Optional) - specifies the item ID for the existing item when updating it with the modified content/metadata.
parentItemId (Mandatory) - specifies the id of the parent folder under which the content is being exported.
permissions (Mandatory) - Specifies the details of who is the recipient of this exported content. Its an array and each object inside it specifies the each sharing entity (permission). If the content need not be shared with anyone or you are using Content Network file to share the content, then you can keep it as empty ([ ]).
permission - Specifies a sharing entity and the content can be shared with some tenant by different means.
For sharing the content with a specific tenant use the below attributes:
tenantUrl - The tenant url of the tenant the content is being shared.
landscapeId - The landscapeId of the tenant the content is being shared.
For sharing the content with a group of tenants having same OEM ID (partner) use the below attributes:
oemId - The OEM ID of the tenants.
For sharing the content with a group of tenants having same erpNumber (customer number) use the below attribute:
erpNumber -The ERP number of the tenants.
From the above, (tenantUrl&landscapeID/oemId/erpNumber) any one should be present in a sharing entity (permission). The below attributes in permission specifies the access rights that are given for the sharing tenant(s):
list (mandatory) - true/false - The tenant should be able to only view the package (export unit)
read (mandatory) - true/false - The tenant should be able to view and import the package (export unit)
write (mandatory) - true/false - The tenant should be able to view, import, export, and edit the package (export unit)
delete (mandatory) - true/false - The tenant should be able to delete the package (export unit).
overwritePermissions - true/false - specifies whether the existing permissions require overwriting during the edit export API request.
taggingData (optional): Specifies the tags that can be applied for the package.
taggingData value should be a parameter tag which specifies the tag details. The value of a parameter tag is an array of tag object.
Each tag object has parameter tagId to specify the tag IDs. You can check the supported tags with their IDs in Predefined Tags for Private Package.
originLandscape
String
Optional
Specifies the landscape of the destination.
objects
Object [ ]
Mandatory
Specifies the array of objects to be exported.
Each Object has the below attributes:
xsParameters : It is required for export job. You should pass no value and leave it empty `{}` .
serviceParameters: It includes the parameter includeData which specifies whether the data to be included during export or not. Pass it as below - "{\"includeData\":true}"
objectId: Specifies the objectId of the object to be exported.
objectName: Specifies the name of the object
objectType: Specifies the type of the object.
description: Specifies the description of the object.
Response
When the POST method to create an export job is successful, then the system returns the job ID as the response.