/jobs
You can create an export or an import job in the Content Network through an API.
API Request Details
|
URL |
/api/v1/content/jobs |
|
Request Type |
POST |
|
Content Type |
application/json |
Create an Export Job
This topic provides information that is required to create an export job of private packages in the Content Network through an API.
Context
Once you have 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.
|
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 |
For sharing the content with a specific tenant use the below attributes:
For sharing the content with a group of tenants having same OEM ID (partner) use the below attributes:
For sharing the content with a group of tenants having same erpNumber (customer number) use the below attribute:
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):
|
|
packageVersion |
String |
Optional |
packageVersion is an optional parameter in the export payload. If not provided, the package is exported with the default version 1.0.0. |
|
originLandscape |
String |
Conditional |
Export inside My Content - originLandscapeId (optional) Export inside Cross landscape shared folder - originLandscapeId (mandatory), provide source tenant landscape ID. |
|
objects |
Object [ ] |
Mandatory |
Specifies the array of objects to be exported.
Each object has the following attributes:
|
Response
When the POST method to create an export job is successful, then the system returns the job ID as the response.
Create an Import Job
This topic provides the information that is required to create an import job of private packages in the Content Network through an API.
Attributes in Import Job Request Payload
|
Attribute |
Type |
Mandatory/Optional |
Description |
|---|---|---|---|
|
type |
String |
Mandatory |
Specifies the type of the Job. The value should be IMPORT for creating an Content Network Import Job. |
|
privatePackage |
Long |
Mandatory |
Specifies the privateItemId/privatePackageId of the package (available in Content Network) to be imported. |
|
publicPackage |
Long |
Mandatory |
publicPackage parameter is required for importing Public Category (Samples, Business Content, 3rd Party Content) Packages. |
|
originLandscape |
String |
Conditional |
Same landscape tenant package - originLandscapeId (optional) Cross landscape shared package - originLandscapeId (mandaotry), provide source tenant landscape ID. |
|
allObjects |
Boolean |
Mandatory |
Specifies whether all the objects available in the package will be exported or not. Pass always true unless you have the list of objects you want to import. |
|
xsParameters |
String |
Optional |
It's a JSON structure, however, the values are passed as a string. The definition of the options within are as below. updateExisting: Specifies whether to overwrite objects or data. The default value is true. importDataOnly: Specifies whether to import and overwrite data of existing objects without making changes to the sturcture of your models. The default value is false. dropDependent: Specifies whether to drop the dependent objects and import them. The default value is false. The default value for the xsParameters is - "{\"updateExisting\" : true, \"importDataOnly\": false, \"dropDependent\": false}". |
|
packageVersion |
String |
Optional |
packageVersion is an optional parameter for importing a package. If not provided, the content of the package with the highest version is imported. |
Response
When the POST method to create an import job is successful, then the system returns the job ID as the response. You can go to Transport Content Status Codes to learn about the three-digit code in the response.
Create an Download Job
Attributes in Download Job Request Payload
|
Attribute |
Mandatory/Optional |
Description |
|---|---|---|
|
type |
Mandatory |
Specifies the type of the job. The value should be DOWNLOAD for creating an download job. |
|
serviceParameters |
Mandatory |
|
|
packageName |
Optional |
It is recommended to provide this parameter. |
|
packageVersion |
Optional |
packageVersion is an optional parameter for downloading a package. The highest version of the package is downloaded if packageVersion is not provided. |
Create an Upload Job
Attributes in Upload Job Request Payload
|
Attribute |
Mandatory/Optional |
Description |
|---|---|---|
|
type |
Mandatory |
Specifies the type of the job. The value should be UPLOAD for creating an upload job. |
|
serviceParameters |
Mandatory |
• parentItemId (mandatory)
• landscapeId (mandatory)
• replaceExistingItem (optional)
|
|
packageVersion |
Optional |
packageVersion is optional parameter for uploading package. If not provided, this will upload the .package with its downloaded version.
If packageVersion provided:
|
Create an Edit Job
This topic provides information that is required to Edit the private packages in the Content Network through an API.
|
Attribute |
Mandatory/Optional |
Description |
|---|---|---|
|
itemId |
Mandatory |
itemId is a mandatory parameter for editing a package. |
|
packageVersion |
Optional |
packageVersion is an optional parameter for editing a package. If this parameter is not provided, the highest version of the package is automatically selected and a new version is created with an update to the minor version. e.g, if the highest version of the package is 2.0.0, then a new version 2.1.0 is created.
|
Upload to SAP Cloud Transport Management System Job
This topic provides information that is required to upload packages to SAP Cloud Transport Management System in the Content Network through an API
|
Attribute |
Mandatory/Optional |
Description |
|---|---|---|
|
itemId |
Mandatory |
itemId is mandatory parameter for uploading the package to SAP Cloud Transport Management System. |
|
packageVersion |
Optional |
packageVersion is optional parameter. If not provided, this will upload the highest version package to SAP Cloud Transport Management System. |
|
nodeName |
Mandatory |
nodeName is mandatory, source node created in SAP Cloud Transport Management System Transport route to be provided here |