POST /api/tenants/{TenantFedMemberID}/packages

Imports information that was previously exported from a platform version.

Supports upload of a ZIP file containing the information previously exported from the same or another platform instance, and an optional migration properties file. Migration properties allow for URL mapping of physical service endpoints between the source environment that the information was exported from and the target environment you're importing it to. For more information on the import properties file, see What is the import properties file and when do I need it? (developer portal help).

Note: To export the package, use this operation: GET /api/businesses/{BusinessID}/package.

Authorization Roles/Permissions: Must have Modify permission for the tenant; Site Admin.

This topic includes the following sections:

HTTP Method

POST

Back to top

URL

https://{hostname}/api/tenants/{TenantFedMemberID}/packages

Back to top

Sample Request

The example below shows a request to import data previously exported from another platform instance.

Request URL

https://{hostname}/api/tenants/acmepaymentscorp/packages

Sample request headers

POST /api/tenants/acmepaymentscorp/packages HTTP/1.1
Host: {hostname}
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
X-Csrf-Token_{tenant}: {TokenID}

Sample request body

The request body is the import ZIP file and possibly an optional properties file. The example below shows a snippet of the import file to demonstrate how the additional attribute, Package and filename, is used in the POST content. In this example, there is no mapping properties file.

-----------------------------11829702124658
Content-Disposition: form-data; name="Package"; filename="business-export.zip"
Content-Type: application/zip

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept

application/json, text/xml

application/vnd.soa.v71+json, application/vnd.soa.v71+xml

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Content-Type

multipart/form-data

  • Parameter key (name) for import ZIP file, containing the information previously exported from the same or another platform instance: Package
  • Parameter key (name) for optional migration properties file: MappingProperties
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
TenantFedMemberID Path TenantFedMemberID Required

Same as TenantID.

Unique ID for a specific tenant, in a federation (multi-tenant) scenario.

Back to top

Response

If successful, this operation returns HTTP status code 200, and the file is uploaded.

Back to top

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers

HTTP/1.1 200 OK
Status Code: 200
Date: Fri, 15 Jul 2016 18:53:19 GMT

Sample response body

There is no response body, but the file is uploaded.

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type

application/json, text/xml

application/vnd.soa.v71+json, application/vnd.soa.v71+xml

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Back to top

Response Body

There is no response body.

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header.
404

The resource could not be found.

For example, you might get this if the Accept header is set to a wrong value.
415 Unsupported Media Type; returned if the request is using a media type not supported by the method. For this operation, you must use a Content-Type of multipart/form-data, and you must provide two parameters keys, Package and MappingProperties. See Request Headers.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics