Introduction
The murano service API is a programmatic interface used for interaction with murano. Other interaction mechanisms like the murano dashboard or the murano CLI should use the API as an underlying protocol for interaction.
Allowed HTTPs requests
Description Of Usual Server Responses
Response of POSTs and PUTs
All POST and PUT requests by convention should return the created object (in the case of POST, with a generated ID) as if it was requested by GET.
Authentication
All requests include a keystone authentication token header (X-Auth-Token). Clients must authenticate with keystone before interacting with the murano service.
Environment
The environment is a set of applications managed by a single project (tenant). They could be related logically with each other or not. Applications within a single environment may comprise of complex configuration while applications in different environments are always independent from one another. Each environment is associated with a single OpenStack project.
Session
Since murano environments are available for local modification for different users and from different locations, it’s needed to store local modifications somewhere. Sessions were created to provide this opportunity. After a user adds an application to the environment - a new session is created. After a user sends an environment to deploy, a session with a set of applications changes status to deploying and all other open sessions for that environment become invalid. One session could be deployed only once.
Object Model
Applications are defined in MuranoPL object model, which is defined as a JSON object. The murano API doesn’t know anything about it.
Package
A .zip archive, containing instructions for an application deployment.
The environment template is the specification of a set of applications managed by a single project, which are related to each other. The environment template is stored in an environment template catalog, and it can be managed by the user (creation, deletion, updating). Finally, it can be deployed on OpenStack by translating into an environment.
Attribute | Type | Description |
---|---|---|
id | string | Unique ID |
name | string | User-friendly name |
created | datetime | Creation date and time in ISO format |
updated | datetime | Modification date and time in ISO format |
tenant_id | string | OpenStack project ID |
version | int | Current version |
networking | string | Network settings |
acquired_by | string | Id of a session that acquired this environment (for example is deploying it) |
status | string | Deployment status: ready, pending, deploying |
Common response codes
Code | Description |
---|---|
200 | Operation completed successfully |
403 | User is not authorized to perform the operation |
Request
Method | URI | Description |
---|---|---|
GET | /environments | Get a list of existing Environments |
Parameters:
Response
This call returns a list of environments. Only the basic properties are returned.
{
"environments": [
{
"status": "ready",
"updated": "2014-05-14T13:02:54",
"networking": {},
"name": "test1",
"created": "2014-05-14T13:02:46",
"tenant_id": "726ed856965f43cc8e565bc991fa76c3",
"version": 0,
"id": "2fa5ab704749444bbeafe7991b412c33"
},
{
"status": "ready",
"updated": "2014-05-14T13:02:55",
"networking": {},
"name": "test2",
"created": "2014-05-14T13:02:51",
"tenant_id": "726ed856965f43cc8e565bc991fa76c3",
"version": 0,
"id": "744e44812da84e858946f5d817de4f72"
}
]
}
Attribute | Type | Description |
---|---|---|
name | string | Environment name; at least one non-white space symbol |
Request
Method | URI | Description |
---|---|---|
POST | /environments | Create new Environment |
Content-Type application/json
{“name”: “env_name”}
Response
{
"id": "ce373a477f211e187a55404a662f968",
"name": "env_name",
"created": "2013-11-30T03:23:42Z",
"updated": "2013-11-30T03:23:44Z",
"tenant_id": "0849006f7ce94961b3aab4e46d6f229a",
"version": 0
}
Attribute | Type | Description |
---|---|---|
name | string | Environment name; at least one non-white space symbol |
Request
Method | URI | Description |
---|---|---|
PUT | /environments/<env_id> | Update an existing Environment |
Response
{
"id": "ce373a477f211e187a55404a662f968",
"name": "env_name_changed",
"created": "2013-11-30T03:23:42Z",
"updated": "2013-11-30T03:45:54Z",
"tenant_id": "0849006f7ce94961b3aab4e46d6f229a",
"version": 0
}
Code | Description |
---|---|
200 | Edited environment |
400 | Environment name must contain at least one non-white space symbol |
403 | User is not authorized to access environment |
404 | Environment not found |
409 | Environment with specified name already exists |
Request
Return information about the environment itself and about applications, including this environment.
Method | URI | Header | Description |
---|---|---|---|
GET | /environments/{id} | X-Configuration-Session (optional) | Response detailed information about Environment including child entities |
Response
{
"status": "ready",
"updated": "2014-05-14T13:12:26",
"networking": {},
"name": "quick-env-2",
"created": "2014-05-14T13:09:55",
"tenant_id": "726ed856965f43cc8e565bc991fa76c3",
"version": 1,
"services": [
{
"instance": {
"flavor": "m1.medium",
"image": "cloud-fedora-v3",
"name": "exgchhv6nbika2",
"ipAddresses": [
"10.0.0.200"
],
"?": {
"type": "io.murano.resources.Instance",
"id": "14cce9d9-aaa1-4f09-84a9-c4bb859edaff"
}
},
"name": "rewt4w56",
"?": {
"status": "ready",
"_26411a1861294160833743e45d0eaad9": {
"name": "Telnet"
},
"type": "io.murano.apps.linux.Telnet",
"id": "446373ef-03b5-4925-b095-6c56568fa518"
}
}
],
"id": "20d4a012628e4073b48490a336a8acbf"
}
Request
Method | URI | Description |
---|---|---|
DELETE | /environments/{id}?abandon | Remove specified Environment. |
Parameters:
Response
Code | Description |
---|---|
200 | OK. Environment deleted successfully |
403 | User is not allowed to delete this resource |
404 | Not found. Specified environment doesn`t exist |
Multiple sessions could be opened for one environment simultaneously, but only one session going to be deployed. First session that starts deploying is going to be deployed; other ones become invalid and could not be deployed at all. User could not open new session for environment that in deploying state (that’s why we call it “almost lock free” model).
Attribute | Type | Description |
---|---|---|
id | string | Session unique ID |
environment_id | string | Environment that going to be modified during this session |
created | datetime | Creation date and time in ISO format |
updated | datetime | Modification date and time in ISO format |
user_id | string | Session owner ID |
version | int | Environment version for which configuration session is opened |
state | string | Session state. Could be: open, deploying, deployed |
During this call new working session is created, and session ID should be sent in a request header with name X-Configuration-Session.
Request
Method | URI | Description |
---|---|---|
POST | /environments/<env_id>/configure | Creating new configuration session |
Response
{
"updated": datetime.datetime(2014, 5, 14, 14, 17, 58, 949358),
"environment_id": "744e44812da84e858946f5d817de4f72",
"ser_id": "4e91d06270c54290b9dbdf859356d3b3",
"created": datetime.datetime(2014, 5, 14, 14, 17, 58, 949305),
"state": "open", "version": 0L, "id": "257bef44a9d848daa5b2563779714820"
}
Code | Description |
---|---|
200 | Session created successfully |
401 | User is not authorized to access this session |
403 | Could not open session for environment, environment has deploying status |
With this request all local changes made within the environment start to deploy on OpenStack.
Request
Method | URI | Description |
---|---|---|
POST | /environments/<env_id>/sessions/ <session_id>/deploy |
|
Response
Code | Description |
---|---|
200 | Session status changes to deploying |
401 | User is not authorized to access this session |
403 | Session is already deployed or deployment is in progress |
404 | Not found. Specified session doesn`t exist |
Request
Method | URI | Description |
---|---|---|
GET | /environments/<env_id>/sessions/ <session_id> | Get details about session with specified session_id |
Response
{
"id": "4aecdc2178b9430cbbb8db44fb7ac384",
"environment_id": "4dc8a2e8986fa8fa5bf24dc8a2e8986fa8",
"created": "2013-11-30T03:23:42Z",
"updated": "2013-11-30T03:23:54Z",
"user_id": "d7b501094caf4daab08469663a9e1a2b",
"version": 0,
"state": "deploying"
}
Code | Description |
---|---|
200 | Session details information received |
401 | User is not authorized to access this session |
403 | Session is invalid |
404 | Not found. Specified session doesn`t exist |
Request
Method | URI | Description |
---|---|---|
DELETE | /environments/<env_id>/sessions/ <session_id> | Delete session with specified session_id |
Response
Code | Description |
---|---|
200 | Session is deleted successfully |
401 | User is not authorized to access this session |
403 | Session is in deploying state and could not be deleted |
404 | Not found. Specified session doesn`t exist |
Environment deployment API allows to track changes of environment status, deployment events and errors. It also allows to browse deployment history.
Returns information about all deployments of the specified environment.
Request
Method | URI | Description |
---|---|---|
GET | /environments/<env_id>/deployments | Get list of environment deployments |
Response
{
"deployments": [
{
"updated": "2014-05-15T07:24:21",
"environment_id": "744e44812da84e858946f5d817de4f72",
"description": {
"services": [
{
"instance": {
"flavor": "m1.medium",
"image": "cloud-fedora-v3",
"?": {
"type": "io.murano.resources.Instance",
"id": "ef729199-c71e-4a4c-a314-0340e279add8"
},
"name": "xkaduhv7qeg4m7"
},
"name": "teslnet1",
"?": {
"_26411a1861294160833743e45d0eaad9": {
"name": "Telnet"
},
"type": "io.murano.apps.linux.Telnet",
"id": "6e437be2-b5bc-4263-8814-6fd57d6ddbd5"
}
}
],
"defaultNetworks": {
"environment": {
"name": "test2-network",
"?": {
"type": "io.murano.lib.networks.neutron.NewNetwork",
"id": "b6a1d515434047d5b4678a803646d556"
}
},
"flat": null
},
"name": "test2",
"?": {
"type": "io.murano.Environment",
"id": "744e44812da84e858946f5d817de4f72"
}
},
"created": "2014-05-15T07:24:21",
"started": "2014-05-15T07:24:21",
"finished": null,
"state": "running",
"id": "327c81e0e34a4c93ad9b9052ef42b752"
}
]
}
Code | Description |
---|---|
200 | Deployments information received successfully |
401 | User is not authorized to access this environment |
All applications should be created within an environment and all environment modifications are held within the session. Local changes apply only after successful deployment of an environment session.
Using GET requests to applications endpoint user works with list containing all applications for specified environment. A user can request a whole list, specific application, or specific attribute of a specific application using tree traversing. To request a specific application, the user should add to endpoint part an application id, e.g.: /environments/<env_id>/services/<application_id>. For selection of specific attribute on application, simply appending part with attribute name will work. For example to request application name, user should use next endpoint: /environments/<env_id>/services/<application_id>/name
Request
Method | URI | Header |
---|---|---|
GET | /environments/<env_id>/services/<app_id> | X-Configuration-Session (optional) |
Parameters:
Response
{
"instance": {
"flavor": "m1.medium",
"image": "cloud-fedora-v3",
"?": {
"type": "io.murano.resources.Instance",
"id": "060715ff-7908-4982-904b-3b2077ff55ef"
},
"name": "hbhmyhv6qihln3"
},
"name": "dfg34",
"?": {
"status": "pending",
"_26411a1861294160833743e45d0eaad9": {
"name": "Telnet"
},
"type": "io.murano.apps.linux.Telnet",
"id": "6e7b8ad5-888d-4c5a-a498-076d092a7eff"
}
}
New application can be added to the murano environment using session. Result JSON is calculated in Murano dashboard, which based on UI definition
Request
Method | URI | Header |
---|---|---|
POST | /environments/<env_id>/services | X-Configuration-Session |
{
"instance": {
"flavor": "m1.medium",
"image": "clod-fedora-v3",
"?": {
"type": "io.murano.resources.Instance",
"id": "bce8308e-5938-408b-a27a-0d3f0a2c52eb"
},
"name": "nhekhv6r7mhd4"
},
"name": "sdf34sadf",
"?": {
"_26411a1861294160833743e45d0eaad9": {
"name": "Telnet"
},
"type": "io.murano.apps.linux.Telnet",
"id": "190c8705-5784-4782-83d7-0ab55a1449aa"
}
}
Response
Created application returned
{
"instance": {
"flavor": "m1.medium",
"image": "cloud-fedora-v3",
"?": {
"type": "io.murano.resources.Instance",
"id": "bce8308e-5938-408b-a27a-0d3f0a2c52eb"
},
"name": "nhekhv6r7mhd4"
},
"name": "sdf34sadf",
"?": {
"_26411a1861294160833743e45d0eaad9": {
"name": "Telnet"
},
"type": "io.murano.apps.linux.Telnet",
"id": "190c8705-5784-4782-83d7-0ab55a1449a1"
}
}
Code | Description |
---|---|
200 | Session is deleted successfully |
401 | User is not authorized to access this session |
403 | Session is in deploying state and could not be deleted |
404 | Not found. Specified session doesn`t exist |
400 | Required header or body are not provided |
Delete one or all applications from the environment
Request
Method | URI | Header |
---|---|---|
DELETE | /environments/<env_id>/services/<app_id> | X-Configuration-Session(optional) |
Parameters:
Statistic API intends to provide billing feature
Request
Get information about all deployed instances in the specified environment
Method | URI |
---|---|
GET | /environments/<env_id>/instance-statistics/raw/<instance_id> |
Parameters:
Response
Attribute | Type | Description |
---|---|---|
type | int | Code of the statistic object; 200 - instance, 100 - application |
type_name | string | Class name of the statistic object |
instance_id | string | Id of deployed instance |
active | bool | Instance status |
type_title | string | User-friendly name for browsing statistic in UI |
duration | int | Seconds of instance uptime |
[
{
"type": 200,
"type_name": "io.murano.resources.Instance",
"instance_id": "ef729199-c71e-4a4c-a314-0340e279add8",
"active": true,
"type_title": null,
"duration": 1053,
}
]
Request
Method | URI |
---|---|
GET | /environments/<env_id>/instance-statistics/aggregated |
Response
Attribute | Type | Description |
---|---|---|
type | int | Code of the statistic object; 200 - instance, 100 - application |
duration | int | Amount uptime of specified type objects |
count | int | Quantity of specified type objects |
application/json
[
{
"duration": 720,
"count": 2,
"type": 200
}
]
Request
Method | URI |
---|---|
GET | /stats |
Response
Attribute | Type | Description |
---|---|---|
requests_per_tenant | int | Number of incoming requests for user project |
errors_per_second | int | Class name of the statistic object |
errors_count | int | Class name of the statistic object |
requests_per_second | float | Average number of incoming request received in one second |
requests_count | int | Number of all requests sent to the server |
cpu_percent | bool | Current cpu usage |
cpu_count | int | Available cpu power is cpu_count * 100% |
host | string | Server host-name |
average_response_time | float | Average time response waiting, seconds |
[
{
"updated": "2014-05-15T08:26:17",
"requests_per_tenant": "{\"726ed856965f43cc8e565bc991fa76c3\": 313}",
"created": "2014-04-29T13:23:59",
"cpu_count": 2,
"errors_per_second": 0,
"requests_per_second": 0.0266528,
"cpu_percent": 21.7,
"host": "fervent-VirtualBox",
"error_count": 0,
"request_count": 320,
"id": 1,
"average_response_time": 0.55942
}
]
Murano actions are simple MuranoPL methods, that can be called on deployed applications. Application contains a list with available actions. Actions may return a result.
Generate task with executing specified action. Input parameters may be provided.
Request
Method | URI | Header |
---|---|---|
POST | /environments/<env_id>/actions/<action_id> |
Parameters:
"{<action_property>: value}"
or
"{}" in case action has no properties
Response
Task ID that executes specified action is returned
{
"task_id": "620e883070ad40a3af566d465aa156ef"
}
Request result value after action execution finish. Not all actions have return values.
Request
Method | URI | Header |
---|---|---|
GET | /environments/<env_id>/actions/<task_id> |
Parameters:
Response
Json, describing action result is returned. Result type and value are provided.
{
"isException": false,
"result": ["item1", "item2"]
}
Manage application definitions in the Application Catalog. You can browse, edit and upload new application packages (.zip.package archive with all data that required for a service deployment).
Methods for application package management
Package Properties
/v1/catalog/packages?{marker}{limit}{order_by}{type}{category}{fqn}{owned}{id}{catalog}{class_name}{name} [GET]
This is the compound request to list and search through application catalog. If there are no search parameters all packages that is_public, enabled and belong to the user’s project will be listed. Default order is by ‘created’ field. For an admin role all packages are available.
Parameters
Attribute | Type | Description |
---|---|---|
catalog | bool | If false (default) - search packages, that current user can edit (own for non-admin, all for admin) If true - search packages, that current user can deploy (i.e. his own + public) |
marker | string | A package identifier marker may be specified. When present only packages which occur after the identifier ID will be listed |
limit | string | When present the maximum number of results returned will not exceed the specified value. The typical pattern of limit and marker is to make an initial limited request and then to use the ID of the last package from the response as the marker parameter in a subsequent limited request. |
order_by | string | Allows to sort packages by: fqn, name, created. Created is default value. |
type | string | Allows to point a type of package: application, library |
category | string | Allows to point a categories for a search |
fqn | string | Allows to point a fully qualified package name for a search |
owned | bool | Search only from packages owned by current project |
id | string | Allows to point an id for a search |
include_disabled | bool | Include disabled packages in a the result |
search | string | Gives opportunity to search specified data by all the package parameters |
class_name | string | Search only for packages, that use specified class |
name | string | Allows to point a package name for a search |
Response 200 (application/json)
{"packages": [
{
"id": "fed57567c9fa42c192dcbe0566f8ea33",
"fully_qualified_name" : "com.example.murano.services.linux.telnet",
"is_public": false,
"name": "Telnet",
"type": "linux",
"description": "Installs Telnet service",
"author": "OpenStack, Inc.",
"created": "2014-04-02T14:31:55",
"enabled": true,
"tags": ["linux", "telnet"],
"categories": ["Utility"],
"owner_id": "fed57567c9fa42c192dcbe0566f8ea40"
},
{
"id": "fed57567c9fa42c192dcbe0566f8ea31",
"fully_qualified_name": "com.example.murano.services.windows.WebServer",
"is_public": true,
"name": "Internet Information Services",
"type": "windows",
"description": "The Internet Information Service sets up an IIS server and joins it into an existing domain",
"author": "OpenStack, Inc.",
"created": "2014-04-02T14:31:55",
"enabled": true,
"tags": ["windows", "web"],
"categories": ["Web"],
"owner_id": "fed57567c9fa42c192dcbe0566f8ea40"
}]
}
/v1/catalog/packages
See the example of multipart/form-data request, It should contain two parts - text (json string) and file object
Request (multipart/form-data)
Content-type: multipart/form-data, boundary=AaB03x
Content-Length: $requestlen
--AaB03x
content-disposition: form-data; name="submit-name"
--AaB03x
Content-Disposition: form-data; name="JsonString"
Content-Type: application/json
{"categories":["web"] , "tags": ["windows"], "is_public": false, "enabled": false}
`categories` - array, required
`tags` - array, optional
`name` - string, optional
`description` - string, optional
`is_public` - bool, optional
`enabled` - bool, optional
--AaB03x
content-disposition: file; name="file"; filename="test.tar"
Content-Type: targz
Content-Transfer-Encoding: binary
$binarydata
--AaB03x--
Response 200 (application/json)
{
"updated": "2014-04-03T13:00:13",
"description": "A domain service hosted in Windows environment by using Active Directory Role",
"tags": ["windows"],
"is_public": true,
"id": "8f4f09bd6bcb47fb968afd29aacc0dc9",
"categories": ["test1"],
"name": "Active Directory",
"author": "Mirantis, Inc",
"created": "2014-04-03T13:00:13",
"enabled": true,
"class_definition": [
"com.mirantis.murano.windows.activeDirectory.ActiveDirectory",
"com.mirantis.murano.windows.activeDirectory.SecondaryController",
"com.mirantis.murano.windows.activeDirectory.Controller",
"com.mirantis.murano.windows.activeDirectory.PrimaryController"
],
"fully_qualified_name": "com.mirantis.murano.windows.activeDirectory.ActiveDirectory",
"type": "Application",
"owner_id": "fed57567c9fa42c192dcbe0566f8ea40"
}
/v1/catalog/packages/{id} [GET]
Display details for a package.
Parameters
id (required) Hexadecimal id (or fully qualified name) of the package
Response 200 (application/json)
{
"updated": "2014-04-03T13:00:13",
"description": "A domain service hosted in Windows environment by using Active Directory Role",
"tags": ["windows"],
"is_public": true,
"id": "8f4f09bd6bcb47fb968afd29aacc0dc9",
"categories": ["test1"],
"name": "Active Directory",
"author": "Mirantis, Inc",
"created": "2014-04-03T13:00:13",
"enabled": true,
"class_definition": [
"com.mirantis.murano.windows.activeDirectory.ActiveDirectory",
"com.mirantis.murano.windows.activeDirectory.SecondaryController",
"com.mirantis.murano.windows.activeDirectory.Controller",
"com.mirantis.murano.windows.activeDirectory.PrimaryController"
],
"fully_qualified_name": "com.mirantis.murano.windows.activeDirectory.ActiveDirectory",
"type": "Application",
"owner_id": "fed57567c9fa42c192dcbe0566f8ea40"
}
Response 403
Response 404
/v1/catalog/packages/{id} [PATCH]
Allows to edit mutable fields (categories, tags, name, description, is_public, enabled). See the full specification here.
Parameters
id (required) Hexadecimal id (or fully qualified name) of the package
Content type
application/murano-packages-json-patch
Allowed operations:
[
{ "op": "add", "path": "/tags", "value": [ "foo", "bar" ] },
{ "op": "add", "path": "/categories", "value": [ "foo", "bar" ] },
{ "op": "remove", "path": "/tags", ["foo"] },
{ "op": "remove", "path": "/categories", ["foo"] },
{ "op": "replace", "path": "/tags", "value": [] },
{ "op": "replace", "path": "/categories", "value": ["bar"] },
{ "op": "replace", "path": "/is_public", "value": true },
{ "op": "replace", "path": "/enabled", "value": true },
{ "op": "replace", "path": "/description", "value":"New description" },
{ "op": "replace", "path": "/name", "value": "New name" }
]
Request 200 (application/murano-packages-json-patch)
[
{ "op": "add", "path": "/tags", "value": [ "windows", "directory"] },
{ "op": "add", "path": "/categories", "value": [ "Directory" ] }
]
Response 200 (application/json)
{
"updated": "2014-04-03T13:00:13",
"description": "A domain service hosted in Windows environment by using Active Directory Role",
"tags": ["windows", "directory"],
"is_public": true,
"id": "8f4f09bd6bcb47fb968afd29aacc0dc9",
"categories": ["test1"],
"name": "Active Directory",
"author": "Mirantis, Inc",
"created": "2014-04-03T13:00:13",
"enabled": true,
"class_definition": [
"com.mirantis.murano.windows.activeDirectory.ActiveDirectory",
"com.mirantis.murano.windows.activeDirectory.SecondaryController",
"com.mirantis.murano.windows.activeDirectory.Controller",
"com.mirantis.murano.windows.activeDirectory.PrimaryController"
],
"fully_qualified_name": "com.mirantis.murano.windows.activeDirectory.ActiveDirectory",
"type": "Application",
"owner_id": "fed57567c9fa42c192dcbe0566f8ea40"
}
Response 403
Response 404
/v1/catalog/packages/{id} [DELETE]
Parameters
Response 404
/v1/catalog/packages/{id}/download [GET]
Get application definition package
Parameters
Response 200 (application/octetstream)
The sequence of bytes representing package content
Response 404
Specified package id doesn’t exist
/v1/catalog/packages/{id}/ui [GET]
Retrieve UI definition for a application which described in a package with provided id
Parameters
Response 200 (application/octet-stream)
The sequence of bytes representing UI definition
Response 404
Specified package id doesn’t exist
Response 403
Specified package is not public and not owned by user project, performing the request
Response 404
Retrieve application logo which described in a package with provided id
/v1/catalog/packages/{id}/logo [GET]
Parameters
id (required) Hexadecimal id (or fully qualified name) of the package
Response 200 (application/octet-stream)
The sequence of bytes representing application logo
Response 403
Specified package is not public and not owned by user project, performing the request
Response 404
Specified package is not public and not owned by user project, performing the request
Provides category management. Categories are used in the Application Catalog to group application for easy browsing and search.
!DEPRECATED (Plan to remove in L release) Retrieve list of all available application categories
Response 200 (application/json)
A list, containing category names
- Content-Type
- application/json
{ "categories": ["Web service", "Directory", "Database", "Storage"] }
Method URI Description GET /catalog/categories Get list of existing categories Retrieve list of all available application categories
Response 200 (application/json)
A list, containing detailed information about each category
- Content-Type
- application/json
{"categories": [ { "id": "0420045dce7445fabae7e5e61fff9e2f", "updated": "2014-12-26T13:57:04", "name": "Web", "created": "2014-12-26T13:57:04", "package_count": 1 }, { "id": "3dd486b1e26f40ac8f35416b63f52042", "updated": "2014-12-26T13:57:04", "name": "Databases", "created": "2014-12-26T13:57:04", "package_count": 0 }] }
/catalog/categories/<category_id> [GET]
Return detailed information for a provided category
Request
Method | URI | Description |
---|---|---|
GET | /catalog/categories/<category_id> | Get category detail |
Parameters
Response
- Content-Type
- application/json
{
"id": "b308f7fa8a2f4a5eb419970c827f4466",
"updated": "2015-01-28T17:00:19",
"packages": [
{
"fully_qualified_name": "io.murano.apps.ZabbixServer",
"id": "4dfb566e69e6445fbd4aea5099fe95e9",
"name": "Zabbix Server"
}
],
"name": "Web",
"created": "2015-01-28T17:00:19",
"package_count": 1
}
Code | Description |
---|---|
200 | OK. Category deleted successfully |
401 | User is not authorized to access this session |
404 | Not found. Specified category doesn`t exist |
/catalog/categories [POST]
Add new category to the Application Catalog
Parameters
Attribute | Type | Description |
---|---|---|
name | string | Environment name; only alphanumeric characters and ‘-‘ |
Request
Method | URI | Description |
---|---|---|
POST | /catalog/categories | Create new category |
- Content-Type
- application/json
- Example
- {“name”: “category_name”}
Response
{
"id": "ce373a477f211e187a55404a662f968",
"name": "category_name",
"created": "2013-11-30T03:23:42Z",
"updated": "2013-11-30T03:23:44Z",
"package_count": 0
}
Code | Description |
---|---|
200 | OK. Category created successfully |
401 | User is not authorized to access this session |
409 | Conflict. Category with specified name already exist |
/catalog/categories [DELETE]
Request
Method | URI | Description |
---|---|---|
DELETE | /catalog/categories/<category_id> | Delete category with specified id |
Parameters:
Response
Code | Description |
---|---|
200 | OK. Category deleted successfully |
401 | User is not authorized to access this session |
404 | Not found. Specified category doesn`t exist |
403 | Forbidden. Category with specified name is assigned to the package, presented in the catalog |
Manage environment template definitions in murano. It is possible to create, update, delete, and deploy into OpenStack by translating it into an environment. In addition, applications can be added to or deleted from the environment template.
Environment Template Properties
Attribute | Type | Description |
---|---|---|
id | string | Unique ID |
name | string | User-friendly name |
created | datetime | Creation date and time in ISO format |
updated | datetime | Modification date and time in ISO format |
tenant_id | string | OpenStack project |
version | int | Current version |
networking | string | Network settings |
description | string | The environment template specification |
Common response codes
Code | Description |
---|---|
200 | Operation completed successfully |
401 | User is not authorized to perform the operation |
Methods for Environment Template API
Request
Method | URI | Description |
---|---|---|
GET | /templates | Get a list of existing environment templates |
Parameters:
Response
This call returns a list of environment templates. Only the basic properties are returned.
{
"templates": [
{
"updated": "2014-05-14T13:02:54",
"networking": {},
"name": "test1",
"created": "2014-05-14T13:02:46",
"tenant_id": "726ed856965f43cc8e565bc991fa76c3",
"version": 0,
"is_public": false,
"id": "2fa5ab704749444bbeafe7991b412c33"
},
{
"updated": "2014-05-14T13:02:55",
"networking": {},
"name": "test2",
"created": "2014-05-14T13:02:51",
"tenant_id": "123452452345346345634563456345346",
"version": 0,
"is_public": true,
"id": "744e44812da84e858946f5d817de4f72"
}
]
}
Attribute | Type | Description |
---|---|---|
name | string and ‘-‘ | Environment template name; only alphanumeric characters |
Request
Method | URI | Description |
---|---|---|
POST | /templates | Create a new environment template |
Response
{
"id": "ce373a477f211e187a55404a662f968",
"name": "env_temp_name",
"created": "2013-11-30T03:23:42Z",
"updated": "2013-11-30T03:23:44Z",
"tenant_id": "0849006f7ce94961b3aab4e46d6f229a",
}
Code | Description |
---|---|
200 | Operation completed successfully |
401 | User is not authorized to perform the operation |
409 | The environment template already exists |
Request
Return information about environment template itself and about applications, including to this environment template.
Method | URI | Description |
---|---|---|
GET | /templates/{env-temp-id} | Obtains the environment template information |
Response
{
"updated": "2015-01-26T09:12:51",
"networking":
{
},
"name": "template_name",
"created": "2015-01-26T09:12:51",
"tenant_id": "00000000000000000000000000000001",
"version": 0,
"id": "aa9033ca7ce245fca10e38e1c8c4bbf7",
}
Code | Description |
---|---|
200 | OK. Environment Template created successfully |
401 | User is not authorized to access this session |
404 | The environment template does not exist |
Request
Method | URI | Description |
---|---|---|
DELETE | /templates/<env-temp-id> | Delete the template id |
Parameters:
Response
Code | Description |
---|---|
200 | OK. Environment Template deleted successfully |
401 | User is not authorized to access this session |
404 | The environment template does not exist |
Request
Method | URI | Description |
---|---|---|
POST | /templates/{env-temp-id}/services | Create a new application |
Parameters:
Example
{
"instance": {
"assignFloatingIp": "true",
"keyname": "mykeyname",
"image": "cloud-fedora-v3",
"flavor": "m1.medium",
"?": {
"type": "io.murano.resources.LinuxMuranoInstance",
"id": "ef984a74-29a4-45c0-b1dc-2ab9f075732e"
}
},
"name": "orion",
"port": "8080",
"?": {
"type": "io.murano.apps.apache.Tomcat",
"id": "54cea43d-5970-4c73-b9ac-fea656f3c722"
}
}
Response
{
"instance":
{
"assignFloatingIp": "true",
"keyname": "mykeyname",
"image": "cloud-fedora-v3",
"flavor": "m1.medium",
"?":
{
"type": "io.murano.resources.LinuxMuranoInstance",
"id": "ef984a74-29a4-45c0-b1dc-2ab9f075732e"
}
},
"name": "orion",
"?":
{
"type": "io.murano.apps.apache.Tomcat",
"id": "54cea43d-5970-4c73-b9ac-fea656f3c722"
},
"port": "8080"
}
Code | Description |
---|---|
200 | OK. Application added successfully |
401 | User is not authorized to access this session |
404 | The environment template does not exist |
Request
Method | URI | Description |
---|---|---|
DELETE | /templates/{env-temp-id}/services/{app-id} | Delete application with Specified id |
Parameters:
Response
Code | Description |
---|---|
200 | OK. Application deleted successfully |
401 | User is not authorized to access this session |
404 | The application does not exist |
Request
Method | URI | Description | ||
---|---|---|---|
GET | /templates/{env-temp-id}/services | It obtains the service description |
Parameters:
Response
[
{
"instance":
{
"assignFloatingIp": "true",
"keyname": "mykeyname",
"image": "cloud-fedora-v3",
"flavor": "m1.medium",
"?":
{
"type": "io.murano.resources.LinuxMuranoInstance",
"id": "ef984a74-29a4-45c0-b1dc-2ab9f075732e"
}
},
"name": "tomcat",
"?":
{
"type": "io.murano.apps.apache.Tomcat",
"id": "54cea43d-5970-4c73-b9ac-fea656f3c722"
},
"port": "8080"
},
{
"instance": "ef984a74-29a4-45c0-b1dc-2ab9f075732e",
"password": "XXX",
"name": "mysql",
"?":
{
"type": "io.murano.apps.database.MySQL",
"id": "54cea43d-5970-4c73-b9ac-fea656f3c722"
}
}
]
Code | Description |
---|---|
200 | OK. Environment Template created successfully |
401 | User is not authorized to access this session |
404 | The environment template does not exist |
Request
Method | URI | Description | ||
---|---|---|---|
POST | /templates/{env-temp-id}/create-environment| Create an environment |
Parameters:
Payload:
Example
{
"name": "environment_name"
}
Response
{
"environment_id": "aa90fadfafca10e38e1c8c4bbf7",
"name": "environment_name",
"created": "2015-01-26T09:12:51",
"tenant_id": "00000000000000000000000000000001",
"version": 0,
"session_id": "adf4dadfaa9033ca7ce245fca10e38e1c8c4bbf7",
}
Code | Description |
---|---|
200 | OK. Environment template created successfully |
401 | User is not authorized to access this session |
404 | The environment template does not exist |
409 | The environment already exists |
POST /templates/{env-temp-id}/clone
Request
Method | URI | Description |
---|---|---|
POST | /templates/{env-temp-id}/clone | It clones a public template from one project to another |
Parameters:
Example Payload
{
'name': 'cloned_env_template_name'
}
Response
{
"updated": "2015-01-26T09:12:51",
"name": "cloned_env_template_name",
"created": "2015-01-26T09:12:51",
"tenant_id": "00000000000000000000000000000001",
"version": 0,
"is_public": False,
"id": "aa9033ca7ce245fca10e38e1c8c4bbf7",
}
Code | Description |
---|---|
200 | OK. Environment Template cloned successfully |
401 | User is not authorized to access this session |
403 | User has no access to these resources |
404 | The environment template does not exist |
409 | Conflict. The environment template name already exists |