Create an API version from a project
POST /apim/create_from_project
Overview
This API creates an API version with the assets of an existing project.
The destination version can either be in the same or another API, Project, Environment/Org, or Snaplex.
Prerequisites
- Read access to the source project
- Write access to the target Org
Request
POST https://{controlplane_path}/api/1/rest/public/apim/create_from_project
Path Parameters
Key | Description |
---|---|
controlplane_path |
Required. The path to the SnapLogic Control Plane:
elastic.snaplogic.com
For the UAT or EMEA control plane, substitute the name for elastic . For
example:
|
Query Parameters
None.
Request Header
In the request header, specify Basic
for authorization, add your credentials, and specify application/json
for content type:
Authorization: Basic {your_encoded_security_credentials}
Content-Type: application/json
Request Body
{
"project_path": "/Automation2/Rachana/Importversion",
"plex_path": "/Automation2/shared/Sidekick",
"api": "doctest",
"version": "1.0",
"tags": ["test", "document"],
"description": "Testing Doc API",
"asset_types": []
}
Key | Type | Description |
---|---|---|
project_path |
string |
Required. The path to the SnapLogic project.
Format: Important: The path comparison is case-sensitive.
|
plex_path |
string |
The path to the Snaplex.
Format: |
api |
string | The name of the API for which to create a new version. |
version |
string | The new version. |
tags |
array | Tags to associate with the new version. Default: An empty array |
description |
string | Additional information to associate with the new version. Default: An empty string |
asset_types |
array | The list of asset types to copy to the new version.
Valid values:
Default: All valid asset types. |
- The "plex_path" attribute is case sensitive.
- Only Snaplexes placed in the global
shared
folder are accessible in APIM.
Response
Response Body
{
"response_map": {},
"http_status_code": 200
}
Error Handling
{
"http_status_code": 400,
"response_map": {
"error_list": [
{
"message": "The asset /Automation2/apim/doctest/1.0 conflicts with an existing asset, so cannot create."
}
]
}
}
{
"http_status_code": 400,
"response_map": {
"error_list": [
{
"message": "Invalid asset type. Allowed assets are ['File', 'Job', 'Account', 'Pipeline', 'Policy']."
}
]
}
HTTP Status Codes | Message | Resolution |
---|---|---|
400 |
{"message": "The asset /Automation2/apim/doctest/1.0 conflicts with
an existing asset, so cannot create."} |
If the same name assets exists in the API version, an empty API version is
created. To avoid creation of an empty API version:
|
400 |
{"message": "Invalid asset type. Allowed assets are ['File', 'Job',
'Account', 'Pipeline', 'Policy']."} |
|