POST /api/tenants/{FedmemberID}/packages

Imports information that was previously exported from a platform version.

Note: For the import to be successful, the file must be an export from the same version or from an earlier minor update of the same major version (for example, export from 2020.1.2 and import to 2020.1.5). For more information, see Can I export/import between different versions? (Community Manager developer portal help).

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? (Community Manager developer portal help).

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

For an illustration of running this operation in Postman, see Managing Multipart/Form-Data Uploads: Tenant Administration Service: Import Package.

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

This topic includes the following sections:

HTTP Method

POST

URL

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

Sample Request

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

Sample 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_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

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

For an illustration of running this operation in Postman, see Managing Multipart/Form-Data Uploads: Tenant Administration Service: Import Package.

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
Cookie AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies.
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Request Parameters

Parameter Parm Type Data Type Required Description
FedmemberID Path String Required Unique ID for a specific tenant. Same as TenantID.

Response

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

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers

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

Sample response body

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

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

Response Body

There is no response body.

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. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
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.