Export Package
/mobile/tools/1.0/export/package
Creates a package with the specified assets.
Note that the simplest way to create the request body is to retrieve the package dependencies by sending a POST /mobile/tools/1.0/assets/packageDependencies
request for a backend or custom API's asset ID, and then using the response body for the dependencies
object in this request.
After the request completes successfully, use the downloadLink
from the response body to get the package's ZIP file.
Request
- application/json
-
If-Match(optional): string
The request completes successfully only if the ETag of the corresponding asset matches the value of this HTTP request header. To force overwrite, pass the value `*`.
object
Request Body for Package Export
-
dependencies:
object dependencies
Information about the asset and its dependencies.
-
package:
object package
The package's definition.
object
-
apis:
array apiDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of APIs as dependencies. -
collections:
array collectionDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of storage collections as dependencies. -
connectors:
array connectorDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of connectors as dependencies. -
implementations:
array implDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of API implementations as dependencies. -
mobilebackends:
array mbeDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of backends as dependencies. -
packages:
array packageDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of packages as dependencies. -
roles:
array roleArray
Minimum Number of Items:
0
Unique Items Required:true
An array of role elements. -
unresolvedDependencies:
array unresolvedDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of unresolved dependencies for a custom API implementation.
object
-
documentation:
string
A description of the package or any type of useful information.
-
name:
string
A name that identifies the package. Note that this name is used in the exported file name.
-
systemVersion:
string
Indicates the version of the service that was used to create the package.
-
version:
string
The package version.
array
0
true
-
[0]:
object apiDependency
API as a dependency.
array
0
true
-
[0]:
object collectionDependency
Storage collection as a dependency.
array
0
true
-
[0]:
object connectorDependency
Connector as a dependency.
array
0
true
-
[0]:
object implDependency
API implementation as a dependency.
array
0
true
-
[0]:
object mbeDependency
Backend as a dependency.
array
0
true
-
[0]:
object packageDependency
Package as a dependency.
array
0
true
-
[0]:
object roleGet
The role representation.
array
0
true
-
[0]:
object unresolvedDependency
Unresolved dependency for the custom API implementation.
object
-
object apiShort
The short API definition representation.
-
object apiDependency-allOf[1]
object
-
object assetGet
The asset representation for GET requests.
-
object apiShort-allOf[1]
object
-
implementation:
object assetShort
Asset information (short form).
-
implementations:
array assetShortQualifiedArray
Minimum Number of Items:
0
Unique Items Required:true
An array of qualified assets. -
mock:
boolean
The
Routing_BindAPIToMock
environment policy that's defined for the API. When this value is true, the service resolves the API request to a mock service instead of the implementation that's bound to the API. This is returned only in the context of the backend. -
roles:
array roleArray
Minimum Number of Items:
0
Unique Items Required:true
An array of role elements.
object
-
object assetUpdate
The asset representation for PUT requests.
-
object assetIdEtag
The asset ID and entity tag (ETag) values.
-
object trash
Indicator of whether the asset is in the trash.
-
object assetGet-allOf[3]
object
-
basePath:
string
The API base path in the format `/mobile/custom/{apiName}`.
-
hasBusinessObjects:
boolean
Default Value:
false
Indicates whether the API is associated with API Express resources (business objects). -
icon:
object icon
Information about the icon that's associated with the API or connector.
object
-
actionComment:
string
-
desc:
string
Maximum Length:
100
-
max:
boolean
Default Value:
false
-
name:
string
Maximum Length:
100
Pattern:^[a-zA-Z][a-zA-Z0-9_]*$
-
namespace:
string
Applicable to APIs and implementations only. This value is null for all other asset types.
-
title:
string
Maximum Length:
255
-
version:
string
Maximum Length:
100
Pattern:^[a-zA-Z0-9][\w.]*$
Asset version.
object
-
etag:
string
The asset entity tag (ETag) value, which you can use to detect concurrent modification.
-
id:
string
object
-
createdOn:
string
-
deletedBy:
string
-
deletedOn:
string
-
links:
array entityLinksArray
Minimum Number of Items:
0
An array of links for an entity's metadata. -
modifiedBy:
string
-
modifiedOn:
string
-
published:
boolean
An asset draft or published status representation.
array
0
-
[0]:
object items
Link to the entity's metadata.
object
-
href:
string
Link value.
-
rel:
Allowed Values:
[ "self", "canonical" ]
Link type.
object
object
-
id:
string
Asset identifier.
-
name:
string
Asset name.
-
namespace:
string
Asset namespace.
-
version:
string
Maximum Length:
100
Pattern:^[a-zA-Z0-9][\w.]*$
Asset version.
array
0
true
-
[0]:
object assetShortQualified
An asset's information in qualified short form, which includes type and qualifiers.
object
-
object assetShort
Asset information (short form).
-
object assetQualifiers
Asset type name and qualifiers.
object
-
qualifier:
string
The asset qualifier. It may contain multiple values separated by commas (`,`).
-
type:
Allowed Values:
[ "MobileBackend", "API", "APIImplementation", "Connector", "StorageCollection", "Role" ]
object
-
object mosCollectionGet
The storage collection representation for GET requests.
-
object assetQualifiers
Asset type name and qualifiers.
-
object collectionDependency-allOf[2]
object
-
object assetGet
The asset representation for GET requests.
-
object mosCollectionGet-allOf[1]
object
-
roles:
array roleArray
Minimum Number of Items:
0
Unique Items Required:true
An array of role elements.
object
-
object connectorGet
The connector representation for GET requests.
-
object assetQualifiers
Asset type name and qualifiers.
-
object connectorDependency-allOf[2]
object
-
object connectorShort
The short connector definition representation.
-
connectorGet-allOf[1]
object
-
implementation:
object assetShort
Asset information (short form).
object
-
object assetGet
The asset representation for GET requests.
-
object connectorBase
Base connector properties.
-
object connectorGetRest
REST connector get payload.
-
object connectorUpdateSoap
SOAP connector update payload.
-
object connectorUpdateDatabase
MOB DB connector update payload.
-
object connectorUpdateIcsRest
ICS REST connector update payload.
-
object connectorUpdateIcsSoap
ICS SOAP connector update payload.
object
-
basePath:
string
The connector API base path in the format `/mobile/connector/{name}/{path}`.
-
connectorType:
Allowed Values:
[ "REST", "SOAP", "DATABASE", "ICS", "FA" ]
-
icon:
object icon
Information about the icon that's associated with the API or connector.
object
-
object connectorUpdateRest
REST connector update payload.
-
object connectorGetRest-allOf[1]
object
-
object connectorCreateSoap
SOAP connector creation payload.
-
object connectorUpdateSoap-allOf[1]
object
-
object connectorCreateDatabase
REST connector creation payload.
-
object connectorUpdateDatabase-allOf[1]
object
-
object connectorUpdateRest
REST connector update payload.
-
object connectorUpdateIcsRest-allOf[1]
object
-
object connectorUpdateSoap
SOAP connector update payload.
-
object connectorUpdateIcsSoap-allOf[1]
object
-
httpConnectionTimeout:
integer(int64)
-
httpReadTimeout:
integer(int64)
-
remoteURL:
string
-
rules:
array restRuleArray
Minimum Number of Items:
0
An array of REST rules. -
securityPolicies:
array securityPolicyArray
Minimum Number of Items:
0
An array of security policy elements. -
workAreaTag:
string
object
-
descriptorInfo:
object connectorDescriptorInfo
Connector descriptor information.
array
0
-
[0]:
object restRule
REST connector rule definition.
array
0
-
[0]:
object securityPolicy
Connector OWSM security policy.
object
-
defaultParameters:
array defaultParameters
Minimum Number of Items:
0
Unique Items Required:true
-
methods:
array methods
Minimum Number of Items:
0
Unique Items Required:true
-
notAppliedToNested:
boolean
-
resource:
string
array
0
true
-
[0]:
object restParameter
REST connector rule default parameter.
array
0
true
-
[0]:
Allowed Values:
[ "GET", "POST", "PUT", "DELETE", "HEAD", "TRACE", "OPTIONS", "PATCH" ]
object
-
name:
string
-
type:
Allowed Values:
[ "query", "header" ]
-
value:
string
object
-
name:
string
-
overrides:
array securityPolicyOverrideArray
Minimum Number of Items:
0
An array of security-policy override elements.
array
0
-
[0]:
object securityPolicyOverride
Security policy override property.
object
-
descriptorLocation:
string
-
descriptorSource:
Allowed Values:
[ "URL", "FILE", "NONE" ]
-
designTimeUserName:
string
-
isDesignTimePasswordSaved:
boolean
object
-
httpConnectionTimeout:
integer(int64)
-
httpReadTimeout:
integer(int64)
-
operations:
array operations
-
securityPolicies:
array securityPolicyArray
Minimum Number of Items:
0
An array of security policy elements. -
svcEndpoint:
string
-
svcName:
string
-
svcPort:
string
object
-
custom:
string
The custom name for the operation.
-
name:
string
-
uri:
string
The URI for the SOAPAction HTTP request header.
object
-
databaseConnectorType:
Allowed Values:
[ "table", "customsql" ]
object
-
dbConnectorMetadata:
object dbConnectorMetadata
Database connector metadata model.
object
-
calls:
array calls
Minimum Number of Items:
0
-
tableInfo:
object tableInfo
Database connector table/view metadata.
object
-
allColumns:
array allColumns
Minimum Number of Items:
0
-
primaryKeys:
array primaryKeys
Minimum Number of Items:
0
-
requiredColumns:
array requiredColumns
Minimum Number of Items:
0
-
selectedColumns:
array selectedColumns
Minimum Number of Items:
0
-
tableNameInfo:
object tableNameInfo
Database connector table/view name/type metadata.
object
-
databaseTableName:
string
The true name of the database table, which might not be a legal JSON name.
-
tableName:
string
The name of the table in JSON or URL.
-
tableType:
string
Indicates whether the table is a table, view, or synonym.
object
-
ics:
object icsConnectionReference
ICS configuration. This holds state about an ICS instance that should persist across connector sessions.
-
integration:
object integration
ICS integration flow metadata.
object
-
connectionName:
string
The name of this logical construct describing connectivity to a particular ICS instance.
-
runtimeCsfKey:
string
The default CSF key entry to suggest using when reaching the ICS Security page (the one chosen/created last time).
-
serviceURL:
string
The service URL to ICS (that is, `https://
/ics`).
object
-
builtBy:
string
The author of the integration.
-
created:
string
When this integration was created.
-
description:
string
The description of the ICS integration.
-
icon:
string
URL of the icon for the target.
-
integrationName:
string
The name of the ICS integration.
-
remoteUrl:
string
The URL used to create the connector (remote URL or WSDL).
-
securityPolicy:
string
The WSS security policy to use to talk to this endpoint. That is, `oracle/http_basic_auth_over_ssl_client_policy`. Note that this value isn't shown on the discovery page in the connector UI.
-
targetService:
string
The type of system being exposed in ICS.
-
technology:
Allowed Values:
[ "SOAP", "REST" ]
-
updated:
string
When this integration was updated.
-
version:
string
The version in ICS.
object
-
ics:
object icsConnectionReference
ICS configuration. This holds state about an ICS instance that should persist across connector sessions.
-
integration:
object integration
ICS integration flow metadata.
object
-
object apiImplementationGet
The API implementation service details.
-
object assetQualifiers
Asset type name and qualifiers.
-
object implDependency-allOf[2]
object
-
object assetGet
The asset representation for GET requests.
-
object apiImplementationGet-allOf[1]
object
-
api:
object assetShortQualified
An asset's information in qualified short form, which includes type and qualifiers.
-
uses:
array assetShortQualifiedArray
Minimum Number of Items:
0
Unique Items Required:true
An array of qualified assets.
object
-
api:
object assetShortQualified
An asset's information in qualified short form, which includes type and qualifiers.
-
artifacts:
array artifactArray
Minimum Number of Items:
0
An array of artifact information.
array
0
-
[0]:
object artifact
The artifact information.
object
-
downloadLink:
string
The link to download the artifact.
-
id:
string
The artifact's ID.
-
name:
string
Maximum Length:
255
The name of the artifact. -
properties:
object properties
Additional Properties Allowed: additionalProperties
object
-
object mobilebackendGet
The backend representation for GET requests.
-
object assetQualifiers
Asset type name and qualifiers.
-
object mbeDependency-allOf[2]
object
-
object mobilebackendShortGet
The backend representation for GET requests.
-
object mobilebackendGet-allOf[1]
object
-
includes:
array assetShortQualifiedArray
Minimum Number of Items:
0
Unique Items Required:true
An array of qualified assets. -
roles:
array roleArray
Minimum Number of Items:
0
Unique Items Required:true
An array of role elements.
object
-
object assetGet
The asset representation for GET requests.
-
object mobilebackendOAuthKeys
The client keys (client_id/client_secret) that are required for backend access using OAuth.
-
object mobilebackendBasicAuthKeys
The mobile backend ID that's required for backend access when you use Basic access authorization.
-
object mobilebackendShortGet-allOf[3]
object
-
analyticsAppGuid:
string
Analytics application ID resolved from the policy. If a new analytics application creation was requested on the backend creation and this attribute is null, then the application wasn't created. In this case you can check if it already exists, retry, or create one with another name and/or timezone, and then link it to the backend.
-
targetBackend:
object assetShort
Asset information (short form).
-
targetBackendError:
object localizedMessage
Localized error message for generic purposes.
object
object
object
-
basic:
boolean
-
inactive:
boolean
-
oauth:
boolean
-
roleAccess:
object mobilebackendRoleAccess
The backend's role-access details.
object
-
enabled:
boolean
-
roles:
array stringArray
Minimum Number of Items:
0
An array of string values.
array
0
object
-
message:
string
-
messageId:
string
-
params:
array params
Minimum Number of Items:
0
object
-
object packageGet
The package representation for GET requests.
-
object assetQualifiers
Asset type name and qualifiers.
object
-
object assetGet
The asset representation for GET requests.
-
object packageGet-allOf[1]
object
-
documentation:
boolean
-
packageType:
Allowed Values:
[ "EXPORT", "IMPORT" ]
-
systemVersion:
string
object
-
name:
string
The name of the custom API or connector.
-
version:
string
The version of the custom API or connector.
Response
- application/json
200 Response
object
-
downloadLink:
string
The link to download the artifact.
-
id:
string
The artifact's ID.
-
name:
string
Maximum Length:
255
The name of the artifact. -
properties:
object properties
Additional Properties Allowed: additionalProperties
400 Response
object
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
The service's error code.
-
o:errorDetails:
object errorDetails
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer(int64)
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
object
-
detail:
string
-
o:errorDetails:
object errorDetails
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
412 Response
object
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
The service's error code.
-
o:errorDetails:
object errorDetails
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer(int64)
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
object
-
detail:
string
-
o:errorDetails:
object errorDetails
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Examples
The following example shows how to create and export a package using cURL. For more information about cURL, see Use cURL.
curl -i -X POST -d @body.json -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer $TOKEN" "$BASE_URL/mobile/tools/1.0/export/package"
Example of Request Body
The following shows an example of the request body. Note that the contents of the dependencies
object was copied from the response body that was returned by a POST /mobile/tools/1.0/assets/packageDependencies
request using the backend???s ID.
{ "package":{ "name":"salesPlusPackage", "version":"1.0", "documentation":"Using Export Package REST API" }, "dependencies":{ "mobilebackends":[ { "id":"1f7eee54-5f6d-4123-b4b7-5413912510ce", "name":"mcs_examples_sync_salesplus", "version":"1.0", "qualifier":"self", "desc":"MBE for the SalesPlus app which demonstrates several of the MCS Sync Client SDK features.", "links":[ ... ], "published":false, "inTrash":false, "actionComment":null, "etag":"2", "createdOn":"2016-09-13T03:20:24.878Z", "modifiedOn":"2017-07-11T20:10:42.348Z", "modifiedBy":"jdoe", "deletedOn":null, "deletedBy":null, "clientId":"3c78fddef1244ab8bad1b2c20b8e7a15", "clientSecret":"7711932a-7288-4b65-9e8e-0b486f6aaf72", "basicAuthBackendId":"faf550b1-24f0-4b40-9c58-6751e7047b22", "oauth":true, "basicAuth":true, "inactive":false, "roleAccess":{ "enabled":false, "roles":[ ] }, "includes":[ { "id":"f9da3b1f-cfa8-439e-be80-819a4455a24c", "name":"mcs_examples_sync_salesplus", "version":"1.0", "type":"API" }, { "id":"4566a5a1-1981-475f-8a70-053f0a409bcf", "name":"images", "version":"1.0", "type":"StorageCollection" } ], "roles":[ ] } ], "apis":[ { "id":"f9da3b1f-cfa8-439e-be80-819a4455a24c", "namespace":"custom", "name":"mcs_examples_sync_salesplus", "version":"1.0", "qualifier":"implements", "desc":"Supports the SalesPlus app which demonstrates several of the MCS Sync Client SDK features.", "links":[ ... ], "published":false, "inTrash":false, "actionComment":null, "etag":"1", "createdOn":"2016-09-13T03:08:21.030Z", "modifiedOn":"2016-12-21T16:52:17.155Z", "modifiedBy":"jdoe", "deletedOn":null, "deletedBy":null, "title":"REST API for the SalesPlus App", "basePath":"/mobile/custom/mcs_examples_sync_salesplus", "icon":null, "category":"CUSTOM", "hasBusinessObjects":false, "mock":false, "implementations":[ { "id":"1138d50b-cd03-42dc-8d2b-7e2c28e613dc", "name":"mcs_examples_sync_salesplus", "version":"1.0.0", "type":"APIImplementation" } ], "implementation":{ "id":"1138d50b-cd03-42dc-8d2b-7e2c28e613dc", "name":"mcs_examples_sync_salesplus", "version":"1.0.0" }, "roles":[ ] } ], "implementations":[ { "id":"1138d50b-cd03-42dc-8d2b-7e2c28e613dc", "name":"mcs_examples_sync_salesplus", "version":"1.0.0", "desc":"Custom API for MCS SalesPlus example app", "links":[ ... ], "published":false, "inTrash":false, "actionComment":null, "etag":"1", "createdOn":"2016-09-15T04:05:33.880Z", "modifiedOn":"2016-12-21T17:16:25.640Z", "modifiedBy":"jdoe", "deletedOn":null, "deletedBy":null, "artifacts":[ { "name":"impl 2.zip", "id":"c0bd8762-9f66-4233-bd9b-c91831d902cf", "properties":{ "customcode.api.implementation.artifact":"true" }, "downloadLink":"/mobile/tools/1.0/artifacts/c0bd8762-9f66-4233-bd9b-c91831d902cf" } ], "api":{ "id":"f9da3b1f-cfa8-439e-be80-819a4455a24c", "namespace":"custom", "name":"mcs_examples_sync_salesplus", "version":"1.0", "type":"API" }, "uses":[ ] } ], "connectors":[ ], "collections":[ { "id":"4566a5a1-1981-475f-8a70-053f0a409bcf", "name":"images", "version":"1.0", "desc":"Customer and technician photos", "links":[ ... ], "published":false, "inTrash":false, "actionComment":null, "etag":"5", "createdOn":"2017-07-11T20:10:41.563Z", "modifiedOn":"2017-07-11T20:37:49.911Z", "modifiedBy":"jdoe", "deletedOn":null, "deletedBy":null, "userIsolated":false, "syncControl":true, "guid":"OW2V7PVFUNAZDDQLLFFUVA24PQ", "roles":[ { "id":"fd42ebc04bff72fdd9adf34fd3732c12", "name":"manager", "version":"1.0", "desc":null, "links":[ ], "published":true, "inTrash":false, "actionComment":null, "etag":"1", "createdOn":null, "modifiedOn":null, "modifiedBy":null, "deletedOn":null, "deletedBy":null }, { "id":"fd11a5739507b3bb2a371b45b0eda6c7", "name":"customer", "version":"1.0", "desc":null, "links":[ ], "published":true, "inTrash":false, "actionComment":null, "etag":"1", "createdOn":null, "modifiedOn":null, "modifiedBy":null, "deletedOn":null, "deletedBy":null } ] } ], "unresolvedDependencies":[ ], "roles":[ { "id":"fd11a5739507b3bb2a371b45b0eda6c7", "name":"customer", "version":"1.0", "desc":null, "links":[ ... ], "published":true, "inTrash":false, "actionComment":null, "etag":"1", "createdOn":null, "modifiedOn":null, "modifiedBy":null, "deletedOn":null, "deletedBy":null }, { "id":"fd42ebc04bff72fdd9adf34fd3732c12", "name":"manager", "version":"1.0", "desc":null, "links":[ ... ], "published":true, "inTrash":false, "actionComment":null, "etag":"1", "createdOn":null, "modifiedOn":null, "modifiedBy":null, "deletedOn":null, "deletedBy":null } ], "packages":[ ], "clients":[ ], "policies":[ { "name":"*.custom/mcs_examples_sync_salesplus(1.0).Routing_BindApiToImpl", "value":"mcs_examples_sync_salesplus(1.0.0)", "desc":null } ] } }
Example of Response Header
The following shows an example of the response headers:
200 OK Content-Length: 200 Content-Type: application/json Date: Wed, 28 Jun 2017 20:00:11 GMT
Example of Response Body
The following example shows the contents of the response body in JSON format:
{ "name": "package-salesPlusPackage.zip", "id": "13f8f425-0e8a-4e46-a4d1-f0ee37aa552e", "properties": { "is.package": "true" }, "downloadLink": "/mobile/tools/1.0/artifacts/13f8f425-0e8a-4e46-a4d1-f0ee37aa552e" }