GET /api/businesses/{BusinessID}/package

Exports information about a business to an export file that can be imported to another platform instance.

Note: To import the package to another instance, after exporting, use this operation: POST /api/tenants/{FedmemberID}/packages.

Authorization Roles/Permissions: Must be logged in. Must have permission to modify the business information; a Business Admin.

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/businesses/{BusinessID}/package[?][migration.export.include.apis=true][&migration.pki.export=true][&migration.export.include.resources=true]
[&migration.export.include.api.connections=true][&migration.export.include.api.admins=true][&migration.export.include.policies=true][&migration.operationalpolicy.export=true]
[&migration.qospolicy.export=true][&migration.compliancepolicy.export=true][&migration.export.include.scopes=true][&migration.export.include.licenses=true]
[&migration.export.include.apps=true][&migration.app.pki.export=true][&migration.export.include.app.team=true][&migration.export.include.feature.customization.settings=true]
[&migration.export.include.workflow.definitions=true][&migration.export.include.custom.styles=true][&migration.export.include.security.domains=true]
[&migration.export.include.login.domains=true][&migration.export.include.message.templates=true]

Sample Request

The example below shows a request to export the information for the specified business.

Request URL #1: no options

https://{hostname}/api/businesses/tenantbusiness.acmepaymentscorp/package?download=true&wrapInHTML=true

Request URL #2: all options

https://{hostname}/api/businesses/tenantbusiness.acmepaymentscorp/package?migration.export.include.apis=true&migration.pki.export=true&migration.export.include.resources=true
&migration.export.include.api.connections=true&migration.export.include.api.admins=true&migration.export.include.policies=true&migration.operationalpolicy.export=true
&migration.qospolicy.export=true&migration.compliancepolicy.export=true&migration.export.include.scopes=true&migration.export.include.licenses=true
&migration.export.include.apps=true&migration.app.pki.export=true&migration.export.include.app.team=true&migration.export.include.feature.customization.settings=true
&migration.export.include.workflow.definitions=true&migration.export.include.custom.styles=true&migration.export.include.security.domains=true
&migration.export.include.login.domains=true&migration.export.include.message.templates=true

Sample request headers (no options)

GET /api/businesses/tenantbusiness.acmepaymentscorp/package?download=true&wrapInHTML=true 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

Not applicable.

Request Headers

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

Header Description
Accept

application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json

application/octet-stream

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
BusinessID Path string Required The unique ID for a specific business organization on the platform.
wrapInHTML Query boolean Optional If specified with value true, wrap the response in HTML. Only useful if you are running the API in a browser. For more information about this optional parameter, see File Upload with Ajax.
document.domain Query string Optional The document domain (normally the same as the {hostname} value).
download Query string Optional If set to true (the default), the content is downloaded. If set to false, the user is prompted for content disposition.
migration.pki.export Query boolean Optional

If specified with value true, include in export file:

  • API Private Key + Certificate (if existing; must be imported via the Policy Manager Console)
migration.export.include.policies Query boolean Optional

If specified with value true, include in export file:

  • Policies
migration.compliancepolicy.export Query boolean Optional

If specified with value true, include in export file:

  • Compliance policies
migration.export.include.apis Query boolean Optional

If specified with value true, include in export file:

  • APIs
migration.operationalpolicy.export Query boolean Optional

If specified with value true, include in export file:

  • Operational policies
migration.qospolicy.export Query boolean Optional

If specified with value true, include in export file:

  • Quality of Service policies
migration.export.include.scopes Query boolean Optional

If specified with value true, include in export file:

  • Scopes
migration.export.include.resources Query boolean Optional If specified with value true, resources and documentation are included in the export file.
migration.export.include.licenses Query boolean Optional

If specified with value true, include in export file:

  • Licenses
migration.export.include.apps Query boolean Optional

If specified with value true, include in export file:

  • Apps
migration.export.include.api.connections Query boolean Optional

If specified with value true, include in export file:

  • Contracts
migration.export.include.login.domains Query boolean Optional

If specified with value true, include in export file:

  • Login domains
migration.export.include.security.domains Query boolean Optional

If specified with value true, include in export file:

  • Security domains
migration.pki.export Query boolean Optional

If specified with value true, include in export file:

  • API Private Key + Certificate (if existing; must be imported via the Policy Manager Console)
migration.export.include.workflow.definitions Query boolean Optional

If specified with value true, include in export file:

  • Custom workflows
migration.export.include.message.templates Query boolean Optional

If specified with value true, include in export file:

  • Notification message templates
migration.export.include.custom.styles Query boolean Optional

If specified with value true, include in export file:

  • Custom styles
migration.export.include.feature.customization.settings Query boolean Optional

If specified with value true, include in export file:

  • Customization settings
migration.export.include.api.admins Query boolean Optional

If specified with value true, include in export file:

  • API Admins.

    Note: The user's relationship to the API is exported, not the actual user resource; in order for the relationship to be preserved in the target environment, the user must exist in the target environment when import is done. If not: a) create and invite the user, b) create the user and re-import, or c) invite a different user.

migration.export.include.app.team Query boolean Optional

If specified with value true, include in export file:

  • App team members.

    Note: The user's relationship to the app is exported, not the actual user resource; in order for the relationship to be preserved in the target environment, the user must exist in the target environment. If not: a) create and invite the user, b) create the user and re-import the data, or c) invite a different user.

migration.export.include.services Query boolean Optional

If not specified, or specified with value true, include in export file:

  • API Implementation Services

Note: For information about the wrapInHTML parameter shown in the sample request above, see File Upload with Ajax. This is only used if you are running the API in a browser context.

Response

If successful, this operation returns HTTP status code 200, with the business information returned in a file attachment named business-export.zip.

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers

HTTP/1.1 200 OK
Content-Type: application/octet-stream
Expires: Thu, 25 Sep 2014 16:44:30 GMT
Content-Disposition: attachment;filename="business-export.zip"

Sample response body

The response body is the export file. Click here to view an example.

Response Headers

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

Header Description
Content-Type

application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json

application/octet-stream

Content-Disposition attachment;filename="business-export.zip"

Response Body

The response body is the export file. Click here to view an example.

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.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.