Install Package
/mobile/tools/1.0/import/package/install
Installs the uploaded package file that's identified by the artifact ID and name in the request body.
Note that when you import (upload) the package, you can copy the artifact
object from the upload response body to use in the request body for this operation.
Request
- application/json
object
Request Body for Package Installation
object
-
downloadLink(optional):
string
The link to download the artifact.
-
id:
string
The artifact's ID.
-
name:
string
Maximum Length:
255
The name of the artifact. -
properties(optional):
object properties
Additional Properties Allowed: additionalProperties
Response
- application/json
200 Response
object
-
importResults(optional):
object importReport
Import results.
-
package:
object packageGet
The package representation for GET requests.
-
policies(optional):
array policyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of policy elements. -
policyValidationReport(optional):
object policyValidationReport
The result of validation of the properties file with policies.
-
status(optional):
Allowed Values:
[ "SUCCESS", "FAILURE" ]
object
-
dependencies(optional):
object dependencies
Information about the asset and its dependencies.
-
records:
array checklistRecordArray
Minimum Number of Items:
0
Unique Items Required:true
An array of checklist report records.
object
-
object assetGet
The asset representation for GET requests.
-
object packageGet-allOf[1]
array
0
true
-
Array of:
object policy
Policy object representation.
object
-
valid:
boolean
-
validationResults(optional):
array validationResults
Minimum Number of Items:
0
object
-
apis(optional):
array apiDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of APIs as dependencies. -
collections(optional):
array collectionDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of storage collections as dependencies. -
connectors(optional):
array connectorDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of connectors as dependencies. -
implementations(optional):
array implDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of API implementations as dependencies. -
mobilebackends(optional):
array mbeDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of backends as dependencies. -
packages(optional):
array packageDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of packages as dependencies. -
roles(optional):
array roleArray
Minimum Number of Items:
0
Unique Items Required:true
An array of role elements. -
unresolvedDependencies(optional):
array unresolvedDependencyArray
Minimum Number of Items:
0
Unique Items Required:true
An array of unresolved dependencies for a custom API implementation.
array
0
true
-
Array of:
object checklistRecord
An asset's checklist/import result.
array
0
true
-
Array of:
object apiDependency
API as a dependency.
array
0
true
-
Array of:
object collectionDependency
Storage collection as a dependency.
array
0
true
-
Array of:
object connectorDependency
Connector as a dependency.
array
0
true
-
Array of:
object implDependency
API implementation as a dependency.
array
0
true
-
Array of:
object mbeDependency
Backend as a dependency.
array
0
true
-
Array of:
object packageDependency
Package as a dependency.
array
0
true
-
Array of:
object roleGet
The role representation.
array
0
true
-
Array of:
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(optional):
object assetShort
Asset information (short form).
-
implementations(optional):
array assetShortQualifiedArray
Minimum Number of Items:
0
Unique Items Required:true
An array of qualified assets. -
mock(optional):
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(optional):
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(optional):
string
The API base path in the format `/mobile/custom/{apiName}`.
-
hasBusinessObjects(optional):
boolean
Default Value:
false
Indicates whether the API is associated with API Express resources (business objects). -
icon(optional):
object icon
Information about the icon that's associated with the API or connector.
object
-
actionComment(optional):
string
-
desc(optional):
string
Maximum Length:
100
-
max(optional):
boolean
Default Value:
false
-
name:
string
Maximum Length:
100
Pattern:^[a-zA-Z][a-zA-Z0-9_]*$
-
namespace(optional):
string
Applicable to APIs and implementations only. This value is null for all other asset types.
-
title(optional):
string
Maximum Length:
255
-
version(optional):
string
Maximum Length:
100
Pattern:^[a-zA-Z0-9][\w.]*$
Asset version.
object
-
etag(optional):
string
The asset entity tag (ETag) value, which you can use to detect concurrent modification.
-
id:
string
object
-
createdOn(optional):
string
-
deletedBy(optional):
string
-
deletedOn(optional):
string
-
links(optional):
array entityLinksArray
Minimum Number of Items:
0
An array of links for an entity's metadata. -
modifiedBy(optional):
string
-
modifiedOn(optional):
string
-
published(optional):
boolean
An asset draft or published status representation.
array
0
-
Array of:
object items
Link to the entity's metadata.
object
-
href:
string
Link value.
-
rel:
Allowed Values:
[ "self", "canonical" ]
Link type.
object
object
-
id(optional):
string
Asset identifier.
-
name(optional):
string
Asset name.
-
namespace(optional):
string
Asset namespace.
-
version(optional):
string
Maximum Length:
100
Pattern:^[a-zA-Z0-9][\w.]*$
Asset version.
array
0
true
-
Array of:
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(optional):
string
The asset qualifier. It may contain multiple values separated by commas (`,`).
-
type(optional):
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(optional):
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(optional):
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(optional):
string
The connector API base path in the format `/mobile/connector/{name}/{path}`.
-
connectorType(optional):
Allowed Values:
[ "REST", "SOAP", "DATABASE", "ICS", "FA" ]
-
icon(optional):
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(optional):
integer(int64)
-
httpReadTimeout(optional):
integer(int64)
-
remoteURL:
string
-
rules(optional):
array restRuleArray
Minimum Number of Items:
0
An array of REST rules. -
securityPolicies(optional):
array securityPolicyArray
Minimum Number of Items:
0
An array of security policy elements. -
workAreaTag(optional):
string
object
-
descriptorInfo(optional):
object connectorDescriptorInfo
Connector descriptor information.
array
0
-
Array of:
object restRule
REST connector rule definition.
array
0
-
Array of:
object securityPolicy
Connector OWSM security policy.
object
-
defaultParameters(optional):
array defaultParameters
Minimum Number of Items:
0
Unique Items Required:true
-
methods(optional):
array methods
Minimum Number of Items:
0
Unique Items Required:true
-
notAppliedToNested(optional):
boolean
-
resource(optional):
string
array
0
true
-
Array of:
object restParameter
REST connector rule default parameter.
array
0
true
-
Array of:
Allowed Values:
[ "GET", "POST", "PUT", "DELETE", "HEAD", "TRACE", "OPTIONS", "PATCH" ]
object
-
name(optional):
string
-
type(optional):
Allowed Values:
[ "query", "header" ]
-
value(optional):
string
object
-
name:
string
-
overrides(optional):
array securityPolicyOverrideArray
Minimum Number of Items:
0
An array of security-policy override elements.
array
0
-
Array of:
object securityPolicyOverride
Security policy override property.
object
-
descriptorLocation(optional):
string
-
descriptorSource:
Allowed Values:
[ "URL", "FILE", "NONE" ]
-
designTimeUserName(optional):
string
-
isDesignTimePasswordSaved(optional):
boolean
object
-
httpConnectionTimeout(optional):
integer(int64)
-
httpReadTimeout(optional):
integer(int64)
-
operations(optional):
array operations
-
securityPolicies(optional):
array securityPolicyArray
Minimum Number of Items:
0
An array of security policy elements. -
svcEndpoint:
string
-
svcName:
string
-
svcPort:
string
object
-
custom(optional):
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(optional):
object dbConnectorMetadata
Database connector metadata model.
object
-
calls:
array calls
Minimum Number of Items:
0
-
tableInfo(optional):
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(optional):
object icsConnectionReference
ICS configuration. This holds state about an ICS instance that should persist across connector sessions.
-
integration(optional):
object integration
ICS integration flow metadata.
object
-
connectionName(optional):
string
The name of this logical construct describing connectivity to a particular ICS instance.
-
runtimeCsfKey(optional):
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(optional):
string
The author of the integration.
-
created(optional):
string
When this integration was created.
-
description(optional):
string
The description of the ICS integration.
-
icon(optional):
string
URL of the icon for the target.
-
integrationName:
string
The name of the ICS integration.
-
remoteUrl(optional):
string
The URL used to create the connector (remote URL or WSDL).
-
securityPolicy(optional):
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(optional):
string
The type of system being exposed in ICS.
-
technology(optional):
Allowed Values:
[ "SOAP", "REST" ]
-
updated(optional):
string
When this integration was updated.
-
version(optional):
string
The version in ICS.
object
-
ics(optional):
object icsConnectionReference
ICS configuration. This holds state about an ICS instance that should persist across connector sessions.
-
integration(optional):
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(optional):
object assetShortQualified
An asset's information in qualified short form, which includes type and qualifiers.
-
uses(optional):
array assetShortQualifiedArray
Minimum Number of Items:
0
Unique Items Required:true
An array of qualified assets.
object
-
api(optional):
object assetShortQualified
An asset's information in qualified short form, which includes type and qualifiers.
-
artifacts(optional):
array artifactArray
Minimum Number of Items:
0
An array of artifact information.
array
0
-
Array of:
object artifact
The artifact information.
object
-
downloadLink(optional):
string
The link to download the artifact.
-
id:
string
The artifact's ID.
-
name:
string
Maximum Length:
255
The name of the artifact. -
properties(optional):
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(optional):
array assetShortQualifiedArray
Minimum Number of Items:
0
Unique Items Required:true
An array of qualified assets. -
roles(optional):
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(optional):
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(optional):
object assetShort
Asset information (short form).
-
targetBackendError(optional):
object localizedMessage
Localized error message for generic purposes.
object
object
object
-
basic(optional):
boolean
-
inactive(optional):
boolean
-
oauth(optional):
boolean
-
roleAccess(optional):
object mobilebackendRoleAccess
The backend's role-access details.
object
-
enabled(optional):
boolean
-
roles(optional):
array stringArray
Minimum Number of Items:
0
An array of string values.
array
0
object
-
message:
string
-
messageId(optional):
string
-
params(optional):
array params
Minimum Number of Items:
0
object
-
object packageGet
The package representation for GET requests.
-
object assetQualifiers
Asset type name and qualifiers.
object
-
name(optional):
string
The name of the custom API or connector.
-
version(optional):
string
The version of the custom API or connector.
object
-
assetId:
string
-
assetType:
Allowed Values:
[ "MobileBackend", "API", "APIImplementation", "Connector", "StorageCollection", "Role" ]
-
messages(optional):
array localizedMessageArray
Minimum Number of Items:
0
An array of localized messages. -
resolvedTo(optional):
object assetShort
Asset information (short form).
-
resultCode:
Allowed Values:
[ "CREATED", "PICKED", "RESOLVED", "CONFLICTS", "SKIPPED", "PRIVILEGES" ]
array
0
-
Array of:
object localizedMessage
Localized error message for generic purposes.
object
-
documentation(optional):
boolean
-
packageType(optional):
Allowed Values:
[ "EXPORT", "IMPORT" ]
-
systemVersion(optional):
string
object
-
desc(optional):
string
-
name:
string
Maximum Length:
506
-
value:
string
Examples
The following example shows how to install an imported package using cURL. Before you call this operation, you must first upload the package by sending a POST /mobile/tools/1.0/import/package/upload
request.
curl -i -X POST -d @body.json -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" "$BASE_URL/mobile/tools/1.0/import/package/install"
Example of Request Body
You can use the artifact
object from the response body for your POST /mobile/tools/1.0/import/package/upload
request to form the request body, as shown here.
{ "artifact":{ "name":"package-mcs_examples_sync_salesplus.zip", "id":"04c56716-ab47-4ad0-997d-541d904f99ef", "properties":{ "is.package":"true" }, "downloadLink":"/mobile/tools/1.0/artifacts/04c56716-ab47-4ad0-997d-541d904f99ef" } }
Example of Response Header
The following shows an example of the response headers:
200 OK Date: Wed, 28 Jun 2017 20:00:11 GMT Content-length: 4413 Content-type: application/json
Example of Response Body
The following example shows the contents of the response body in JSON format:
{
"policies": [
{
"name": "*.custom/mcs_examples_sync_salesplus(1.0).Routing_BindApiToImpl",
"value": "mcs_examples_sync_salesplus(1.0.0)",
"desc": null
}
],
"importResults": {
"records": [
{
"assetId": "284efd91-e0bd-4459-be6c-e57618b649a4",
"assetType": "MobileBackend",
"resultCode": "CREATED",
"resolvedTo": null,
"messages": []
},
{
"assetId": "b5684f31-3984-46dc-8e6f-68712d63c224",
"assetType": "APIImplementation",
"resultCode": "CREATED",
"resolvedTo": null,
"messages": []
},
{
"assetId": "d406905a-b2b1-4b9e-a220-5b0b8a49ed39",
"assetType": "API",
"resultCode": "CREATED",
"resolvedTo": null,
"messages": []
}
],
"dependencies": {
"mobilebackends": [
{
"id": "284efd91-e0bd-4459-be6c-e57618b649a4",
"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": "0",
"createdOn": "2016-09-13T03:20:24.878Z",
"modifiedOn": "2016-09-15T04:15:14.724Z",
"modifiedBy": "jdoe",
"deletedOn": null,
"deletedBy": null,
"clientId": null,
"clientSecret": null,
"basicAuthBackendId": null,
"oauth": true,
"basicAuth": true,
"inactive": false,
"roleAccess": {
"enabled": false,
"roles": []
},
"includes": [],
"roles": []
}
],
"apis": [
{
"id": "d406905a-b2b1-4b9e-a220-5b0b8a49ed39",
"namespace": "custom",
"name": "mcs_examples_sync_salesplus",
"version": "1.0",
"desc": "Supports the SalesPlus app which demonstrates several of the MCS Sync Client SDK features.",
"links": [],
"published": false,
"inTrash": false,
"actionComment": null,
"etag": "0",
"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": null,
"implementations": [
{
"id": "b5684f31-3984-46dc-8e6f-68712d63c224",
"name": "mcs_examples_sync_salesplus",
"version": "1.0.0",
"type": "APIImplementation"
}
],
"implementation": {
"id": "b5684f31-3984-46dc-8e6f-68712d63c224",
"name": "mcs_examples_sync_salesplus",
"version": "1.0.0"
},
"roles": []
}
],
"implementations": [
{
"id": "b5684f31-3984-46dc-8e6f-68712d63c224",
"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": "0",
"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": "dd6430a5-e4ed-458d-a008-2eeae28864a6",
"properties": {
"customcode.api.implementation.artifact": "true"
},
"downloadLink": null
}
],
"api": null,
"uses": []
}
],
"connectors": [],
"collections": [],
"unresolvedDependencies": [],
"roles": [],
"packages": [],
"clients": []
}
},
"status": "SUCCESS",
"policyValidationReport": {
"valid": true,
"validationResults": [
{
"message": "We successfully uploaded the policies properties file but it failed the validation check. The format error could be due to a corrupted header or the policies file could've been generated from an earlier version of MCS. Ask your mobile cloud administrator to export the policies file from the Administration tab so you can check the file and verify its contents.",
"messageId": "MOBILE-58176",
"level": "WARNING"
}
]
},
"package": {
"id": "25f48bf7-bcc2-4e28-aeac-28069323d96e",
"name": "mcs_examples_sync_salesplus",
"version": "16.4.5",
"desc": null,
"links": [],
"published": false,
"inTrash": false,
"actionComment": null,
"etag": "0",
"createdOn": "2017-07-07T01:06:06.221Z",
"modifiedOn": "2017-07-07T01:06:06.221Z",
"modifiedBy": "uimcs",
"deletedOn": null,
"deletedBy": null,
"packageType": "IMPORT",
"documentation": "MBE and REST API for the SalesPlus app in the SDK's examples.zip. SalesPlus is a mobile app that displays and maintains contacts. It also displays reminders. You can use this app both online and offline. If you make changes to your contact info while you're offline, the app syncs with the server automatically when your device goes online. \nThis mobile app demonstrates several of the MCS Sync Client SDK features. It also provides end-to-end example code for building a mobile app that continues to work when the device is offline, including code that detects and handles conflicts between changes on the server and changes made in an offline device.",
"systemVersion": "16.4.5-201611092203",
"formatVersion": 0
}
}