nevisAdmin 4 REST API
Version: 8.2411.0.17
Status: DRAFT
Authentication ¶
Resources related to authentication in the API.
Login ¶
LoginPOST/login{?tokenType}
Two token type options are supported: cookie and bearer. If no type is defined, token type ‘cookie’ will be set.
tokenType=cookie
For token type ‘cookie’, the token is returned as a (html-only) cookie with name ‘auth-token’. In addition, a CSRF token is added with name ‘XSRF-TOKEN’. This the csrf protection token has to be sent as an http header with name ‘X-XSRF-TOKEN’ for all POST, PUT, DELETE or PATCH requests (if the header is missing, csrf validation fails).
Example
Host: siven.example.com
X-XSRF-TOKEN: 0b58d70524dbe83099d1ca673aefe1089da4795a81b88678
tokenType=bearer
For token type ‘bearer’, the token is returned in the response payload. This token has to be sent as an HTTP Authorization header to any subsequent request.
Example
Host: siven.example.com
Authorization: Bearer eyJhbGciOgJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsIm5iZi
I6MTUzNzUzMjYxNCwiaXNzIjoibmV2aXNhZG1pbjQiLCJleHAiOaE1Mzc1NzU4MTQgIml
hdCI6MTUdNzUzMjYxNCwianRpIjoiNzllNzZlN2MtNzcwZC00YTUxLWEwZjAtY2Y2ZjQz
OWEzZDhhIiwiZW1haWwiOiJ0ZXN0LW1haWxAdGVzdC50ZXN0In0.lRe-LfvUBQUHcIW4J
6Ce_oqe47fyPJVJaj39flDXXHs
Error Response Codes
401 Unauthorized
- if authentication was not successful, or if the CSRF validation failed.
Example URI
- tokenType
string
(optional) Example: cookieType of the login token: cookie|bearer. By default ‘cookie’.
tokenType=cookie
Headers
Content-Type: application/json
Body
{
"userKey": "admin",
"password": "mySecretPassword"
}
200
Headers
Content-Type: application/json
Set-Cookie: auth-token=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsIm5iZiI6MTU0MDgzMTg3MCwiaXNzIjoibmV2aXNhZG1pbjQiLCJleHAiOjE1NDA4NzUwNzAsImlhdCI6MTU0MDgzMTg3MCwianRpIjoiMTRjOTA0ZTItOGMzOC00YzFlLWE2NDctYWFiMTFkYzJmODA4IiwiZW1haWwiOiJ0ZXN0LW1haWxAdGVzdC50ZXN0In0.7m5fG2I-RQ1knZzfMW24lcca1UcNyXBzu9UbkFsvFAI;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: XSRF-TOKEN=373dd6f8568095ac6c40516a3fe30978aa15592eb8504d99;Path=/
Body
{
"userKey": "admin"
}
tokenType=bearer
Headers
Content-Type: application/json
Body
{
"userKey": "admin",
"password": "mySecretPassword"
}
200
Headers
Content-Type: application/json
Body
{
"userKey": "admin",
"token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsIm5iZiI6MTUzNzI3NDYzNywiaXNzIjoibmV2aXNhXX1pbjQiLCJleHAiOjE1MzczMTc4MzcsImlhdCI6MTUzNzI3NDYzNywianRpIjoiNTBjYjM2smUtNjkwZi00YWIzLWE5NjYtYzhkM2FiNGQ3N2EzIiwiZW1haWwiOiJ0ZXN0LW1haWxAdGVzdC50ZXN0In0.s-eGa1CBz0WwHG2a_-yW0qDuYbt3XqEvA7aU7Ru_Ipo"
}
Logout ¶
LogoutPOST/logout
Logs out the currently logged in user and redirects to the base context path.
Note that for token type ‘bearer’, it is required to provide a valid token in the request HTTP Authorization header, as described on Login.
For token type ‘cookie’, the token is sent automatically by the browser as a cookie.
Example URI
302
Headers
Content-Type: application/json
Location: /nevisadmin
Logout legacy ¶
Logout legacyGET/logout
Logs out the currently logged in user.
Note that for token type ‘bearer’, it is required to provide a valid token in the request HTTP Authorization header, as described on Login.
For token type ‘cookie’, the token is sent automatically by the browser as a cookie.
Example URI
200
Headers
Content-Type: application/json
Get my user information ¶
Get my user informationGET/me
Returns the information about the currently logged user.
Example URI
200
Headers
Content-Type: application/json
Body
{
"userKey": "testUser",
"email": "testUser@test.com",
"familyName": "Mouse2",
"givenName": "Mickey2",
"type": "local"
}
Project ¶
Resources related to projects in the API.
Get list of projects visible to user ¶
Get list of projects visible to userGET/projects{?tenantKey,deployedInventories}
Returns a list of references to project that the user may view:
-
The items returned for each project should allow the FE to show overview links to the projects.
-
If no projects are visible to the user, then projects should be empty and the status code 200 still be used.
Permissions
- No permissions required, but the response list will only contain projects where the user has VIEW_PROJECT permission.
Example URI
- tenantKey
string
(optional) Example: DEFAULTKey of the tenant.
- deployedInventories
boolean
(optional) Example: trueSet to true if you want to see what inventories each project was deployed to. Default: false
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"projectKey": "DEFAULT-SIVEN-MASTER",
"tenantKey": "DEFAULT",
"_userAuthorization": [
"VIEW_PROJECT",
"MODIFY_PROJECT",
"ADMIN_PROJECT"
],
"_deployedInventories": [
{
"inventoryKey": "DEFAULT-INVENTORY-PROD",
"timestamp": "2023-09-27T08:36:46.584264Z"
},
{
"inventoryKey": "DEFAULT-INVENTORY-TEST",
"timestamp": "2023-09-27T09:34:40.584264Z"
}
]
},
{
"projectKey": "DEFAULT-EXPERIMENTAL-MASTER",
"tenantKey": "DEFAULT",
"repository": "ssh://git@your-git-host/default/experimental.git",
"branch": "master",
"commitId": "4fe5e3ceaf702af6eb5220252e677a079c586e4d",
"_userAuthorization": [
"VIEW_PROJECT",
"MODIFY_PROJECT"
]
},
{
"projectKey": "DEFAULT-EXPERIMENTAL-MASTER:4FE5E3C",
"tenantKey": "DEFAULT",
"repository": "ssh://git@your-git-host/default/experimental.git",
"branch": "master",
"commitId": "4fe5e3ceaf702af6eb5220252e677a079c586e4d",
"originProjectKey": "DEFAULT-EXPERIMENTAL-MASTER",
"_userAuthorization": [
"VIEW_PROJECT",
"MODIFY_PROJECT"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"projectKey": {
"type": "string"
},
"tenantKey": {
"type": "string"
},
"repository": {
"type": "string"
},
"branch": {
"type": "string"
},
"commitId": {
"type": "string"
},
"originProjectKey": {
"type": "string"
},
"_userAuthorization": {
"type": "array",
"items": {
"type": "string"
}
},
"_deployedInventories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"inventoryKey": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
}
}
},
"additionalProperties": false,
"required": [
"projectKey",
"tenantKey",
"repository",
"branch",
"_userAuthorization"
]
}
]
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create a new project ¶
Create a new projectPOST/projects
The project key in the request body has to be all-uppercase. If it’s not, it will be transformed into all-uppercase. If a projectTemplateKey is specified in the body, the project’s initial content will be set from the denoted template.
Permissions
- Requires CREATE_PROJECT on the tenant assigned to the project that will be created.
Example URI
Headers
Content-Type: application/json
Body
{
"projectKey": "DEFAULT-TEST-PROJECT",
"tenantKey": "DEFAULT",
"repository": "ssh://git@your-git-host/default/siven.git",
"branch": "master",
"projectTemplateKey": "standard-saml-idp"
}
201
Headers
Content-Type: application/json
Body
{
"projectKey": "DEFAULT-TEST-PROJECT",
"tenantKey": "DEFAULT",
"repository": "ssh://git@your-git-host/default/siven.git",
"branch": "master",
"projectTemplateKey": "standard-saml-idp"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"projectKey": {
"type": "string"
},
"tenantKey": {
"type": "string"
},
"repository": {
"type": "string"
},
"branch": {
"type": "string"
},
"projectTemplateKey": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"projectKey",
"tenantKey",
"repository",
"branch"
]
}
Fetch a project ¶
Fetch a projectGET/projects/{projectKey}
-
If the requested project may not be viewed by the user: return status 403 Forbidden
-
If the requested project does not exist: return status 404 Not Found
Permissions
- Requires VIEW_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-TEST-PROJECTKey of the project.
200
Headers
Content-Type: application/json
Body
{
"projectKey": "DEFAULT-EXPERIMENTAL-MASTER:4FE5E3C",
"tenantKey": "DEFAULT",
"repository": "ssh://git@your-git-host/default/experimental.git",
"branch": "master",
"commitId": "4fe5e3ceaf702af6eb5220252e677a079c586e4d",
"originProjectKey": "DEFAULT-EXPERIMENTAL-MASTER"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"projectKey": {
"type": "string"
},
"tenantKey": {
"type": "string"
},
"repository": {
"type": "string"
},
"branch": {
"type": "string"
},
"commitId": {
"type": "string"
},
"originProjectKey": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"projectKey",
"tenantKey",
"repository",
"branch"
]
}
Add version control information to a project ¶
Add version control information to a projectPATCH/projects/{projectKey}
It updates an existing project adding the information required to have it under version control.
The response will return a 409 Conflict status code and the corresponding error detail in the following cases:
-
If the project already contains version control information.
-
If the defined repository folder is not empty (already contains a project).
-
If the repository could not be reached (e.g invalid SHH key or permission denied).
Permissions
- Requires MODIFY_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-UNVERSIONED-PROJECTKey of the project.
Headers
Content-Type: application/json
Body
{
"repository": "ssh://git@your-git-host/default/siven.git",
"branch": "master",
"path": "myDirectory/projectDefault"
}
200
Headers
Content-Type: application/json
Body
{
"projectKey": "DEFAULT-UNVERSIONED-PROJECT",
"tenantKey": "DEFAULT",
"repository": "ssh://git@your-git-host/default/siven.git",
"branch": "master",
"path": "myDirectory/projectDefault"
}
Delete a project ¶
Delete a projectDELETE/projects/{projectKey}
Permissions
- Requires MODIFY_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-TEST-PROJECTKey of the project.
200
Headers
Content-Type: application/json
Get project issues ¶
Get project issuesGET/projects/{projectKey}/issues
Returns list of issues for corresponding projectKey
-
If the requested project is not yet in the IssueService, it starts a ProjectValidation Job for the project with projectKey
-
JobType is hardcoded to JobType.PROJECT_VALIDATION
Severity level
-
ERROR: Indicates that something went wrong and needs to be fixed.
-
WARNING: Warns about a potential problem that was detected, but the system can continue.
-
INFO: Gives some information, but does not require any action.
Source type
Indicates where the issue happened.
-
PROJECT
-
DEPLOYABLE_PATTERN
-
PATTERN
-
PROPERTY
-
HOST
-
FIELD
-
TENANT
-
VARIABLE
-
JOB
Permissions
- Requires VIEW_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
200
Headers
Content-Type: application/json
Body
{
"timestamp": "2018-06-14T11:54:20.496",
"items": [
{
"code": "PROPERTY_VALIDATION_FAILURE",
"severity": "INFO",
"message": "found customizable label(s): title.login.ldap,info.login.ldap,prompt.userid,prompt.password,error.login.ldap.input,button.continue,title.login.tan,prompt.tan,button.generate.tan,info.logout.success,title,language.en,language.de,language.fr,language.it",
"target": [
{
"sourceType": "PROJECT",
"value": "DEFAULT-SIVEN-MASTER"
},
{
"sourceType": "DEPLOYABLE_PATTERN",
"value": "d3f51b1fcbd3eaf433588645"
},
{
"sourceType": "PATTERN",
"value": "504bd0e7d1891f445bf24199"
},
{
"sourceType": "PROPERTY",
"value": "labels"
},
{
"sourceType": "HOST",
"value": "proxy"
}
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"timestamp": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string"
},
"severity": {
"type": "string"
},
"message": {
"type": "string"
},
"target": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"sourceType": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"sourceType",
"value"
]
}
]
}
}
},
"additionalProperties": false,
"required": [
"code",
"severity",
"message",
"target"
]
}
]
}
}
},
"additionalProperties": false,
"required": [
"timestamp",
"items"
]
}
Get project timestamp ¶
Get project timestampGET/projects/{projectKey}/timestamp
Returns the date and time when the project was last changed.
Permissions
- Requires VIEW_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
200
Headers
Content-Type: application/json
Body
{
"timestamp": "2018-06-14T11:54:20.496"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"timestamp": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"timestamp"
]
}
Get project issues timestamp ¶
Get project issues timestampGET/projects/{projectKey}/issues/timestamp
Returns the date and time when the project validation job most recently produced issues.
Permissions
- Requires VIEW_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
200
-
timestamp: (string) - The date and time when the issues were created.
-
validationInProgress: (boolean) - A flag indicating whether a
PROJECT_VALIDATION
job is currently running for the specifiedprojectKey
.
Headers
Content-Type: application/json
Body
{
"timestamp": "2018-06-14T11:54:17.259",
"validationInProgress": false
}
Schema
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"timestamp":{
"type":"string"
}
"validationInProgress":{
"type":"boolean"
}
},
"additionalProperties": false,
"required": [
"timestamp"
]
}
Update project data from repository ¶
Update project data from repositoryPUT/projects/{projectKey}/revision-update{?sequential,force}
Updates the project sent in the URL with the changes stored in the remote repository.
If the call was successful the response code will be ‘202 Accepted’ and the ‘Location’ header will point to the job that will execute the update. Getting that job will allow you to know the progress and status of the update.
Permissions
- Requires MODIFY_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- sequential
boolean
(optional) Example: trueIf true: processes remote commits one-by-one. If set to false then updates directly to the head. (default=false).
- force
boolean
(optional) Example: truedefines what happens if the git history is tampered. False: error, True: reimport the project (default=false).
202
Headers
Content-Type: application/json
Location: /jobs/ac9e5a33347d33220bb9d03b
Import project from repository ¶
Import project from repositoryPOST/projects/revision-import
The project key in the request body has to be all-uppercase. If it’s not, it will be transformed into all-uppercase.
Imports the project sent in the request with the changes stored in the remote repository.
If the call was successful the response code will be ‘202 Accepted’ and the ‘Location’ header will point to the job that will execute the import. Getting that job will allow you to know the progress and status of the import.
Permissions
- Requires CREATE_PROJECT on the tenant assigned to the project that will be imported.
Example URI
Headers
Content-Type: application/json
Body
{
"projectKey": "DEV-TEST-NEWPROJECT",
"tenantKey": "DEV",
"repository": "git://repo/url",
"branch": "master",
"path": "nevis/config"
}
202
Headers
Content-Type: application/json
Location: /jobs/ac9e5a33347d33220bb9d03b
Import project revision from repository ¶
Import project revision from repositoryPOST/projects/{projectKey}/revision-import/{commitId}
Imports a specific revision of the project stored in the remote repository.
Request body is empty, but to be able to import a specific revision, the original project (set on the URL) must already exist.
The imported project will have the same key as the original project with a suffix based on the imported commitId (e.g. DEFAULT-SIVEN-MASTER:B1F6635).
The imported project will be read-only.
If the call was successful the response code will be ‘202 Accepted’ and the ‘Location’ header will point to the job that will execute the import. Getting that job will allow you to know the progress and status of the import.
Permissions
- Requires VIEW_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- commitId
string
(required) Example: 4fe5e3ceaf702af6eb5220252e677a079c586e4dCommit id of the revision.
Headers
Content-Type: application/json
Body
{}
202
Headers
Content-Type: application/json
Location: /jobs/ac9e5a33347d33220bb9d03b
Get plugin bundles available to project ¶
Get plugin bundles available to projectGET/projects/{projectKey}/bundles{?meta}
Permissions
- Requires VIEW_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- meta
boolean
(optional) Example: trueDetermines if the response will return the metadata or not. This returns the local modification status and commit ID of the bundles. It is ‘false’ as default.
200
Headers
Content-Type: application/json
Body
{
"items": [
"nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisidm:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisauth:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisproxy:4.0.0-SNAPSHOT"
],
"_meta": {
"localStatus": "MODIFIED",
"localAuthor": "admin",
"localDate": "2018-10-28T09:52:23.368Z",
"headValue": [
"nevisadmin-plugin-nevisproxy:4.0.0-SNAPSHOT",
"nevisadmin-plugin-monitoring:4.0.0-SNAPSHOT",
"nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisidm:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisauth:4.0.0-SNAPSHOT"
],
"commitId": "f16f89a751384fc873e15bc15797d3b146d9280c",
"remoteDate": "2018-10-26T10:13:12Z"
}
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"_meta": {
"type": "object",
"properties": {
"localStatus": {
"type": "string"
},
"localAuthor": {
"type": "string"
},
"localDate": {
"type": "string"
},
"headValue": {
"type": "array",
"items": {
"type": "string"
}
},
"commitId": {
"type": "string"
},
"remoteDate": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"localStatus",
"localAuthor",
"localDate"
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create plugin bundles list available to project ¶
Create plugin bundles list available to projectPOST/projects/{projectKey}/bundles
Permissions
- Requires MODIFY_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
Headers
Content-Type: application/json
Body
{
"items": [
"nevisadmin-plugin-mybundle:1.0.1"
]
}
201
Headers
Content-Type: application/json
Body
{
"items": [
"nevisadmin-plugin-mybundle:1.0.1"
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Update plugin bundles list available to project ¶
Update plugin bundles list available to projectPUT/projects/{projectKey}/bundles{?migrate}
Permissions
- Requires MODIFY_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- migrate
boolean
(optional) Example: trueIf true, runs the automatic project migration when the
nevisadmin-plugin-base-generation
version is upgraded. (default=false)
Headers
Content-Type: application/json
Body
{
"items": [
"nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisproxy:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisauth:4.0.0-SNAPSHOT"
]
}
200
Headers
Content-Type: application/json
Body
{
"items": [
"nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisproxy:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisauth:4.0.0-SNAPSHOT"
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Get resource from plugin bundles of project ¶
Get resource from plugin bundles of projectGET/projects/{projectKey}/resources/{resourcePath}
Permissions
- Requires VIEW_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Fetch a file from the plugin bundles (i.e. from the classpath) of a project. The file’s content will be returned, while the Content-Type of the response is assigned to match the file extension, if it is recognized.
Note that only files marked for publishing can be accessed like this, i.e. only files residing a directory
_publish
. So a requested file ch/siven/nevisadmin/plugins/script.js
will be loaded from path
ch/siven/nevisadmin/plugins/_publish/script.js
.
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- resourcePath
string
(required) Example: ch/siven/nevisadmin/plugins/script.jsPath of the resource in one of the plugin bundles.
200
Headers
Content-Type: application/javascript
Content-Disposition: attachment; filename=script.js
Content-Length: 34235
Body
"CONTENT OF THE FILE"
Get list of plugins available to project ¶
Get list of plugins available to projectGET/projects/{projectKey}/bundles/{bundleKey}/plugins
Permissions
- Requires VIEW_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- bundleKey
string
(required) Example: nevisadmin-plugin-base-generation:4.0.0-SNAPSHOTKey of the plugin bundle.
200
Headers
Content-Type: application/json
Body
{
"bundleKey": "nevisadmin-plugin-nevisproxy:4.0.0-SNAPSHOT",
"name": "nevisAdmin Plug-Ins for nevisProxy",
"symbolicName": "nevisadmin-plugin-nevisproxy",
"version": "4.0.0-SNAPSHOT",
"plugins": [
{
"className": "ch.nevis.admin.v4.plugin.nevisproxy.generator.NevisProxyGenerator",
"name": "Nevis Proxy Generator"
},
{
"className": "ch.nevis.admin.v4.plugin.nevisproxy.patterns.AccessRestriction",
"name": "Access Restriction",
"category": [
"Application Protection",
"Add-ons"
]
},
{
"className": "ch.nevis.admin.v4.plugin.nevisproxy.patterns.CSRFProtectionSettings",
"name": "CSRF Protection Settings",
"category": [
"Application Protection",
"Add-ons",
"Experimental"
]
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"bundleKey": {
"type": "string"
},
"name": {
"type": "string"
},
"symbolicName": {
"type": "string"
},
"version": {
"type": "string"
},
"plugins": {
"type": "array",
"items": {
"type": "object",
"properties": {
"className": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"className",
"name"
]
}
}
},
"additionalProperties": false,
"required": [
"bundleKey",
"name",
"symbolicName",
"version",
"plugins"
]
}
Get plugin classes within a project ¶
Get plugin classes within a projectGET/projects/{projectKey}/plugins{?filterClass}
Permissions
- Requires VIEW_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- filterClass
string
(optional) Example: ch.nevis.admin.v4.plugin.base.generation.property.CheckboxPropertyComplete name of the class.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"className": "ch.nevis.admin.v4.plugin.base.generation.property.SelectionProperty",
"name": "Selection Property",
"description": "Select some or all items from a set of options"
},
{
"className": "ch.nevis.admin.v4.plugin.nevisproxy.patterns.TLSSettings",
"name": "Custom TLS Settings",
"description": "\nThis addon can be used to customize TLS/SSL settings for nevisProxy.\n\nYou can assign it to `nevisProxy Advanced Host` or `nevisProxy Instance` to customize settings for incoming connections.\nBackend connections can be customized by assigning this pattern to your service (`Web Application`, `REST Service`, `SOAP service`) \n",
"category": [
"Application Protection",
"Add-ons"
]
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"className": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"className",
"name"
]
}
}
}
}
Export project to Zip file ¶
Export project to Zip fileGET/projects/{projectKey}/file-export
It will export a .zip file with the current data of the specified project. The .zip file can contain the following:
-
export.yml: It contains the version used and the timestamp of the export.
-
variables.yml: It contains all the variables and their data.
-
bundles.yml: It contains the list of bundles assigned to the exported project
-
patterns: A folder containing all the patterns (.yml files) of the exported project.
-
bundles: A folder containing the bundle .jars used by the exported project.
Permissions
- Requires VIEW_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
200
Headers
Content-Type: application/zip
Content-Disposition: attachment; filename="project_SIVEN-MASTER_20190131T144749.zip"
Content-Length: 2100817
Import project from Zip file ¶
Import project from Zip filePOST/projects/file-import{?projectKey}
Creates a new project or overwrites an existing one, with the project data imported on a .zip file.
-
If the project set in the URL already exists, that project will be overwritten with the content of the file sent.
-
If the project set in the URL does not exist, a new project will be created with the content of the file sent.
-
If the tenant key set for the project does not exist, an error will be sent, code “400 Bad request”, with the details of the error.
If the call was successful the response code will be ‘202 Accepted’ and the ‘Location’ header will point to the job that will execute the import. Getting that job will allow you to know the progress and status of the import.
Permissions
-
To import as a new project: requires CREATE_PROJECT on the tenant assigned to the project that will be created.
-
To import on existing project: requires MODIFY_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
-
To import the bundles within the .zip file: requires SUPER_ADMIN permission assigned globally (target=’/’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project. Has to be all-uppercase. If it’s not, it will be transformed into all-uppercase.
Headers
Content-Type: multipart/form-data; boundary=CUSTOM-BOUNDARY
Content-Length: 1856492
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="project"; filename="project_SIVEN-MASTER_20190131T144749.zip"
Content-Type: application/x-zip-compressed
Content of project_SIVEN-MASTER_20190131T144749.zip
--CUSTOM-BOUNDARY--
202
Headers
Content-Type: application/json
Location: /jobs/030ea3ab67924778165b8d8b
Create a new branch form a project ¶
Create a new branch form a projectPOST/projects/branch-import
Creates a new branch in the version control repository and checks out the project in the new branch into nevisAdmin 4.
Error cases
-
The repository, branchFrom and path sent in the request body does not exist or has no project.
-
The new project key sent in the request body already exists.
-
The new branch sent in the request body already exists.
Permissions
- Requires CREATE_PROJECT on the tenant assigned to the project that will be created.
Example URI
Headers
Content-Type: application/json
Body
{
"projectKey": "DEFAULT-SIVEN-MASTER-NEWBRANCH",
"tenantKey": "DEFAULT",
"repository": "ssh://git@your-git-host/default/siven.git",
"branch": "newbranch",
"branchFrom": "master",
"path": "here/some"
}
202
Headers
Content-Type: application/json
Location: /jobs/ac9e5a33347d33220bb9d03b
Generate a recommendation ¶
Generate a recommendationPOST/projects/{projectKey}/patterns/{patternId}/properties/{propertyKey}/recommender
Generates a recommendation for a field based on the passed in input and the field’s current value with the class passed in in the body.
Permissions
- Requires VIEW_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645ID of the pattern instance.
- propertyKey
string
(required) Example: templateThe recommendation will be for this property
Headers
Content-Type: application/json
Body
{
"className": "ch.nevis.admin.v4.plugin.nevisproxy.recommenders.sampleRecommender",
"input": {
"key1": "value1",
"key2": "value2",
"mapKey": {
"nestedKey": "nestedValue",
"sequence": [
"item1",
"item2"
]
}
}
}
200
Headers
Content-Type: application/json
Vary: "Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"
Body
{
"output": {
"responseKeyA": "responseValueA",
"responseMapKey": {
"responseSequence": [
"responseItemA",
"responseItemB"
],
"responseNestedKey": "responseNestedValue"
},
"responseKeyB": "responseValueB"
}
}
Generate project graphs ¶
Generate project graphsGET/projects/{projectKey}/graphs{?patternId}
Returns the project graphs for each view in the project.
Permissions
- Requires VIEW_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- patternId
string
(optional) Example: b5b2e40a81a0d76d0a89a34bstart the graph from this pattern.
200
Headers
Content-Type: application/json
Vary: "Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"
Body
{
"items": [
{
"view": "Authentication Flow",
"nodes": [
{
"id": "6f8f8bc75e630bd4d92b4378",
"label": "AdNovum LDAP Login"
},
{
"id": "b5b2e40a81a0d76d0a89a34b",
"label": "SSO Realm"
},
{
"id": "efae72635c59686cfadd9ec2",
"label": "SAML Token"
}
],
"links": [
{
"id": "authenticate--b5b2e40a81a0d76d0a89a34b--6f8f8bc75e630bd4d92b4378",
"source": "b5b2e40a81a0d76d0a89a34b",
"target": "6f8f8bc75e630bd4d92b4378",
"label": "Initial Authentication Flow"
},
{
"id": "tokens--b5b2e40a81a0d76d0a89a34b--efae72635c59686cfadd9ec2",
"source": "b5b2e40a81a0d76d0a89a34b",
"target": "efae72635c59686cfadd9ec2",
"label": "Application Access Tokens"
}
]
}
]
}
Generate project graph ¶
Generate project graphGET/projects/{projectKey}/graphs/{view}{?patternId}
Returns the project graph for the specified view in the project.
Permissions
- Requires VIEW_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- view
string
(required) Example: Authentication%20flowName of the view.
- patternId
string
(optional) Example: b5b2e40a81a0d76d0a89a34bstart the graph from this pattern.
200
Headers
Content-Type: application/json
Vary: "Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"
Body
{
"view": "Authentication Flow",
"nodes": [
{
"id": "6f8f8bc75e630bd4d92b4378",
"label": "AdNovum LDAP Login"
},
{
"id": "b5b2e40a81a0d76d0a89a34b",
"label": "SSO Realm"
},
{
"id": "efae72635c59686cfadd9ec2",
"label": "SAML Token"
}
],
"links": [
{
"id": "authenticate--b5b2e40a81a0d76d0a89a34b--6f8f8bc75e630bd4d92b4378",
"source": "b5b2e40a81a0d76d0a89a34b",
"target": "6f8f8bc75e630bd4d92b4378",
"label": "Initial Authentication Flow"
},
{
"id": "tokens--b5b2e40a81a0d76d0a89a34b--efae72635c59686cfadd9ec2",
"source": "b5b2e40a81a0d76d0a89a34b",
"target": "efae72635c59686cfadd9ec2",
"label": "Application Access Tokens"
}
]
}
Validate project ¶
Validate projectPOST/projects/{projectKey}/validate{?initialDelay}
Trigger the project validation job.
If the call was successful the response code will be ‘202 Accepted’ and the ‘Location’ header will point to the job that will execute the validation. Getting that job will allow you to know the progress and status of the validation.
Permissions
- Requires MODIFY_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- initialDelay
number
(optional) Example: 0Initial delay in seconds.
202
Headers
Content-Type: application/json
Location: /jobs/ac9e5a33347d33220bb9d03b
Get project description ¶
Get project descriptionGET/projects/{projectKey}/description{?meta}
Returns the project description.
Permissions
- Requires VIEW_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- meta
boolean
(optional) Example: trueDetermines if the response will return the metadata or not. This returns the local modification status and commit ID of the description. It is ‘false’ as default.
200
Headers
Content-Type: application/json
Vary: "Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"
Body
{
"description": "Sandbox project for experimenting"
"_meta": {
"localStatus": "MODIFIED",
"localAuthor": "admin",
"localDate": "2022-03-23T15:24:42.091677Z",
"headValue": "lorem ipsum",
"commitId": "53aaa574a7a2d3a1196f7e6cb177fb42deb6b81a",
"remoteDate": "2022-03-23T15:23:44Z"
}
Update project description ¶
Update project descriptionPUT/projects/description
Update, create or delete the project description.
Permissions
- Requires MODIFY_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
Headers
Content-Type: application/json
Body
{
"description": "Sandbox project for experimenting"
}
200
Headers
Content-Type: application/json
Location: /jobs/ac9e5a33347d33220bb9d03b
Project Template ¶
List project templates ¶
List project templatesGET/project-templates
Get the list of available project templates.
Permissions
- Requires no permissions
Example URI
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"projectTemplateKey": "standard-basic-idm",
"title": "Reverse Proxy with Authentication",
"categories": [
"Application Protection",
"Authentication",
"Identity Management"
],
"summary": "A reverse proxy with username / password authentication.",
"description": "# Basic Nevis Setup with Username / Password Authentication\n\nA basic setup of Nevis consisting of nevisProxy, nevisAuth, and nevisIDM.\n\nThis project exposes 2 applications on nevisProxy to get you started.\n\nThe application called `Example App` is public can be accessed by anyone.\n\nThe `nevisIDM Admin GUI` requires authentication with username and password.\n",
"type": "STANDARD"
},
{
"projectTemplateKey": "standard-saml-idp",
"title": "SAML 2.0 Identity Provider",
"categories": [
"Federation",
"SAML",
"Authentication"
],
"summary": "SAML 2.0 Identity Provider with username / password authentication.",
"description": "# SAML 2.0 Identity Provider\n\nA basic SAML 2.0 Identity Provider.\nAuthentication uses username and password.\n\nIn order to integrate a relying party application, \nyou have to add a `SAML SP Connector` pattern to the project.\n",
"type": "STANDARD"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"projectTemplateKey": {
"type": "string"
},
"title": {
"type": "string"
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
}
Download icon ¶
Download iconGET/project-templates/icon
Download the icon for a specific project template
Permissions
- Requires no permissions
Example URI
200
Headers
Content-Type: image/png
Content-Disposition: attachment; filename="icon"
Content-Length: 9718
Pattern Instance ¶
Resources related to pattern instances in the API.
Get list of pattern instances in a project ¶
Get list of pattern instances in a projectGET/projects/{projectKey}/patterns{?filterClass,meta}
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- filterClass
string
(optional) Example: ch.nevis.admin.v4.plugin.nevisproxy.patterns.WebApplicationAccessName of the concrete class of the pattern.
- meta
boolean
(optional) Example: trueDetermines if the response will return metadata or not. It is ‘false’ as default.
200
Headers
Content-Type: application/json
Body
{
"items":[
{
"patternId":"bd73c0740ae895fc8ae722f9",
"className":"ch.nevis.admin.v4.plugin.nevisproxy.patterns.WebApplicationAccess",
"bundleKey":"nevisadmin-plugin-nevisproxy:1.0.2-20181024T060143Z",
"name":"My Web App",
"properties" : [ {
"propertyKey" : "host",
"value" : [ "pattern://187f664c3ce255eb96559ba4" ]
}, {
"propertyKey" : "path",
"value" : "/nevis/"
}, {
"propertyKey" : "backends",
"value" : "www.nevis.net"
} ]
},
{
"patternId":"840882c2d6b71628e43def68",
"className":"ch.nevis.admin.v4.plugin.nevisproxy.patterns.TLSSettings",
"bundleKey":"nevisadmin-plugin-nevisproxy:1.0.2-20181024T060143Z",
"name":"My TLS Settings",
"label":"my-group",
"notes":"<pattern notes>"
"link":{
"sourceProjectKey":"DEFAULT-TEST-MASTER",
"sourcePatternId":"953cac6990c037bbd8a6968b",
"author":"admin",
"lastCopied":"2020-08-05T12:10:50Z"
},
"properties" : [ {
"propertyKey" : "protocols",
"value" : "All"
} ]
},
{
"patternId":"d3f51b1fcbd3eaf433588645",
"className":"ch.nevis.admin.v4.plugin.nevisproxy.patterns.NevisProxyDeployable",
"bundleKey":"nevisadmin-plugin-nevisproxy:1.0.2-20181024T060143Z",
"name":"My Proxy",
"deploymentHosts":"proxy",
"properties" : [ ]
}
]
}
Schema
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"items":{
"type":"array",
"items":{
"oneOf":[
{
"type":"object",
"properties":{
"patternId":{
"type":"string"
},
"name":{
"type":"string"
},
"className":{
"type":"string"
},
"bundleKey":{
"type":"string"
},
"deploymentHosts":{
"type":"string"
},
"label":{
"type":"string"
},
"notes":{
"type":"string"
},
"link":{
"type":"object",
"properties":{
"sourceProjectKey":{
"type":"string"
},
"sourcePatternId":{
"type":"string"
},
"author":{
"type":"string"
},
"lastCopied":{
"type":"string"
}
}
},
"properties":{
"type":"array",
"items":{
"oneOf":[
{
"type":"object",
"properties":{
"propertyKey":{
"type":"string"
},
"value":{
"type":"object"
}
}
}
]
}
}
}
}
]
}
}
}
}
Get pattern instance ¶
Get pattern instanceGET/projects/{projectKey}/patterns/{patternId}{?meta}
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645ID of the pattern instance.
- meta
boolean
(optional) Example: trueDetermines if the response will return metadata or not. It is ‘false’ as default.
200
Headers
Content-Type: application/json
Body
{
"patternId": "00000011",
"name": "My NevisReports Server",
"className": "ch.nevis.admin.v4.pattern.nevisreports.NevisReportsPattern",
"bundleKey": "aBundleName:0.1",
"deploymentHosts": "<host-filter-expression>",
"label": "<label>",
"notes": "<pattern notes>",
"link": {
"sourceProjectKey": "DEFAULT-TEST-MASTER",
"sourcePatternId": "953cac6990c037bbd8a6968b",
"author": "admin",
"lastCopied": "2020-08-05T12:10:50Z"
},
"properties": [
{
"propertyKey": "monitoredInstances",
"value": [
"pattern://239780937839",
"pattern://234234234"
]
},
{
"propertyKey": "dataRetentionPeriod",
"value": {
"bla": "x",
"more": [
"abc",
"def"
]
}
},
{
"propertyKey": "dataChunkSize",
"value": "month"
},
{
"propertyKey": "dataWhatever",
"value": "var://my-first-var"
},
{
"propertyKey": "template",
"value": "res://00000011#template"
}
],
"_meta": {
"name": {
"localStatus": "modified",
"localAuthor": "<user-id>",
"localDate": "2018-01-11T11:25:43.511Z",
"headValue": "<previous name>",
"commitId": "<commit-id>",
"remoteDate": "2018-01-09T18:01:33"
},
"className": {
"localStatus": "unmodified",
"headValue": "<previous class>",
"commitId": "<commit-id>",
"remoteDate": "2018-01-09T18:01:33"
},
"deploymentHosts": {
"localStatus": "modified",
"localAuthor": "<user-id>",
"localDate": "2018-01-11T11:25:43.511Z",
"headValue": "<previous value>",
"commitId": "<commit-id>",
"remoteDate": "2018-01-09T18:01:33"
},
"label": {
"localStatus": "modified",
"localAuthor": "<user-id>",
"localDate": "2018-01-11T11:25:43.511Z",
"headValue": "<previous value>",
"commitId": "<commit-id>",
"remoteDate": "2018-01-09T18:01:33"
},
"notes": {
"localStatus": "modified",
"localAuthor": "<user-id>",
"localDate": "2018-01-11T11:25:43.511Z",
"headValue": "<previous value>",
"commitId": "<commit-id>",
"remoteDate": "2018-01-09T18:01:33"
},
"link": {
"localStatus": "MODIFIED",
"localAuthor": "admin",
"localDate": "2020-08-05T12:58:47.786Z",
"headValue": {
"sourceProjectKey": "DEFAULT-TEST-MASTER",
"sourcePatternId": "283e15617bb2517edb528d5d",
"author": "admin",
"lastCopied": "2020-08-05T12:53:01Z"
},
"commitId": "fc922320d7a3a4410bf4611d244b3bd7a0f77016",
"remoteDate": "2020-08-05T12:55:56Z"
},
"properties": [
{
"propertyKey": "<property-key>",
"localStatus": "modified",
"localAuthor": "<user-id>",
"localDate": "2018-01-11T11:25:43.511Z",
"headValue": "<previous value>",
"commitId": "commit-id",
"remoteDate": "2018-01-09T18:01:33"
},
{
"propertyKey": "<property-key>",
"localStatus": "unmodified",
"headValue": "<previous value>",
"commitId": "commit-id",
"remoteDate": "2018-01-09T18:01:33"
},
{
"propertyKey": "<property-key>",
"localStatus": "deleted",
"localAuthor": "<user-id>",
"localDate": "2018-01-11T11:25:43.511Z",
"headValue": "<previous value>",
"commitId": "commit-id",
"remoteDate": "2018-01-09T18:01:33"
},
{
"propertyKey": "<property-key>",
"localStatus": "added",
"localAuthor": "<user-id>",
"localDate": "2018-01-11T11:25:43.511Z",
"remoteDate": "2018-01-09T18:01:33"
},
{
"propertyKey": "template",
"localStatus": "added",
"localAuthor": "<user-id>",
"localDate": "2018-01-11T11:25:43.511Z",
"remoteDate": "2018-01-09T18:01:33"
}
]
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"patternId": {
"type": "string"
},
"name": {
"type": "string"
},
"className": {
"type": "string"
},
"bundleKey": {
"type": "string"
},
"deploymentHosts": {
"type": "string"
},
"label": {
"type": "string"
},
"notes": {
"type": "string"
},
"link": {
"type": "object",
"properties": {
"sourceProjectKey": {
"type": "string"
},
"sourcePatternId": {
"type": "string"
},
"author": {
"type": "string"
},
"lastCopied": {
"type": "string"
}
}
},
"properties": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"propertyKey": {
"type": "string"
},
"value": {
"type": "object"
}
}
}
]
}
},
"_meta": {
"type": "object",
"properties": {
"name": {
"type": "object",
"properties": {
"localStatus": {
"type": "string"
},
"localAuthor": {
"type": "string"
},
"localDate": {
"type": "string"
},
"headValue": {
"type": "string"
},
"commitId": {
"type": "string"
}
}
},
"className": {
"type": "object",
"properties": {
"type": "object",
"properties": {
"localStatus": {
"type": "string"
},
"headValue": {
"type": "string"
},
"commitId": {
"type": "string"
}
}
}
},
"deploymentHosts": {
"type": "object",
"properties": {
"localStatus": {
"type": "string"
},
"localAuthor": {
"type": "string"
},
"localDate": {
"type": "string"
},
"headValue": {
"type": "string"
},
"commitId": {
"type": "string"
}
}
},
"label": {
"type": "object",
"properties": {
"localStatus": {
"type": "string"
},
"localAuthor": {
"type": "string"
},
"localDate": {
"type": "string"
},
"headValue": {
"type": "string"
},
"commitId": {
"type": "string"
}
}
},
"notes": {
"type": "object",
"properties": {
"localStatus": {
"type": "string"
},
"localAuthor": {
"type": "string"
},
"localDate": {
"type": "string"
},
"headValue": {
"type": "string"
},
"commitId": {
"type": "string"
}
}
},
"link": {
"type": "object",
"properties": {
"localStatus": {
"type": "string"
},
"localAuthor": {
"type": "string"
},
"localDate": {
"type": "string"
},
"headValue": {
"type": "string"
},
"commitId": {
"type": "string"
}
}
},
"properties": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"propertyKey": {
"type": "string"
},
"localStatus": {
"type": "string"
},
"localAuthor": {
"type": "string"
},
"localDate": {
"type": "string"
},
"headValue": {
"type": "string"
},
"commitId": {
"type": "string"
}
},
"required": [
"propertyKey",
"localStatus"
]
}
]
}
}
}
}
}
}
Update an existing pattern instance ¶
Update an existing pattern instancePUT/projects/{projectKey}/patterns/{patternId}
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645Id of the pattern instance.
Headers
Content-Type: application/json
Body
{
"name": "My NevisReports Server",
"className": "ch.nevis.admin.v4.pattern.nevisreports.NevisReportsPattern",
"bundleKey": "aBundleName:0.1",
"deploymentHosts": "<host-filter-expression>",
"label": "<label>",
"notes": "<pattern notes>",
"link": {
"sourceProjectKey": "DEFAULT-TEST-MASTER",
"sourcePatternId": "953cac6990c037bbd8a6968b",
"author": "admin",
"lastCopied": "2020-08-05T12:10:50Z"
},
"properties": [
{
"propertyKey": "monitoredInstances",
"value": [
"pattern://239780937839"
]
},
{
"propertyKey": "dataRetentionPeriod",
"value": {
"bla": "x",
"more": [
"abc"
]
}
},
{
"propertyKey": "dataChunkSize",
"value": "month"
},
{
"propertyKey": "dataWhatever",
"value": "var://my-first-var"
},
{
"propertyKey": "template",
"value": "res://00000011#template"
}
]
}
200
Headers
Content-Type: application/json
Body
{
"patternId": "00000011",
"name": "My NevisReports Server",
"className": "ch.nevis.admin.v4.pattern.nevisreports.NevisReportsPattern",
"bundleKey": "aBundleName:0.1",
"deploymentHosts": "<host-filter-expression>",
"label": "<label>",
"notes": "<pattern notes>",
"link": {
"sourceProjectKey": "DEFAULT-TEST-MASTER",
"sourcePatternId": "953cac6990c037bbd8a6968b",
"author": "admin",
"lastCopied": "2020-08-05T12:10:50Z"
},
"properties": [
{
"propertyKey": "monitoredInstances",
"value": [
"pattern://239780937839"
]
},
{
"propertyKey": "dataRetentionPeriod",
"value": {
"bla": "x",
"more": [
"abc"
]
}
},
{
"propertyKey": "dataChunkSize",
"value": "month"
},
{
"propertyKey": "dataWhatever",
"value": "var://my-first-var"
},
{
"propertyKey": "template",
"value": "res://00000011#template"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"patternId": {
"type": "string"
},
"name": {
"type": "string"
},
"className": {
" type": "string"
},
"bundleKey": {
"type": "string"
},
"deploymentHosts": {
"type": "string"
},
"label": {
"type": "string"
},
"notes": {
"type": "string"
},
"link": {
"type": "object",
"properties": {
"sourceProjectKey": {
"type": "string"
},
"sourcePatternId": {
"type": "string"
},
"author": {
"type": "string"
},
"lastCopied": {
"type": "string"
}
}
},
"properties": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"propertyKey": {
"type": "string"
},
"value": {
"type": "object"
}
},
"required": [
"propertyKey"
]
}
]
}
}
}
}
Update list of pattern instances ¶
Update list of pattern instancesPUT/projects/{projectKey}/patterns
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
Headers
Content-Type: application/json
Body
{
"items": [
{
"patternId": "f19f46423e5435daa8529e",
"className": "ch.nevis.admin.v4.plugin.nevisproxy.patterns.HostContext",
"bundleKey": "nevisadmin-plugin-nevisproxy:4.8.0.11",
"name": "New Virtual Host",
"properties": [
{
"propertyKey": "addresses",
"value": "var://new-virtual-host-frontend-addresses"
}
]
},
{
"name": "My NevisReports Server",
"className": "ch.nevis.admin.v4.pattern.nevisreports.NevisReportsPattern",
"bundleKey": "aBundleName:0.1",
"deploymentHosts": "<host-filter-expression>",
"label": "<label>",
"notes": "<pattern notes>",
"link": {
"sourceProjectKey": "DEFAULT-TEST-MASTER",
"sourcePatternId": "953cac6990c037bbd8a6968b",
"author": "admin",
"lastCopied": "2020-08-05T12:10:50Z"
},
"properties": [
{
"propertyKey": "monitoredInstances",
"value": [
"pattern://239780937839"
]
}
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"patternId": {
"type": "string"
},
"name": {
"type": "string"
},
"className": {
" type": "string"
},
"bundleKey": {
"type": "string"
},
"deploymentHosts": {
"type": "string"
},
"label": {
"type": "string"
},
"notes": {
"type": "string"
},
"link": {
"type": "object",
"properties": {
"sourceProjectKey": {
"type": "string"
},
"sourcePatternId": {
"type": "string"
},
"author": {
"type": "string"
},
"lastCopied": {
"type": "string"
}
}
},
"properties": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"propertyKey": {
"type": "string"
},
"value": {
"type": "object"
}
},
"required": [
"propertyKey"
]
}
]
}
}
}
}
]
}
}
}
}
200
Headers
Content-Type: application/json
Patch list of pattern instances ¶
Patch list of pattern instancesPATCH/projects/{projectKey}/patterns
NOTE: Partial implementation of https://tools.ietf.org/html/rfc6902
Supported paths:
- /label
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
Headers
Content-Type: application/json
Body
{
"items": [
{
"id": "a2bab9104ec0bb1f4e58a562",
"op": "remove",
"path": "/label"
},
{
"id": "2c2d769e345552e76646ac18",
"op": "add",
"path": "/label",
"value": "mylabel"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
"description": "Id of the Pattern."
},
"op": {
"type": "string",
"description": "Supported operations: add / remove."
},
"path": {
"type": "string",
"description": "The attribute to patch. Must start with '/'. Patch nested attribute like /a/b is not supported."
},
"value": {
"type": "object",
"description": "The value can be any valid json."
}
},
"required": [
"id",
"op",
"path"
]
}
}
}
}
200
Headers
Content-Type: application/json
Body
{}
Duplicate an existing pattern instance ¶
Duplicate an existing pattern instancePOST/projects/{projectKey}/patterns/{patternId}/duplicate
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645Id of the pattern instance.
200
Headers
Content-Type: application/json
Body
{
"patternId": "00000012",
"name": "My NevisReports Server (duplicate)",
"className": "ch.nevis.admin.v4.pattern.nevisreports.NevisReportsPattern",
"bundleKey": "aBundleName:0.1",
"deploymentHosts": "<host-filter-expression>",
"label": "<label>",
"notes": "<pattern notes>",
"properties": [
{
"propertyKey": "monitoredInstances",
"value": [
"pattern://239780937839"
]
},
{
"propertyKey": "dataRetentionPeriod",
"value": {
"bla": "x",
"more": [
"abc"
]
}
},
{
"propertyKey": "dataChunkSize",
"value": "month"
},
{
"propertyKey": "dataWhatever",
"value": "var://my-first-var"
},
{
"propertyKey": "template",
"value": "res://00000011#template"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"patternId": {
"type": "string"
},
"name": {
"type": "string"
},
"className": {
" type": "string"
},
"bundleKey": {
"type": "string"
},
"deploymentHosts": {
"type": "string"
},
"label": {
"type": "string"
},
"notes": {
"type": "string"
},
"properties": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"propertyKey": {
"type": "string"
},
"value": {
"type": "object"
}
},
"required": [
"propertyKey"
]
}
]
}
}
}
}
Create new pattern instance ¶
Create new pattern instancePOST/projects/{projectKey}/patterns
This uses the same command as the update pattern. With the only difference that update sets the Id in the bean if missing.
This is for creating new pattern instances. Note that the pattern instance is created even if it fails validation (assuming the input is correct, e.g. constitutes a valid a pattern).
Display Options
It’s a UI only feature to display fields or properties in read only mode or hide them completely.
-
Applied for users without ADMIN_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
-
Field names must use ‘field.’ prefix
- name, deploymentHosts, notes, label
-
The ‘*’ wildcard can be used to hide all or make read only all fields and properties.
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
Headers
Content-Type: application/json
Body
{
"name": "Test Proxy",
"className": "ch.nevis.admin.v4.plugin.nevisproxy.patterns.NevisProxyDeployable",
"bundleKey": "nevisadmin-plugin-nevisproxy:1.0.2-20181024T060143Z",
"deploymentHosts": "proxy",
"label": "my-group",
"notes": "<pattern notes>",
"displayOptions": {
"hidden": [
"field.deploymentHosts",
"defaultHostContext"
],
"readOnly": [
"*"
]
},
"properties": [
{
"propertyKey": "defaultHostContext",
"value": [
"pattern://6abafff4a15cd1c122d1e4f6"
]
}
]
}
201
Headers
Content-Type: application/json
Body
{
"patternId": "d3f51b1fcbd3eaf433588645",
"name": "Test Proxy",
"className": "ch.nevis.admin.v4.plugin.nevisproxy.patterns.NevisProxyDeployable",
"bundleKey": "nevisadmin-plugin-nevisproxy:1.0.2-20181024T060143Z",
"deploymentHosts": "proxy",
"label": "my-group",
"notes": "<pattern notes>",
"displayOptions": {
"hidden": [
"field.deploymentHosts",
"defaultHostContext"
],
"readOnly": [
"*"
]
},
"properties": [
{
"propertyKey": "defaultHostContext",
"value": [
"pattern://6abafff4a15cd1c122d1e4f6"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"patternId": {
" type": "string"
},
"name": {
"type": "string"
},
"className": {
" type": "string"
},
"bundleKey": {
"type": "string"
},
"deploymentHosts": {
"type": "string"
},
"label": {
"type": "string"
},
"notes": {
"type": "string"
},
"properties": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"propertyKey": {
"type": "string"
},
"value": {
"type": "object"
}
},
"required": [
"propertyKey"
]
}
]
}
}
}
}
Delete a pattern instance ¶
Delete a pattern instanceDELETE/projects/{projectKey}/patterns/{patternId}
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645ID of the pattern instance.
200
Headers
Content-Type: application/json
Delete list of patterns ¶
Delete list of patternsPOST/projects/{projectKey}/delete-patterns
Permissions
- Requires MODIFY_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
Headers
Content-Type: application/json
Body
{
"items": [
"283eca7b48a3efddb1600e5a",
"703f37522ac5a0c162e1f3f7",
"6ffc2e650038777124410793"
]
}
200
Headers
Content-Type: application/json
Get list of patterns referencing a certain pattern ¶
Get list of patterns referencing a certain patternGET/projects/{projectKey}/patterns/{patternId}/usage
This service response contains a list of patterns where the pattern set as parameter is referenced. The response also contains per pattern, the ‘propertyKey’ where the referenced pattern is used.
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: a6bd88aad75635b22597ee3fID of the pattern instance.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"patternId": "b83aacda64dc0acfad2fb5d6",
"propertyKey": "host"
}
]
}
Get a list of commits of a pattern instance ¶
Get a list of commits of a pattern instanceGET/projects/{projectKey}/patterns/{patternId}/versions
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: a6bd88aad75635b22597ee3fID of the pattern instance.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"commitId": "f16f89a751384fc873e15bc15797d3b146d9280c",
"message": "10 files added",
"author": "admin",
"date": "2018-10-26T12:13:12+02:00"
}
]
}
Get list of resources ¶
Get list of resourcesGET/projects/{projectKey}/patterns/{patternId}/resources/{propertyKey}{?meta}
Returns a lists of resources associated to a pattern and property and the metadata of those resources.
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: a6bd88aad75635b22597ee3fID of the pattern instance.
- propertyKey
string
(required) Example: templateName of the property containing the resources to list.
- meta
boolean
(optional) Example: trueIt determines whether it gets the metadata information or not. By default set to false.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"resourceName": "template.html",
"size": "300KB"
},
{
"resourceName": "style.css",
"size": "150KB"
},
{
"resourceName": "image.gif",
"size": "323KB"
},
{
"resourceName": "anotherimage.gif",
"size": "432KB"
}
],
"_meta": [
{
"resourceName": "template.html",
"localChecksum": "42wedqwr2eq2",
"remoteChecksum": "342dsgs34235",
"localStatus": "modified",
"localAuthor": "foo",
"localDate": "2018-01-09T19:22:752",
"commitId": "commit-id",
"remoteDate": "2018-01-09T18:01:332"
},
{
"resourceName": "style.css",
"localChecksum": "465sdf46sfz5f",
"remoteChecksum": "442dffs5346",
"localStatus": "unmodified",
"commitId": "commit-id",
"remoteDate": "2018-01-09T18:01:332"
},
{
"resourceName": "image.gif",
"localChecksum": "dsff3423423f",
"remoteChecksum": "dsff3423423f",
"localStatus": "unmodified",
"commitId": "commit-id",
"remoteDate": "2018-01-09T18:01:332"
},
{
"resourceName": "anotherimage.gif",
"localChecksum": "34rc3r34r2322",
"localStatus": "added",
"localAuthor": "foo",
"localDate": "2018-01-09T18:01:334"
},
{
"resourceName": "deletedimage.gif",
"remoteChecksum": "saf23523ggdgn",
"localStatus": "deleted",
"localAuthor": "boo",
"localDate": "2018-01-10T12:12:402",
"commitId": "commit-id",
"remoteDate": "2018-01-09T18:01:334"
}
]
}
Get resource content ¶
Get resource contentGET/projects/{projectKey}/patterns/{patternId}/resources/{propertyKey}/content/{fileName}
Fetch a resource file.
The file can be of different types (html, jar, etc.) which is defined in the response Content-Type.
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645ID of the pattern instance.
- propertyKey
string
(required) Example: templateName of the property containing the resource.
- fileName
string
(required) Example: template.htmlName of the resource.
200
Headers
Content-Type: text/html
Content-Disposition: attachment; filename=template.html
Content-Length: 34235
Body
"CONTENT OF THE FILE"
Update resource content ¶
Update resource contentPUT/projects/{projectKey}/patterns/{patternId}/resources/{propertyKey}/content/{fileName}
Add or update a resource file.
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645ID of the pattern instance.
- propertyKey
string
(required) Example: templateName of the property containing the resource.
- fileName
string
(required) Example: template.htmlName of the resource.
Headers
Content-Type: text/html
Content-Disposition: form-data; filename=template.html
Content-Length: 34235
Body
"CONTENT OF THE FILE"
200
Headers
Content-Type: application/json
Delete resource content ¶
Delete resource contentDELETE/projects/{projectKey}/patterns/{patternId}/resources/{propertyKey}/content/{fileName}
Delete a resource file.
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645ID of the pattern instance.
- propertyKey
string
(required) Example: templateName of the property containing the resource.
- fileName
string
(required) Example: template.htmlName of the resource.
200
Headers
Content-Type: application/json
Get HEAD resource content ¶
Get HEAD resource contentGET/projects/{projectKey}/patterns/{patternId}/resources/{propertyKey}/head/content/{fileName}
Fetch a resource file form the HEAD.
The file can be of different types (html, jar, etc.) which is defined in the response Content-Type.
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645ID of the pattern instance.
- propertyKey
string
(required) Example: templateName of the property containing the resource.
- fileName
string
(required) Example: template.htmlName of the resource.
200
Headers
Content-Type: text/html
Content-Disposition: attachment; filename=template.html
Content-Length: 34235
Body
"CONTENT OF THE FILE"
Get pattern documentation ¶
Get pattern documentationGET/projects/{projectKey}/documentation/{className}
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- className
string
(required) Example: ch.nevis.admin.v4.plugin.nevisproxy.patterns.NevisProxyDeployableName of the concrete class of the pattern.
200
Headers
Content-Type: text/html
Body
<div id="doc-ch.nevis.admin.plugin.nevisproxy.patterns.NevisProxyDeployable" class="documentation">
<h1></h1>
<section id="doc-ch.nevis.admin.plugin.nevisproxy.patterns.NevisProxyDeployable-abstract" class="sect-abstract">
<h2></h2>
<p>This pattern creates and maintains a nevisProxy instance in the target hosts. In addition to the host managed by this nevisProxy, additional virtual hosts can be added the the VirtualHost pattern.</p>
</section>
<section id="doc-ch.nevis.admin.plugin.nevisproxy.patterns.NevisProxyDeployable-deploymentHosts" class="sect-deploymentHosts">
<h2>Deployment Hosts</h2>
<p>The hosts or host groups in which this nevisProxy instance shall run. For a targeted inventory,instances will be generated and maintained on all hosts matching this.</p>
</section>
<section id="doc-ch.nevis.admin.plugin.nevisproxy.patterns.NevisProxyDeployable-addresses" class="sect-addresses">
<h2>Front End Addresses</h2>
<p>Addresses (using HTTPS or HTTP) at which this nevisProxy instance will be reachable. Use one of the following forms:</p>
<table>
<thead>
<tr>
<th>Form</th>
<th>Syntax</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>scheme, hostname and port</td>
<td>
<code>scheme://hostname:port</code>
</td>
<td>
<code>https://www.public.org:8443</code>
</td>
</tr>
<tr>
<td>scheme and hostname</td>
<td>
<code>scheme://hostname</code>
</td>
<td>
<code>https://www.public.org</code>
</td>
</tr>
<tr>
<td>port only</td>
<td>
<code>port</code>
</td>
<td>
<code>:443</code>
</td>
</tr>
<tr>
<td>hostname only</td>
<td>
<code>hostname</code>
</td>
<td>
<code>localhost</code>
</td>
</tr>
</tbody>
</table>
<p>If left out, the hostname will default to the name of the host deployed to. The port will, if left out, default to 443 for HTTPS and to 80 for HTTP.</p>
<p>Note: the
<code>front end addresses</code> must resolve to different IPs or use different ports. I.e. This can be used for IP/port-based virtual hosting only. Use the <code>nevisProxy Virtual Host</code> pattern for more complex scenarios.
</p>
</section>
<section id="doc-ch.nevis.admin.plugin.nevisproxy.patterns.NevisProxyDeployable-keystore" class="sect-keystore">
<h2>Front End Keystore</h2>
<p>The keystore to use for TLS connections of the front end. This is required when https is used in any of the front end addresses. Note that when different host names are configured in <code>front end addresses</code> then the keystore needs to provide certificates for those names, e.g. using SubjectAlternativeName or wildcard certificates.
</p>
</section>
<section id="doc-ch.nevis.admin.plugin.nevisproxy.patterns.NevisProxyDeployable-hosts" class="sect-hosts">
<h2>Additional Host Contexts</h2>
<p>Reference any nevisProxy Advanced Host patterns here.</p>
</section>
<section id="doc-ch.nevis.admin.plugin.nevisproxy.patterns.NevisProxyDeployable-addons" class="sect-addons">
<h2>Additional Settings</h2>
<p>Assign addon pattern(s) to customize the default behaviour of this host.</p>
</section>
</div>
Copy patterns ¶
Copy patternsPOST/projects/{projectKey}/copy-patterns
Copy a list of patterns from one project to another.
Use the includeVariables
field in the body to specify that you’d like to copy over variables referenced by the copied patterns.
Permissions
-
Requires VIEW_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
-
Requires MODIFY_PROJECT on ‘tenants/{targetTenantKey}/projects/{targetProjectKey}’ or higher level targets (e.g. ‘/tenants/{targetTenantKey}’).
Copy Modes
-
DRY_RUN: Simulates the copy, returns validation only.
-
NORMAL: Copy only new patterns. Fails if the patternId exists on the target project. The copied patterns will be linked to the original by having the same patternId.
-
FORCE: Copy and replace patterns with the same id as well. The copied patterns will be linked to the original by having the same patternId.
-
NEW: Copy patterns with new IDs. The copied patterns will not be linked to the original.
-
DRY_RUN_NEW: Simulates the copy as if done with the
NEW
copy mode, returns validation only.
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project where the patterns to copy are.
Body
{
"copyMode": "NORMAL",
"patternIds": [
"953cac6990c037bbd8a6968b"
],
"targetProjectKey": "DEFAULT-TARGET",
"includeVariables": "true"
}
201
Headers
Content-Type: application/json
Body
{}
Body
{
"copyMode": "DRY_RUN",
"patternIds": [
"953cac6990c037bbd8a6968b"
],
"targetProjectKey": "DEFAULT-TARGET"
}
200
Headers
Content-Type: application/json
Body
{
"_status": {
"_errors": [],
"_warnings": [
{
"type": "about:blank",
"title": "issue.code.pattern.copy",
"detail": "This pattern already exists in the target project. Its contents will be updated.",
"sources": [
{
"PATTERN": "953cac6990c037bbd8a6968b"
}
],
"invalid-params": [
{}
]
},
{
"type": "about:blank",
"title": "issue.code.pattern.copy",
"detail": "This variable already exists in the target project. It will be updated.",
"sources": [
{
"VARIABLE": "variableKey"
}
],
"invalid-params": [
{}
]
}
],
"_infos": []
}
}
Body
{
"copyMode":"NEW",
"patternIds":[
"953cac6990c037bbd8a6968b"
],
"targetProjectKey":"DEFAULT-TARGET",
"prefix":"new "
"postfix":" (copy)"
}
200
Headers
Content-Type: application/json
Body
{}
List copied patterns ¶
List copied patternsGET/projects/{projectKey}/copy-patterns/{patternId}
List all projects where this pattern currently has a copy.
Permissions
- Requires no permissions, but only those projects will be included in the result where the user has VIEW_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ (or higher).
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project where the original pattern is.
- patternId
string
(required) Example: 953cac6990c037bbd8a6968bId of the pattern
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"projectKey": "SIVEN-MASTER",
"patternId": "953cac6990c037bbd8a6968b",
"sourceModification": "2023-06-12:16:29:50Z",
"targetModification": "2023-06-12:17:41:10Z",
"copyTime": "2023-06-12:17:41:10Z"
},
{
"projectKey": "SIVEN-MASTER-DEV",
"patternId": "953cac6990c037bbd8a6968b",
"sourceModification": "2023-06-12:16:29:50Z",
"targetModification": "2023-06-12:16:51:12Z",
"copyTime": "2023-06-12:16:51:12Z"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"projectKey": {
"type": "string"
},
"patternId": {
"type": "string"
},
"sourceModification": {
"type": "string"
},
"targetModification": {
"type": "string"
},
"copyTime": {
"type": "string"
}
}
}
}
}
}
Pattern Views ¶
Pattern ViewsGET/projects/{projectKey}/patterns/{patternId}/views
Returns the list of views which contains the patternId.
Permissions
- Requires VIEW_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: b5b2e40a81a0d76d0a89a34bID of the pattern instance.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"patternId": "b5b2e40a81a0d76d0a89a34b",
"view": "Authentication Flow",
"label": "SSO Realm (Authentication Flow)",
"children": [
{
"patternId": "6f8f8bc75e630bd4d92b4378",
"parentPropertyKey": "authenticate",
"parentPatternIds": [
"45693679bc21680d472c454e",
"b5b2e40a81a0d76d0a89a34b"
],
"children": [
{
"patternId": "45693679bc21680d472c454e",
"parentPropertyKey": "onSuccess",
"aborted": true,
"parentPatternIds": [
"6f8f8bc75e630bd4d92b4378"
],
"children": [
{
"patternId": "6f8f8bc75e630bd4d92b4378",
"parentPropertyKey": "onSuccess",
"circle": true,
"parentPatternIds": [
"45693679bc21680d472c454e",
"b5b2e40a81a0d76d0a89a34b"
]
}
]
}
]
}
]
}
]
}
Dynamic Data ¶
Resources related to dynamic data in the API.
Get list of dynamic data in a project ¶
Get list of dynamic data in a projectGET/projects/{projectKey}/dynamic-data
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"dynamicDataKey": "hosts",
"label": "Host contexts",
"patternId": "d3f51b1fcbd3eaf433588645",
"patternName": "Test Proxy",
"mediaType": "application/json"
},
{
"dynamicDataKey": "realm-flow-diagram-html",
"label": "Authentication flow diagram of nevisAuth Domain Test_Realm",
"patternId": "504bd0e7d1891f445bf24199",
"patternName": "Test Realm",
"mediaType": "text/html"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"dynamicDataKey": {
"type": "string"
},
"label": {
"type": "string"
},
"patternId": {
"type": "string"
},
"patternName": {
"type": "string"
},
"mediaType": {
"type": "string"
}
}
}
]
}
}
}
}
Get list of dynamic data in a project by key ¶
Get list of dynamic data in a project by keyGET/projects/{projectKey}/dynamic-data/{dynamicDataKey}
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- dynamicDataKey
string
(required) Example: realm-flow-diagram-htmlKey of dynamic data to list.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"dynamicDataKey": "realm-flow-diagram-html",
"label": "Authentication flow diagram of nevisAuth Domain Test_Realm",
"patternId": "d3f51b1fcbd3eaf433588645",
"patternName": "Test Realm2",
"mediaType": "text/html"
},
{
"dynamicDataKey": "realm-flow-diagram-html",
"label": "Authentication flow diagram of nevisAuth Domain Test_Realm",
"patternId": "504bd0e7d1891f445bf24199",
"patternName": "Test Realm",
"mediaType": "text/html"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"dynamicDataKey": {
"type": "string"
},
"label": {
"type": "string"
},
"patternId": {
"type": "string"
},
"patternName": {
"type": "string"
},
"mediaType": {
"type": "string"
}
}
}
]
}
}
}
}
Get list of dynamic data of a pattern ¶
Get list of dynamic data of a patternGET/projects/{projectKey}/patterns/{patternId}/dynamic-data
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645ID of the pattern instance.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"dynamicDataKey": "hosts",
"label": "Host contexts",
"patternId": "d3f51b1fcbd3eaf433588645",
"patternName": "Test Proxy",
"mediaType": "application/json"
},
{
"dynamicDataKey": "realm-flow-diagram-html",
"label": "Authentication flow diagram of nevisAuth Domain Test_Realm",
"patternId": "d3f51b1fcbd3eaf433588645",
"patternName": "Test Realm",
"mediaType": "text/html"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"dynamicDataKey": {
"type": "string"
},
"label": {
"type": "string"
},
"patternId": {
"type": "string"
},
"patternName": {
"type": "string"
},
"mediaType": {
"type": "string"
}
}
}
]
}
}
}
}
Download dynamic data of a pattern ¶
Download dynamic data of a patternGET/projects/{projectKey}/patterns/{patternId}/dynamic-data/{dynamicDataKey}
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- patternId
string
(required) Example: d3f51b1fcbd3eaf433588645Id of the pattern instance.
- dynamicDataKey
string
(required) Example: realm-flow-diagram-htmlKey of dynamic data to fetch.
200
Headers
Content-Type: <content-type>
Content-Length: <content-length>
Body
"CONTENT OF THE FILE"
Pattern Type ¶
Resources related to pattern types in the API.
Get all pattern types ¶
Get all pattern typesGET/projects/{projectKey}/pattern-types
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"className": "ch.nevis.admin.v4.plugin.nevisproxy.patterns.AccessRestriction",
"bundleKey": "nevisadmin-plugin-nevisproxy:4.0.0-SNAPSHOT",
"name": "Access Restriction",
"description": "",
"deployablePattern": false,
"categories": [
"Standard Library",
"Security",
"Addons"
],
"properties": [
{
"propertyKey": "ips",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.SimpleTextProperty",
"name": "Allowed Source IP(s)",
"bundle": "nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"hidden": false,
"parameters": {
"minRequired": 1,
"format": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"
},
"links": []
},
{
"propertyKey": "subPaths",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.SimpleTextProperty",
"name": "Sub-path Restriction(s)",
"bundle": "nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"hidden": false,
"parameters": {
"minRequired": 0,
"format": "[^/].*[\\w/]"
},
"links": []
}
]
},
{
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.StandardRealm",
"bundleKey": "nevisadmin-plugin-nevisauth:4.3.0-20190503T080539Z",
"name": "nevisAuth Realm (DEPRECATED)",
"description": "\n_DEPRECATED_\n\nPlease add an `Authentication Realm` pattern and move your realm configuration to that pattern. \nThis pattern will be removed in an upcoming pattern library release.\n\nThis pattern defines how to authenticate access to services provided by nevisProxy.\nThe authentication service is provided by nevisAuth.\n\nYou have to setConnection authentication steps which will be applied in the order they are referenced.\nIf an authentication steps fails to authenticate, the next available step is used as a fallback.\n\nIf there are no more authentication steps, the authentication process fails.\nIn this case the caller will get an error page.\n\nFor rendering the pages during authentication the nevisLogrend component is used.\nnevisLogrend will be deployed on the same servers as nevisProxy.\n",
"deployablePattern": false,
"categories": [
"Authentication",
"Deprecated"
],
"properties": [
{
"propertyKey": "auth",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "nevisAuth",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 1,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.NevisAuthPattern"
},
"links": [],
"category": "nevisAuth Connection"
},
{
"propertyKey": "keyStore",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Client Key Store",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.base.generation.pki.KeyStoreProvider"
},
"links": [],
"category": "nevisAuth Connection"
},
{
"propertyKey": "trustStore",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Trust Store",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.base.generation.pki.TrustStoreProvider"
},
"links": [],
"category": "nevisAuth Connection"
},
{
"propertyKey": "signerTrustStore",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "NEVIS SecToken Trust",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.base.generation.pki.TrustStoreProvider"
},
"links": [],
"category": "nevisAuth Connection"
},
{
"propertyKey": "services",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Authentication Services",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.AuthenticationService"
},
"links": []
},
{
"propertyKey": "addons",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Additional Settings",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.NevisAuthRealmAddon"
},
"links": [],
"category": "Advanced Settings"
},
{
"propertyKey": "authenticate",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Authentication Steps",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 1,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.AuthenticationStep"
},
"links": [
{
"linkType": "DYNAMIC_DATA",
"target": "realm-flow-diagram-html",
"label": "Authentication Flow Diagram",
"contentType": "text/html"
}
]
},
{
"propertyKey": "tokens",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Token Definitions",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.AuthenticationToken"
},
"links": []
},
{
"propertyKey": "logrend",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Login Renderer",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.LogrendPattern"
},
"links": [],
"category": "GUI Rendering"
},
{
"propertyKey": "logrendKeyStore",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Client Key Store",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.base.generation.pki.KeyStoreProvider"
},
"links": [],
"category": "GUI Rendering"
},
{
"propertyKey": "logrendTrustStore",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Trust Store",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.base.generation.pki.TrustStoreProvider"
},
"links": [],
"category": "GUI Rendering"
},
{
"propertyKey": "template",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.AttachmentProperty",
"name": "Login Template",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {},
"links": [
{
"linkType": "RESOURCE",
"target": "ch/nevis/admin/v4/plugin/nevisauth/generator/logrend/template.zip",
"label": "Download Default Template",
"contentType": "application/zip"
}
],
"category": "GUI Rendering"
},
{
"propertyKey": "labels",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.TextProperty",
"name": "Custom Translations",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {},
"links": []
}
]
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"className": {
"type": "string"
},
"bundleKey": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"deployablePattern": {
"type": "boolean"
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"categoryOrder": {
"type": "array",
"items": {
"type": "string"
}
},
"properties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"propertyKey": {
"type": "string"
},
"className": {
"type": "string"
},
"name": {
"type": "string"
},
"bundle": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"parameters": {
"type": "object"
},
"defaultValue": {},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"linkType": {
"type": "string"
},
"target": {
"type": "string"
},
"label": {
"type": "string"
},
"contentType": {
"type": "string"
}
},
"additionalProperties": false
}
},
"category": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"className",
"bundleKey",
"name"
]
}
}
}
}
Get pattern type ¶
Get pattern typeGET/projects/{projectKey}/pattern-types/{className}
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- className
string
(optional) Example: ch.nevis.admin.v4.plugin.nevisauth.patterns.StandardRealmName of the concrete class of the pattern type.
200
Headers
Content-Type: application/json
Body
{
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.StandardRealm",
"bundleKey": "nevisadmin-plugin-nevisauth:4.3.0-20190503T080539Z",
"name": "nevisAuth Realm (DEPRECATED)",
"description": "\n_DEPRECATED_\n\nPlease add an `Authentication Realm` pattern and move your realm configuration to that pattern. \nThis pattern will be removed in an upcoming pattern library release.\n\nThis pattern defines how to authenticate access to services provided by nevisProxy.\nThe authentication service is provided by nevisAuth.\n\nYou have to setConnection authentication steps which will be applied in the order they are referenced.\nIf an authentication steps fails to authenticate, the next available step is used as a fallback.\n\nIf there are no more authentication steps, the authentication process fails.\nIn this case the caller will get an error page.\n\nFor rendering the pages during authentication the nevisLogrend component is used.\nnevisLogrend will be deployed on the same servers as nevisProxy.\n",
"deployablePattern": false,
"categories": [
"Authentication",
"Deprecated"
],
"properties": [
{
"propertyKey": "auth",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "nevisAuth",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 1,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.NevisAuthPattern"
},
"links": [],
"category": "nevisAuth Connection"
},
{
"propertyKey": "keyStore",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Client Key Store",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.base.generation.pki.KeyStoreProvider"
},
"links": [],
"category": "nevisAuth Connection"
},
{
"propertyKey": "trustStore",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Trust Store",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.base.generation.pki.TrustStoreProvider"
},
"links": [],
"category": "nevisAuth Connection"
},
{
"propertyKey": "signerTrustStore",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "NEVIS SecToken Trust",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.base.generation.pki.TrustStoreProvider"
},
"links": [],
"category": "nevisAuth Connection"
},
{
"propertyKey": "services",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Authentication Services",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.AuthenticationService"
},
"links": []
},
{
"propertyKey": "addons",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Additional Settings",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.NevisAuthRealmAddon"
},
"links": [],
"category": "Advanced Settings"
},
{
"propertyKey": "authenticate",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Authentication Steps",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 1,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.AuthenticationStep"
},
"links": [
{
"linkType": "DYNAMIC_DATA",
"target": "realm-flow-diagram-html",
"label": "Authentication Flow Diagram",
"contentType": "text/html"
}
]
},
{
"propertyKey": "tokens",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Token Definitions",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.AuthenticationToken"
},
"links": []
},
{
"propertyKey": "logrend",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Login Renderer",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.nevisauth.patterns.LogrendPattern"
},
"links": [],
"category": "GUI Rendering"
},
{
"propertyKey": "logrendKeyStore",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Client Key Store",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.base.generation.pki.KeyStoreProvider"
},
"links": [],
"category": "GUI Rendering"
},
{
"propertyKey": "logrendTrustStore",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.PatternReferenceProperty",
"name": "Trust Store",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {
"minRequired": 0,
"maxAllowed": 1,
"className": "ch.nevis.admin.v4.plugin.base.generation.pki.TrustStoreProvider"
},
"links": [],
"category": "GUI Rendering"
},
{
"propertyKey": "template",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.AttachmentProperty",
"name": "Login Template",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {},
"links": [
{
"linkType": "RESOURCE",
"target": "ch/nevis/admin/v4/plugin/nevisauth/generator/logrend/template.zip",
"label": "Download Default Template",
"contentType": "application/zip"
}
],
"category": "GUI Rendering"
},
{
"propertyKey": "labels",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.TextProperty",
"name": "Custom Translations",
"bundle": "nevisadmin-plugin-base-generation:4.3.0-20190503T080539Z",
"hidden": false,
"parameters": {},
"links": []
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"className": {
"type": "string"
},
"bundleKey": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"deployablePattern": {
"type": "boolean"
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"properties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"propertyKey": {
"type": "string"
},
"className": {
"type": "string"
},
"name": {
"type": "string"
},
"bundle": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"parameters": {
"type": "object"
},
"defaultValue": {},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"linkType": {
"type": "string"
},
"target": {
"type": "string"
},
"label": {
"type": "string"
},
"contentType": {
"type": "string"
}
},
"additionalProperties": false
}
},
"category": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"className",
"bundleKey",
"name"
]
}
Property Type ¶
Resources related to property types in the API.
Get all property types ¶
Get all property typesGET/projects/{projectKey}/property-types
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"className": "ch.nevis.admin.v4.plugin.base.generation.property.AttachmentProperty",
"bundleKey": "nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"name": "Attachment Property",
"description": "",
"uiComponent": "AttachmentPropertyComponent",
"parameters": [
{
"parameterKey": "minRequired"
},
{
"parameterKey": "maxAllowed"
},
{
"parameterKey": "allowedFileName"
}
]
},
{
"className": "ch.nevis.admin.v4.plugin.base.generation.property.BytesProperty",
"bundleKey": "nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"name": "Bytes Property",
"description": "A file size in bytes",
"uiComponent": "BytesPropertyComponent",
"parameters": [
{
"parameterKey": "required",
"defaultValue": true
},
{
"parameterKey": "min"
},
{
"parameterKey": "max"
}
]
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"className": {
"type": "string"
},
"bundleKey": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"uiComponent": {
"type": "string"
},
"parameters": {
"type": "array",
"items": {
"type": "object",
"properties": {
"parameterKey": {
"type": "string"
}
},
"required": [
"parameterKey"
]
}
}
},
"additionalProperties": false,
"required": [
"className",
"bundleKey",
"name"
]
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Get property type ¶
Get property typeGET/projects/{projectKey}/property-types/{className}
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- className
string
(optional) Example: ch.nevis.admin.v4.plugin.base.generation.property.BytesPropertyName of the concrete class of the property type.
200
Headers
Content-Type: application/json
Body
{
"className": "ch.nevis.admin.v4.plugin.base.generation.property.BytesProperty",
"bundleKey": "nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"name": "Bytes Property",
"description": "A file size in bytes",
"uiComponent": "BytesPropertyComponent",
"parameters": [
{
"parameterKey": "required",
"defaultValue": true
},
{
"parameterKey": "min"
},
{
"parameterKey": "max"
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"className": {
"type": "string"
},
"bundleKey": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"uiComponent": {
"type": "string"
},
"parameters": {
"type": "array",
"items": {
"type": "object",
"properties": {
"parameterKey": {
"type": "string"
},
"defaultValue": {}
},
"additionalProperties": false,
"required": [
"parameterKey"
]
}
}
},
"additionalProperties": false,
"required": [
"className",
"bundleKey",
"name"
]
}
Variable ¶
Resources related to variables in the API.
Get list of variables defined in a project ¶
Get list of variables defined in a projectGET/projects/{projectKey}/variables{?meta,className}
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- meta
boolean
(optional) Example: trueDetermines if the response will return metadata or not. It is ‘false’ as default.
- className
string
(optional) Example: ch.nevis.admin.v4.plugin.base.generation.property.URLPropertyName of the concrete class of the property type.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"variableKey": "proxy-bind-address",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.URLProperty",
"value": "http://dummy-proxy-bind-address:803",
"requireOverloading": true,
"parameters": {
"minRequired": 0,
"portInputMode": "REQUIRED",
"hostNameInputMode": "REQUIRED",
"schemeInputMode": "REQUIRED",
"pathInputMode": "NONE",
"allowedSchemes": "http,https"
},
"_meta": {
"localStatus": "MODIFIED",
"localAuthor": "admin",
"localDate": "2018-10-28T11:39:23.374Z",
"headValue": {
"className": "ch.nevis.admin.v4.plugin.base.generation.property.URLProperty",
"parameters": {
"minRequired": 0,
"portInputMode": "REQUIRED",
"hostNameInputMode": "REQUIRED",
"schemeInputMode": "REQUIRED",
"pathInputMode": "NONE",
"allowedSchemes": "http,https"
},
"value": "http://dummy-proxy-bind-address:80",
"requireOverloading": true
},
"commitId": "874dfdbf0da3d2e3b57168594c7579956392f311",
"remoteDate": "2018-10-28T11:39:11Z"
}
},
{
"variableKey": "proxy-host-name",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.URLProperty",
"value": [
"http://dummy-proxy-host-name"
],
"requireOverloading": true,
"parameters": {
"minRequired": 1,
"maxAllowed": 1,
"portInputMode": "OPTIONAL",
"hostNameInputMode": "REQUIRED",
"schemeInputMode": "OPTIONAL",
"pathInputMode": "NONE",
"allowedSchemes": "http,https"
},
"_meta": {
"localStatus": "UNMODIFIED",
"commitId": "874dfdbf0da3d2e3b57168594c7579956392f311",
"remoteDate": "2018-10-28T11:39:11Z"
}
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"variableKey": {
"type": "string"
},
"className": {
"type": "string"
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"requireOverloading": {
"type": "boolean"
},
"parameters": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"maxAllowed": {
"type": "integer"
},
"minRequired": {
"type": "integer"
},
"portInputMode": {
"type": "string"
},
"hostNameInputMode": {
"type": "string"
},
"schemeInputMode": {
"type": "string"
},
"pathInputMode": {
"type": "string"
},
"allowedSchemes": {
"type": "string"
}
},
"additionalProperties": false
},
"_meta": {
"type": "object",
"properties": {
"localStatus": {
"type": "string"
},
"localAuthor": {
"type": "string"
},
"localDate": {
"type": "string"
},
"headValue": {
"type": "object",
"properties": {
"className": {
"type": "string"
},
"value": {
"type": "string"
},
"requireOverloading": {
"type": "boolean"
},
"parameters": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"maxAllowed": {
"type": "integer"
},
"minRequired": {
"type": "integer"
},
"portInputMode": {
"type": "string"
},
"hostNameInputMode": {
"type": "string"
},
"schemeInputMode": {
"type": "string"
},
"pathInputMode": {
"type": "string"
},
"allowedSchemes": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"className",
"value"
]
},
"commitId": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"localStatus",
"localAuthor",
"localDate"
]
}
},
"additionalProperties": false,
"required": [
"variableKey",
"className",
"value",
"parameters"
]
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Get list of patterns / properties using a certain variable within a project ¶
Get list of patterns / properties using a certain variable within a projectGET/projects/{projectKey}/variables/{variableKey}/usage
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- variableKey
string
(required) Example: proxy-bind-addressKey of the variable.
200
Headers
Content-Type: application/json
Body
{
"variableKey": "proxy-bind-address",
"usages": [
{
"patternId": "6abafff4a15cd1c122d1e4f6",
"propertyKey": "listen"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"variableKey": {
"type": "string"
},
"usages": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"patternId": {
"type": "string"
},
"propertyKey": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"patternId",
"propertyKey"
]
}
]
}
},
"additionalProperties": false,
"required": [
"variableKey",
"usages"
]
}
Upsert variables in a project ¶
Upsert variables in a projectPUT/projects/{projectKey}/variables{?variableDeletion}
-
CREATE: If the list of items sent in the request body contains a new variableKey, a new variable will be created.
-
UPDATE: If the list of items sent in the request body contains a variableKey with a new different value, the variable will be updated.
-
DELETE: If variableDeletion is set to true, or if it is omitted, then any existing variables that are missing from the request body will be deleted. If variableDeletion is set to false, then variables will only be created or updated, but never deleted.
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- variableDeletion
boolean
(optional) Example: falsetrue = any existing variables that are missing from the request body will be deleted.
false = variables will only be created or updated, but never deleted.
The default value is ‘true’.
Headers
Content-Type: application/json
Body
{
"items": [
{
"variableKey": "proxy-bind-address",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.URLProperty",
"value": [
"http://dummy-proxy-bind-address:80"
],
"requireOverloading": true,
"parameters": {
"minRequired": 0,
"portInputMode": "REQUIRED",
"hostNameInputMode": "REQUIRED",
"schemeInputMode": "REQUIRED",
"pathInputMode": "NONE",
"allowedSchemes": "http,https"
}
},
{
"variableKey": "proxy-host-name",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.URLProperty",
"value": [
"http://dummy-proxy-host-name"
],
"requireOverloading": true,
"parameters": {
"minRequired": 1,
"maxAllowed": 1,
"portInputMode": "OPTIONAL",
"hostNameInputMode": "REQUIRED",
"schemeInputMode": "OPTIONAL",
"pathInputMode": "NONE",
"allowedSchemes": "http,https"
}
},
{
"variableKey": "backend_areg",
"className": "ch.nevis.admin.v4.plugin.base.property.SimpleTextProperty",
"value": [
"some scalar string value",
"another scalar value"
],
"requireOverloading": false,
"parameters": {
"format": "\\\\w+",
"maxAllowed": 5
}
}
]
}
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"variableKey": "backend_areg",
"className": "ch.nevis.admin.v4.plugin.base.property.SimpleTextProperty",
"value": [
"some scalar string value",
"another scalar value"
],
"requireOverloading": false,
"parameters": {
"format": "\\\\w+",
"maxAllowed": 5
}
},
{
"variableKey": "proxy-bind-address",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.URLProperty",
"value": [
"http://dummy-proxy-bind-address:80"
],
"requireOverloading": true,
"parameters": {
"minRequired": 0,
"portInputMode": "REQUIRED",
"hostNameInputMode": "REQUIRED",
"schemeInputMode": "REQUIRED",
"pathInputMode": "NONE",
"allowedSchemes": "http,https"
}
},
{
"variableKey": "proxy-host-name",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.URLProperty",
"value": [
"http://dummy-proxy-host-name"
],
"requireOverloading": true,
"parameters": {
"minRequired": 1,
"maxAllowed": 1,
"portInputMode": "OPTIONAL",
"hostNameInputMode": "REQUIRED",
"schemeInputMode": "OPTIONAL",
"pathInputMode": "NONE",
"allowedSchemes": "http,https"
}
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"variableKey": {
"type": "string"
},
"className": {
"type": "string"
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"requireOverloading": {
"type": "boolean"
},
"parameters": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"maxAllowed": {
"type": "integer"
},
"minRequired": {
"type": "integer"
},
"portInputMode": {
"type": "string"
},
"hostNameInputMode": {
"type": "string"
},
"schemeInputMode": {
"type": "string"
},
"pathInputMode": {
"type": "string"
},
"allowedSchemes": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"variableKey",
"className",
"value",
"parameters"
]
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Fetch an existing project variable ¶
Fetch an existing project variableGET/projects/{projectKey}/variables/{variableKey}{?meta}
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- variableKey
string
(required) Example: proxy-bind-addressKey of the variable.
- meta
boolean
(optional) Example: trueDetermines if the response will return metadata or not. It is ‘false’ as default.
200
Headers
Content-Type: application/json
Body
{
"variableKey": "proxy-bind-address",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.URLProperty",
"value": "http://dummy-proxy-bind-address:800",
"requireOverloading": true,
"parameters": {
"minRequired": 0,
"portInputMode": "REQUIRED",
"hostNameInputMode": "REQUIRED",
"schemeInputMode": "REQUIRED",
"pathInputMode": "NONE",
"allowedSchemes": "http,https"
},
"_meta": {
"localStatus": "MODIFIED",
"localAuthor": "admin",
"localDate": "2018-10-28T11:46:32.826Z",
"headValue": {
"className": "ch.nevis.admin.v4.plugin.base.generation.property.URLProperty",
"parameters": {
"minRequired": 0,
"portInputMode": "REQUIRED",
"hostNameInputMode": "REQUIRED",
"schemeInputMode": "REQUIRED",
"pathInputMode": "NONE",
"allowedSchemes": "http,https"
},
"value": "http://dummy-proxy-bind-address:80",
"requireOverloading": true
},
"commitId": "874dfdbf0da3d2e3b57168594c7579956392f311",
"remoteDate": "2018-10-28T11:39:11Z"
}
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"variableKey": {
"type": "string"
},
"className": {
"type": "string"
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"requireOverloading": {
"type": "boolean"
},
"parameters": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"maxAllowed": {
"type": "integer"
},
"minRequired": {
"type": "integer"
},
"portInputMode": {
"type": "string"
},
"hostNameInputMode": {
"type": "string"
},
"schemeInputMode": {
"type": "string"
},
"pathInputMode": {
"type": "string"
},
"allowedSchemes": {
"type": "string"
}
},
"additionalProperties": false
},
"_meta": {
"type": "object",
"properties": {
"localStatus": {
"type": "string"
},
"localAuthor": {
"type": "string"
},
"localDate": {
"type": "string"
},
"headValue": {
"type": "object",
"properties": {
"className": {
"type": "string"
},
"value": {
"type": "string"
},
"requireOverloading": {
"type": "boolean"
},
"parameters": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"maxAllowed": {
"type": "integer"
},
"minRequired": {
"type": "integer"
},
"portInputMode": {
"type": "string"
},
"hostNameInputMode": {
"type": "string"
},
"schemeInputMode": {
"type": "string"
},
"pathInputMode": {
"type": "string"
},
"allowedSchemes": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"className",
"value"
]
},
"commitId": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"localStatus",
"localAuthor",
"localDate"
]
}
},
"additionalProperties": false,
"required": [
"variableKey",
"className",
"value",
"parameters"
]
}
Rename variable in a project ¶
Rename variable in a projectPUT/projects/{projectKey}/variables/{variableKey}/key
Updates the ‘variableKey’ of the Variable passed as parameter with the ‘variableKey’ sent in the request body.
To do this key modification, first it is checked that the proposed new ‘variableKey’ is not used by any other Variable. If it is used, then the response code will be a “409 - Conflict” indicating that the transaction did not succeed because the ‘variableKey’ is already in use.
If the transaction works successfully the response will return “200 - OK” code and the variable with the modified ‘variableKey’. Since the key has changed, it will also modify all the references of the old ‘variableKey’ in the properties of each pattern in the project using the variable, changing them to the new ‘variableKey’.
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
- variableKey
string
(required) Example: proxy-bind-addressKey of the variable.
Headers
Content-Type: application/json
Body
{
"variableKey": "new-proxy-bind-address"
}
200
Headers
Content-Type: application/json
Body
{
"variableKey": "new-proxy-bind-address",
"className": "ch.nevis.admin.v4.plugin.base.generation.property.URLProperty",
"value": "http://dummy-proxy-bind-address:800",
"requireOverloading": true,
"parameters": {
"minRequired": 0,
"portInputMode": "REQUIRED",
"hostNameInputMode": "REQUIRED",
"schemeInputMode": "REQUIRED",
"pathInputMode": "NONE",
"allowedSchemes": "http,https"
}
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"variableKey": {
"type": "string"
},
"className": {
"type": "string"
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"requireOverloading": {
"type": "boolean"
},
"parameters": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"maxAllowed": {
"type": "integer"
},
"minRequired": {
"type": "integer"
},
"portInputMode": {
"type": "string"
},
"hostNameInputMode": {
"type": "string"
},
"schemeInputMode": {
"type": "string"
},
"pathInputMode": {
"type": "string"
},
"allowedSchemes": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"variableKey",
"className",
"value",
"parameters"
]
}
Inventory ¶
Resources related to inventories in the API.
List all the inventories ¶
List all the inventoriesGET/inventories
Returns a list of inventories that the user can view.
Permissions
- No permissions required, but the response list will only return inventories where the user has VIEW_INVENTORY permission.
Example URI
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"tenantKey": "DEFAULT",
"branch": "master",
"path": "INVENTORY-CD-TEST",
"repository": "ssh://git@your-git-host/default/siven.git",
"commitId": "c1dd2aa9a99c4f30821d5c9e4964997c81f9ff28",
"type": "YAML",
"color": "RED",
"publishRequired": true,
"_userAuthorization": [
"VIEW_INVENTORY",
"MODIFY_INVENTORY",
"ADMIN_INVENTORY",
"DEPLOY_INVENTORY"
]
},
{
"inventoryKey": "DEFAULT-INVENTORY",
"tenantKey": "DEFAULT",
"type": "YAML",
"publishRequired": false,
"_userAuthorization": [
"VIEW_INVENTORY",
"MODIFY_INVENTORY"
]
},
{
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST:A1F6635",
"tenantKey": "DEFAULT",
"branch": "master",
"path": "INVENTORY-CD-TEST",
"repository": "ssh://git@your-git-host/default/siven.git",
"commitId": "c1dd2aa9a99c4f30821d5c9e4964997c81f9ff28",
"originInventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"type": "YAML",
"color": "RED",
"publishRequired": true,
"_userAuthorization": [
"VIEW_INVENTORY",
"MODIFY_INVENTORY",
"ADMIN_INVENTORY",
"DEPLOY_INVENTORY"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"inventoryKey": {
"type": "string"
},
"tenantKey": {
"type": "string"
},
"branch": {
"type": "string"
},
"path": {
"type": "string"
},
"repository": {
"type": "string"
},
"commitId": {
"type": "string"
},
"originInventoryKey": {
"type": "string"
},
"type": {
"type": "string"
},
"publishRequired": {
"type": "boolean"
},
"_userAuthorization": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"inventoryKey",
"tenantKey",
"type",
"publishRequired",
"_userAuthorization"
]
}
]
}
},
"required": [
"items"
]
}
Create new inventory ¶
Create new inventoryPOST/inventories
The inventory key in the request body has to be all-uppercase. If it’s not, it will be transformed into all-uppercase.
Permissions
- Requires CREATE_INVENTORY the tenant assigned to the inventory that will be created.
Example URI
Headers
Content-Type: application/json
Body
{
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST2",
"tenantKey": "DEFAULT",
"branch": "master",
"path": "INVENTORY-CD-TEST2",
"repository": "ssh://git@your-git-host/default/siven.git",
"type": "YAML",
"publishRequired": false
}
201
Headers
Content-Type: application/json
Body
{
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST2",
"tenantKey": "DEFAULT",
"branch": "master",
"path": "INVENTORY-CD-TEST2",
"repository": "ssh://git@your-git-host/default/siven.git",
"type": "YAML",
"publishRequired": false
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"inventoryKey": {
"type": "string"
},
"tenantKey": {
"type": "string"
},
"branch": {
"type": "string"
},
"path": {
"type": "string"
},
"repository": {
"type": "string"
},
"type": {
"type": "string"
},
"publishRequired": {
"type": "boolean"
}
},
"required": [
"inventoryKey",
"tenantKey",
"type",
"publishRequired"
]
}
Fetch an inventory ¶
Fetch an inventoryGET/inventories/{inventoryKey}
-
If the request header
Content-Type: application/json
, then the response fetches the inventory metadata (key, tenant and type). -
If the request header
Content-Type: application/x-yaml
, then the response fetches the content of the inventory (the yaml file itself).
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
{
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST2",
"tenantKey": "DEFAULT",
"branch": "master",
"path": "INVENTORY-CD-TEST",
"repository": "ssh://git@your-git-host/default/siven.git",
"commitId": "c1dd2aa9a99c4f30821d5c9e4964997c81f9ff28",
"color": "RED",
"type": "YAML",
"publishRequired": false
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"inventoryKey": {
"type": "string"
},
"tenantKey": {
"type": "string"
},
"branch": {
"type": "string"
},
"path": {
"type": "string"
},
"repository": {
"type": "string"
},
"commitId": {
"type": "string"
},
"color": {
"type": "string"
},
"type": {
"type": "string"
},
"publishRequired": {
"type": "boolean"
}
},
"required": [
"inventoryKey",
"tenantKey",
"type",
"publishRequired"
]
}
Fetching the inventory content
Headers
Content-Type: application/x-yaml;charset=utf-8
200
Headers
Content-Type: application/octet-stream
Update inventory ¶
Update inventoryPUT/inventories/{inventoryKey}
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TEST2Key of the inventory.
Headers
Content-Type: application/x-yaml;charset=utf-8
Body
schemaVersion: 1
hosts:
- your-deployment-host1.com:
vars:
__connection_port: 5022
__connection_user: root
__connection_password: password
groups:
- test:
members: [ your-deployment-host1.com ]
- auth:
members: [ your-deployment-host1.com ]
- proxy:
members: [ your-deployment-host1.com ]
200
Headers
Content-Type: application/json
Update deployment restriction of an inventory ¶
Update deployment restriction of an inventoryPATCH/inventories/{inventoryKey}
Setting this value to true will enforce to publish all the local changes (both, on the project and the inventory) to be able to execute the deployment. If the selected project and/or inventory have local changes pending to be published, the deployment will fail at generation of the deployment plan (PUT /deployments/{deploymentId}/plan{?scan}).
Permissions
- Requires ADMIN_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TEST2Key of the inventory.
Headers
Content-Type: application/json
Body
{
"publishRequired": true
}
200
Headers
Content-Type: application/json
Body
{
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST2",
"tenantKey": "DEFAULT",
"type": "YAML",
"publishRequired": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"inventoryKey": {
"type": "string"
},
"tenantKey": {
"type": "string"
},
"type": {
"type": "string"
},
"publishRequired": {
"type": "boolean"
}
},
"required": [
"inventoryKey",
"tenantKey",
"type",
"publishRequired"
]
}
Connect inventory to Git ¶
Connect inventory to GitPATCH/inventories/{inventoryKey}
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TEST2Key of the inventory.
Headers
Content-Type: application/json
Body
{
"branch": "master",
"path": "INVENTORY-CD-TEST2",
"repository": "ssh://git@your-git-host/default/siven.git"
}
200
Headers
Content-Type: application/json
Body
{
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST2",
"tenantKey": "DEFAULT",
"branch": "master",
"path": "INVENTORY-CD-TEST2",
"repository": "ssh://git@your-git-host/default/siven.git",
"type": "YAML",
"publishRequired": false
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"inventoryKey": {
"type": "string"
},
"tenantKey": {
"type": "string"
},
"branch": {
"type": "string"
},
"path": {
"type": "string"
},
"repository": {
"type": "string"
},
"type": {
"type": "string"
},
"publishRequired": {
"type": "boolean"
}
},
"required": [
"inventoryKey",
"tenantKey",
"type",
"publishRequired"
]
}
Delete an inventory ¶
Delete an inventoryDELETE/inventories/{inventoryKey}
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TEST2Key of the inventory.
200
Headers
Content-Type: application/json
Fetch hosts of an inventory ¶
Fetch hosts of an inventoryGET/inventories/{inventoryKey}/hosts
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey’} or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
200
Headers
Content-Type: application/json
Body
{
"items": [
"your-deployment-host1.com",
"your-deployment-host2.com",
"your-deployment-host3.com"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "string"
}
]
}
},
"required": [
"items"
]
}
Fetch groups of an inventory ¶
Fetch groups of an inventoryGET/inventories/{inventoryKey}/groups
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
200
Headers
Content-Type: application/json
Body
{
"items": [
"auth",
"proxy",
"test"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "string"
}
]
}
},
"required": [
"items"
]
}
List of inventories using a variable ¶
List of inventories using a variableGET/inventories/variables/{variableKey}{?tenantKey}
It gets a list of all the inventories that are using the variable set in the URL. The response also fetches the different values the variable is assigned per hosts, groups and vars in each inventory. Optionally, the response can be filtered by tenantKey.
Permissions
- No permissions required, but the response list will only return inventories where the user has VIEW_INVENTORY permission.
Example URI
- variableKey
string
(required) Example: back_end_addressesKey of the variable.
- tenantKey
string
(optional) Example: DEFAULTKey of the tenant.
200
Headers
Content-Type: application/json
Body
{
"variableKey": "back_end_addresses",
"inventories": [
{
"inventoryKey": "SIVEN-INVENTORY-DEV",
"schemaType": "CLASSIC",
"hosts": {
"g.host.com": "http://siven.app1.dev.org:8081",
"another.host.com": "http://siven.app2.dev.org:8084"
},
"groups": {
"line_active": "http://siven.app1.dev.org:8085",
"line_standby": "http://siven.app2.dev.org:8088"
},
"vars": "http://siven.app1.dev.org:8081"
},
{
"inventoryKey": "SIVEN-INVENTORY-TEST",
"color": "Red",
"schemaType": "CLASSIC",
"hosts": {
"g.host.com": "http://siven.app1.test.org:8081",
"another.host.com": "http://siven.app2.test.org:8084"
},
"vars": [
"http://siven.app1.org:8081",
"http://siven.app2.org:8084"
]
},
{
"inventoryKey": "SIVEN-INVENTORY-K8S",
"color": "Red",
"schemaType": "KUBERNETES",
"hosts": {
"g.host.com": "http://siven.app1.org:8081",
"another.host.com": "http://siven.app2.org:8084"
},
"vars": {
"scheme": "http",
"hostname": "siven.app1.test.org",
"port": "8081"
}
}
]
}
Validate inventory content ¶
Validate inventory contentPUT/inventories/{inventoryKey}/validation
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
Headers
Content-Type: application/x-yaml
Body
"CONTENT OF THE INVENTORY"
200
Headers
Content-Type: application/json
Body
{
"_status": {
"_errors": [],
"_warnings": [
{
"type": "about:blank",
"title": "issue.code.inventory.syntax.violation",
"detail": "unable to parse YAML inventory",
"sources": [
{
"INVENTORY": "DEFAULT-INVENTORY-CD-TEST"
}
],
"invalid-params": [
{}
]
},
{
"type": "about:blank",
"title": "issue.code.inventory.syntax.violation",
"detail": "Syntax error: expected <block end>, but found Scalar. Line: 19, Column 2",
"sources": [
{
"LINE_NUMBER": "18",
"COLUMN_NUMBER": "1",
"CONTENT_BUFFER": " a\n ^"
}
],
"invalid-params": [
{}
]
}
]
}
}
Export inventory to Zip file ¶
Export inventory to Zip fileGET/inventories/{inventoryKey}/file-export
It will export a .zip file with the current data of the specified inventory. The .zip file will contain the following:
-
export.yml: It contains the version used and the timestamp of the export.
-
inventory.yml: It contains the exported inventory data in a YAML file.
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
200
Headers
Content-Type: application/zip
Content-Disposition: attachment; filename="inventory_INVENTORY-CD-TEST_20190131T144749.zip"
Content-Length: 1817
Import inventory from Zip file ¶
Import inventory from Zip filePOST/inventories/file-import{?inventoryKey}
Creates a new inventory or overwrites an existing one, with the inventory data imported on a .zip file.
-
If the inventory set in the URL already exists, that inventory will be overwritten with the content of the file sent.
-
If the inventory set in the URL does not exist, a new inventory will be created with the content of the file sent.
-
If the tenant key set for the inventory does not exist, an error will be sent, code “400 Bad request”, with the details of the error.
If the call was successful the response code will be ‘202 Accepted’ and the ‘Location’ header will point to the job that will execute the import. Getting that job will allow you to know the progress and status of the import.
Permissions
-
To import as a new inventory: Requires CREATE_INVENTORY on the tenant assigned to the inventory that will be created.
-
To import on existing inventory: requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory. Has to be all-uppercase. If it’s not, it will be transformed into all-uppercase.
Headers
Content-Type: multipart/form-data; boundary=CUSTOM-BOUNDARY
Content-Length: 1856492
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="inventory"; filename="inventory_INVENTORY-CD-TEST_20190131T144749.zip"
Content-Type: application/x-zip-compressed
Content of inventory_INVENTORY-CD-TEST_20190131T144749.zip
--CUSTOM-BOUNDARY--
202
Headers
Content-Type: application/json
Location: /jobs/030ea3ab67924778165b8d8b
Get inventory HEAD content ¶
Get inventory HEAD contentGET/inventories/{inventoryKey}/head
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
Headers
Content-Type: application/x-yaml;charset=utf-8
200
Body
schemaVersion: 1
hosts:
- your-deployment-host1.com:
vars:
__connection_port: 5022
__connection_user: root
__connection_password: password
groups:
- test:
members: [ your-deployment-host1.com ]
- auth:
members: [ your-deployment-host1.com ]
- proxy:
members: [ your-deployment-host1.com ]
Update inventory data from repository ¶
Update inventory data from repositoryPUT/inventories/{inventoryKey}/revision-update{?sequential,force}
Updates the inventory sent in the URL with the changes stored in the remote repository.
If the call was successful the response code will be ‘202 Accepted’ and the ‘Location’ header will point to the job that will execute the update. Getting that job will allow you to know the progress and status of the update.
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
- sequential
boolean
(optional) Example: trueIf true: processes remote commits one-by-one. If set to false then updates directly to the head. (default=false).
- force
boolean
(optional) Example: truedefines what happens if the git history is tampered. False: error, True: reimport the inventory (default=false).
202
Headers
Content-Type: application/json
Location: /jobs/ac9e5a33347d33220bb9d03b
Import inventory from repository ¶
Import inventory from repositoryPOST/inventories/revision-import
Imports the inventory sent in the request with the changes stored in the remote repository.
If the call was successful the response code will be ‘202 Accepted’ and the ‘Location’ header will point to the job that will execute the import. Getting that job will allow you to know the progress and status of the import.
The inventory key in the request body has to be all-uppercase. If it’s not, it will be transformed into all-uppercase.
Permissions
- Requires CREATE_INVENTORY the tenant assigned to the inventory that will be imported.
Example URI
Headers
Content-Type: application/json
Body
{
"inventoryKey": "DEFAULT-INVENTORY-CD-IMPORTED",
"tenantKey": "DEFAULT",
"branch": "master",
"path": "INVENTORY-CD-TEST2",
"repository": "ssh://git@your-git-host/default/siven.git",
"type": "YAML",
"publishRequired": false
}
202
Headers
Content-Type: application/json
Location: /jobs/ac9e5a33347d33220bb9d03b
Import inventory revision from repository ¶
Import inventory revision from repositoryPOST/inventories/{inventoryKey}/revision-import/{commitId}
Imports a specific revision of the inventory stored in the remote repository.
Request body is empty, but to be able to import a specific revision, the original inventory (set on the URL) must already exist.
The imported inventory will have the same key as the original inventory with a suffix based on the imported commitId (e.g. DEFAULT-INVENTORY-CD-TEST:A1F6635).
The imported inventory will be read-only.
If the call was successful the response code will be ‘202 Accepted’ and the ‘Location’ header will point to the job that will execute the import. Getting that job will allow you to know the progress and status of the import.
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
- commitId
string
(required) Example: 4fe5e3ceaf702af6eb5220252e677a079c586e4dCommit id of the revision.
Headers
Content-Type: application/json
Body
{}
202
Headers
Content-Type: application/json
Location: /jobs/ac9e5a33347d33220bb9d03b
Deployment history of the inventory ¶
Deployment history of the inventoryGET/inventories/{inventoryKey}/deployment-history
Returns a list of the past deployments done to an inventory.
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"deploymentHistoryId": 3,
"projectKey": "DEFAULT-SIVEN-MASTER",
"projectCommitId": "4fe5e3ceaf702af6eb5220252e677a079c586e4d",
"projectDeleted": false,
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"inventoryCommitId": "d59a5dd113221773386b608066c7bbfdee9e0c55",
"userKey": "admin",
"timestamp": "2020-11-09T12:18:53.283Z",
"deploymentState": "PROMOTED",
"canaryRouting": {
"header": "canary",
"cookie": "canary"
},
"postfix": "-v11",
"namespace": "test-namespace",
"tag": "r-c4fa0d390583d05cd1606ef3718a1caac23f5085",
"deploymentTargets": [
"proxy",
"auth",
"login"
],
"actions": [
{
"userKey": "admin",
"timestamp": "2020-11-09T12:18:53.283Z",
"action": "PROMOTE"
},
{
"userKey": "admin",
"timestamp": "2020-11-09T12:08:24.728Z",
"action": "DEPLOY",
"comment": "deploy as secondary"
}
],
"jobStatus": "DONE"
},
{
"deploymentHistoryId": 2,
"projectKey": "DEFAULT-SIVEN-MASTER",
"projectCommitId": "4fe5e3ceaf702af6eb5220252e677a079c586e4d",
"projectDeleted": false,
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"inventoryCommitId": "d59a5dd113221773386b608066c7bbfdee9e0c55",
"userKey": "admin",
"timestamp": "2019-05-03T12:14:17.28Z",
"jobStatus": "DONE"
},
{
"deploymentHistoryId": 1,
"projectKey": "DEFAULT-ERROR-MASTER",
"projectCommitId": "78aadd11448db4a00a44419d5d798efaa3b27f30",
"projectDeleted": true,
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"inventoryCommitId": "3bd241da3eebb32e4c17cc500fc1fd52382aa5d8",
"userKey": "admin",
"timestamp": "2019-05-02T10:41:37.511Z",
"jobStatus": "FAILED"
}
]
}
Delete Kubernetes deployment ¶
Delete Kubernetes deploymentPOST/inventories/{inventoryKey}/deployment-history/{deploymentHistoryId}/delete
Deletes the Kubernetes deployment that corresponds to the given history entry.
Permissions
- Requires DEPLOY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-CLOUDKey of the inventory.
- deploymentHistoryId
string
(required) Example: 2Id of the deployment history
Headers
Content-Type: application/json
Body
{
"comment": "Deletion comment"
}
200
Headers
Content-Type: application/json
Promote canary deployments ¶
Promote canary deploymentsPUT/inventories/{inventoryKey}/promote
Promote the canary deployments to primary.
Permissions
- Requires DEPLOY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-CLOUDKey of the inventory.
Headers
Content-Type: application/json
Body
{
"comment": "Promote comment"
}
200
Headers
Content-Type: application/json
Rollback canary deployments ¶
Rollback canary deploymentsPUT/inventories/{inventoryKey}/rollback
Rollback the canary deployments.
Permissions
- Requires DEPLOY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-CLOUDKey of the inventory.
Headers
Content-Type: application/json
Body
{
"comment": "Rollback comment"
}
200
Headers
Content-Type: application/json
Get log of a pod ¶
Get log of a podGET/inventories/{inventoryKey}/pods/{podKey}/log{?container,sinceSeconds,tailLines,namespace}
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-SIVENKey of the inventory.
- podKey
string
(required) Example: proxy-7c87945b4b-52gqnThe name of the pod.
- container
string
(optional) Example: nevisproxyThe name of the container.
- sinceSeconds
number
(optional) Example: 60A relative time in seconds before the current time from which to show logs.
- tailLines
number
(optional) Example: 100The number of lines from the end of the logs to show.
- namespace
string
(optional) Example: componentThe namespace of the pod. Defaults to the namespace specified in the inventory.
200
Headers
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=proxy-7c87945b4b-52gqn.log
List of the Custom Resources ¶
List of the Custom ResourcesGET/inventories/{inventoryKey}/custom-resources{?projectKey}
Returns the list of custom resources available in the Kubernetes namespace defined in the given inventory.
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-CLOUDKey of the inventory.
- projectKey
string
(optional) Example: DEFAULT-CLOUDKey of the project which to filter for.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"customResourceKey": "NevisDatabase_proxy-v19",
"label": "proxy-v19: proxy-v19 (NevisDatabase)",
"kind": "NevisDatabase",
"name": "proxy-v19",
"deploymentTarget": "proxy-v19",
"state": "primary",
"projectKey": "DEFAULT-CLOUD"
},
{
"customResourceKey": "NevisDatabase_proxy-v20",
"label": "proxy-v20: proxy-v20 (NevisDatabase)",
"kind": "NevisDatabase",
"name": "proxy-v20",
"deploymentTarget": "proxy-v20",
"state": "canary",
"projectKey": "DEFAULT-CLOUD"
},
{
"customResourceKey": "NevisComponent_proxy-v19",
"label": "proxy-v19: proxy-v19 (NevisComponent)",
"kind": "NevisComponent",
"name": "proxy-v19",
"deploymentTarget": "proxy-v19",
"state": "primary",
"projectKey": "DEFAULT-CLOUD"
},
{
"customResourceKey": "NevisComponent_proxy-v20",
"label": "proxy-v20: proxy-v20 (NevisComponent)",
"kind": "NevisComponent",
"name": "proxy-v20",
"deploymentTarget": "proxy-v20",
"state": "canary",
"projectKey": "DEFAULT-CLOUD"
},
{
"customResourceKey": "NevisKeyStore_proxy-v19-a746982f1d932756f134d771",
"label": "proxy-v19: proxy-v19-a746982f1d932756f134d771 (NevisKeyStore)",
"kind": "NevisKeyStore",
"name": "proxy-v19-a746982f1d932756f134d771",
"deploymentTarget": "proxy-v19",
"state": "primary",
"projectKey": "DEFAULT-CLOUD"
},
{
"customResourceKey": "NevisKeyStore_proxy-v20-a746982f1d932756f134d771",
"label": "proxy-v20: proxy-v20-a746982f1d932756f134d771 (NevisKeyStore)",
"kind": "NevisKeyStore",
"name": "proxy-v20-a746982f1d932756f134d771",
"deploymentTarget": "proxy-v20",
"state": "canary",
"projectKey": "DEFAULT-CLOUD"
},
{
"customResourceKey": "NevisIngress_proxy-v19",
"label": "proxy-v19: proxy-v19 (NevisIngress)",
"kind": "NevisIngress",
"name": "proxy-v19",
"deploymentTarget": "proxy-v19",
"state": "primary",
"projectKey": "DEFAULT-CLOUD"
},
{
"customResourceKey": "NevisIngress_proxy-v20",
"label": "proxy-v20: proxy-v20 (NevisIngress)",
"kind": "NevisIngress",
"name": "proxy-v20",
"deploymentTarget": "proxy-v20",
"state": "canary",
"projectKey": "DEFAULT-CLOUD"
}
]
}
List of the Services ¶
List of the ServicesGET/inventories/{inventoryKey}/services{?serviceKeys,type}
Returns the list of services available on the Kubernetes cluster specified by the inventory.
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-CLOUDKey of the inventory.
- serviceKeys
string
(required) Example: `idmv11,login-v11’ (optional, array[string]) - Keys of the services which to filter for.
- type
string
(optional) Example: `OPERATOR'The type of services to list. Values: ‘COMPONENT’, 'OPERATOR. Defaults to ‘COMPONENT’.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"serviceKey": "idm-v11",
"status": "Stable",
"pods": [
{
"podKey": "idm-v11-657775658d-j69z2",
"namespace": "component",
"image": "aks.azurecr.io/nevis/nevisidm:4.0",
"status": "Running",
"phase": "Running",
"ready": true,
"containers": [
"nevisidm",
"git-init",
"db-wait"
],
"creationTimestamp": "2021-03-12T09:04:49Z"
},
{
"podKey": "idm-v11-migration-brdqg",
"namespace": "component",
"image": "aks.azurecr.io/nevis/nevisidm:4.0",
"status": "Completed",
"phase": "Succeeded",
"ready": false,
"containers": [
"schema-init"
],
"creationTimestamp": "2021-03-12T09:04:49Z"
},
{
"podKey": "idm-v11-migration-ml2fm",
"namespace": "component",
"image": "aks.azurecr.io/nevis/nevisidm-dbschema:4.0",
"status": "Completed",
"phase": "Succeeded",
"ready": false,
"containers": [
"schema-init"
],
"creationTimestamp": "2021-03-01T10:26:23Z"
}
]
},
{
"serviceKey": "login-v11",
"status": "Unknown",
"pods": [
{
"podKey": "login-v11-5c76fbbdf-7gvbw",
"namespace": "component",
"image": "aks.azurecr.io/nevis/nevislogrend:4.0",
"status": "ImagePullBackOff",
"phase": "Pending",
"ready": false,
"containers": [
"nevislogrend",
"git-init"
],
"creationTimestamp": "2021-03-11T15:39:39Z"
}
]
}
]
}
Get Custom Resource content ¶
Get Custom Resource contentGET/inventories/{inventoryKey}/custom-resources/{customResourceKey}{?mode}
Returns the custom resource content in yaml format.
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-CLOUDKey of the inventory.
- customResourceKey
string
(required) Example: NevisComponent_proxy-v20Key of the custom resource.
- mode
string
(optional) Example: `PROMOTE'In which mode to show the content, to reflect the state after the promotion or rollback is done. Values: ‘PROMOTE’, 'ROLLBACK.
Headers
Content-Type: application/x-yaml;charset=utf-8
200
Body
apiVersion: "operator.nevis-security.ch/v1"
kind: "NevisComponent"
metadata:
annotations:
patternId: "00d6ee63cd07feac46cc9b93"
projectKey: "DEFAULT-CLOUD-SIMPLE"
creationTimestamp: "2020-11-06T12:11:24Z"
generation: 5
labels:
deploymentTarget: "proxy-v20"
name: "proxy-v20"
namespace: "example"
resourceVersion: "28802439"
selfLink: "/apis/operator.nevis-security.ch/v1/namespaces/example/neviscomponents/proxy-v20"
uid: "b7394fa7-a192-4438-a601-b7fe07495870"
spec:
database:
name: "proxy-v20"
requiredVersion: "0.1"
git:
credentials: "git-credentials"
dir: "DEFAULT-CLOUD-SIMPLE/DEFAULT-CLOUD/proxy-v20"
tag: "r-6171fb115d086f1dbbb07ce1a00f54ab6b502a7f"
keystores:
- "proxy-v20-a746982f1d932756f134d771"
livenessProbe:
https:
httpGet:
path: "/liveness"
scheme: "HTTPS"
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 4
ports:
https: 8443
readinessProbe:
https:
httpGet:
path: "/readiness"
scheme: "HTTPS"
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 4
replicas: 1
resources:
limits:
cpu: "1000m"
memory: "1000Mi"
requests:
cpu: "20m"
memory: "100Mi"
truststores: []
type: "NevisProxy"
version: "4.2"
status:
conditions:
- lastTransitionTime: "2020-11-06T12:12:34Z"
message: "Deployment proxy-v20 has at least minimum availability"
status: "False"
type: "Unavailable"
- lastTransitionTime: "2020-11-09T12:58:49Z"
message: "All replicas up-to-date (total: 1)"
status: "False"
type: "OutOfDate"
- lastTransitionTime: "2020-11-06T12:11:29Z"
message: "At least one pod is ready"
status: "False"
type: "DeployError"
deployedGitTag: "r-6171fb115d086f1dbbb07ce1a00f54ab6b502a7f"
Get Host Status list ¶
Get Host Status listGET/inventories/{inventoryKey}/host-status
Returns the host status with a detailed list of the instances deployed on the host.
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
Headers
Content-Type: application/json
200
Body
{
"items": [
{
"host": "nevis.net",
"connection": "UP",
"instances": [
{
"status": "active",
"component": "nevisproxy",
"instance": "Test_Proxy",
"projectKey": "DEFAULT-SIVEN-MASTER",
"patternId": "d3f51b1fcbd3eaf433588645",
"actions": [
"STOP",
"RESTART"
]
},
{
"status": "active",
"component": "nevisauth",
"instance": "Test_Auth",
"projectKey": "DEFAULT-SIVEN-MASTER",
"patternId": "b83aacda64dc0acfad2fb5d6",
"actions": [
"STOP",
"RESTART"
]
},
{
"status": "active",
"component": "nevislogrend",
"instance": "default",
"projectKey": "DEFAULT-SIVEN-MASTER",
"actions": [
"STOP",
"RESTART"
]
}
]
},
{
"host": "example.com",
"connection": "DOWN"
}
]
}
Execute instance action ¶
Execute instance actionPUT/inventories/{inventoryKey}/host-status/{host}/actions/{action}
Execute an action on a Nevis component instance.
Permissions
- Requires DEPLOY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- host
string
(required) Example: nevis.netHost name.
- action
string
(required) Example: startThe action to execute. Possible values: start|stop|restart (case-insensitive).
Headers
Content-Type: application/json
Body
{
"component": "nevisauth",
"instance": "Test_Auth"
}
202
Get inventory timestamp ¶
Get inventory timestampGET/inventories/{inventoryKey}/timestamp
Returns the timestamp for when the inventory was last modified.
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
{
"timestamp": "2021-03-10T10:44:05.006749Z"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"timestamp": {
"type": "string"
}
}
}
Inventory Secret ¶
List secrets ¶
List secretsGET/inventories/{inventoryKey}/secrets{?usedIn,includeTenant}
Get the list of inventory secrets.
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- usedIn
boolean
(optional) Example: trueif false, the computation of the usedIn field in the resulting beans will be skipped. Default: false
- includeTenant
boolean
(optional) Example: trueif true, the results will also contain the secrets scoped to the tenant of the inventory. Default: false
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"secretId": "6b57bc535c5475101a8b9be2",
"description": "example description",
"scope": "DEFAULT-INVENTORY",
"usedIn": [
"DEFAULT-INVENTORY"
]
},
{
"secretId": "d88fc9762338df82d5f655c5",
"description": "an other example description",
"scope": "DEFAULT-INVENTORY",
"usedIn": [
"DEFAULT-INVENTORY"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"secretId": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
},
"usedIn": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"secretId",
"scope"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create secret ¶
Create secretPOST/inventories/{inventoryKey}/secrets
Create a new inventory secret. If the secret id is left unspecified, a random id will be generated.
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
Headers
Content-Type: application/json
Body
{
"value": "my secret value",
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"value": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"value"
]
}
201
Headers
Content-Type: application/json
Body
{
"secretId": "d88fc9762338df82d5f655c5",
"description": "example description",
"scope": "DEFAULT-INVENTORY"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretId": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretId"
]
}
Headers
Content-Type: application/json
Body
{
"secretId": "0123456789abcdef01234567"
"value": "my secret value",
"description": "example description"
}
Schema
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"secretId":{
"type":"string"
}
"value":{
"type":"string"
}
"description":{
"type":"string"
}
},
"additionalProperties":false,
"required":[
"value"
]
}
201
Headers
Content-Type: application/json
Body
{
"secretId": "0123456789abcdef01234567",
"description": "example description",
"scope": "DEFAULT-INVENTORY"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretId": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretId"
]
}
Get secret ¶
Get secretGET/inventories/{inventoryKey}/secrets/{secretId}
Get the content of an inventory secret.
Permissions
- Requires VIEW_SECRET_CONTENT_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- secretId
string
(required) Example: 123456789012345678901234Id of the secret.
200
Headers
Content-Type: application/octet-stream
Body
{
"secretId": "d88fc9762338df82d5f655c5",
"value": "my secret value",
"description": "example description",
"scope": "DEFAULT-INVENTORY"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretId": {
"type": "string"
},
"value": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretId"
]
}
Update secret ¶
Update secretPUT/inventories/{inventoryKey}/secrets/{secretId}
Update the value and description of an existing inventory secret.
Limitations and known issues
- Rollback deployment will use the new secret value.
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- secretId
string
(required) Example: 123456789012345678901234Id of the secret.
Headers
Content-Type: application/json
Body
{
"value": "mysecret",
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"value": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"value"
]
}
200
Headers
Content-Type: application/json
Body
{
"secretId": "123456789012345678901234",
"description": "example description",
"scope": "DEFAULT-INVENTORY"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretId": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretId"
]
}
Delete secret ¶
Delete secretDELETE/inventories/{inventoryKey}/secrets/{secretId}
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- secretId
string
(required) Example: d88fc9762338df82d5f655c5Id of the secret.
200
Headers
Content-Type: application/json
Patch secret ¶
Patch secretPATCH/inventories/{inventoryKey}/secrets/{secretId}
Update the description or scope of an existing secret.
Permissions
-
Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
-
Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ also, if the scope of the secret is to be changed to the tenant.
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- secretId
string
(required) Example: d88fc9762338df82d5f655c5Id of the secret.
Headers
Content-Type: application/json
Body
{
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": []
}
200
Headers
Content-Type: application/json
Inventory Secret Resource ¶
List secret resources ¶
List secret resourcesGET/inventories/{inventoryKey}/secret-resources{?usedIn,includeTenant}
Get the list of inventory secret resources (files)
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- usedIn
boolean
(optional) Example: trueif false, the computation of the usedIn field in the resulting beans will be skipped. Default: false
- includeTenant
boolean
(optional) Example: trueif true, the results will also contain the secret resources (files) scoped to the tenant of the inventory. Default: false
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"secretResourceId": "616d655b55c8fdfb7ad893e5",
"secretResourceName": "secret-attachment.txt",
"description": "example description",
"scope": "DEFAULT-INVENTORY",
"usedIn": [
"DEFAULT-INVENTORY"
]
},
{
"secretResourceId": "bv4q4gf5xqjg45q4b5vq4v5q",
"secretResourceName": "secret-things.xml",
"description": "an other example description",
"scope": "DEFAULT-INVENTORY",
"usedIn": [
"DEFAULT-INVENTORY"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"secretResourceId": {
"type": "string"
},
"secretResourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
},
"usedIn": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"secretResourceId",
"secretResourceName",
"scope"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create secret resource ¶
Create secret resourcePOST/inventories/{inventoryKey}/secret-resources
Create a new inventory secret resource (file). If the id of the secret resource is left unspecified, a random id will be generated.
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="resource"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Example description for the secret resource
--CUSTOM-BOUNDARY-
201
Headers
Content-Type: application/json
Body
{
"secretResourceId": "9bb3080530791e46c6169a76",
"secretResourceName": "test-bundle-1.0.1.jar",
"description": "Example description for the secret resource",
"scope": "DEFAULT-INVENTORY"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretResourceId": {
"type": "string"
},
"secretResourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretResourceId",
"secretResourceName",
"scope"
]
}
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="resource"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Example description for the secret resource
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="secretResourceId"
0123456789abcdef01234567
--CUSTOM-BOUNDARY--
201
Headers
Content-Type: application/json
Body
{
"secretResourceId": "0123456789abcdef01234567",
"secretResourceName": "test-bundle-1.0.1.jar",
"description": "Example description for the secret resource",
"scope": "DEFAULT-INVENTORY"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretResourceId": {
"type": "string"
},
"secretResourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretResourceId",
"secretResourceName",
"scope"
]
}
Get secret resource ¶
Get secret resourceGET/inventories/{inventoryKey}/secret-resources/{secretResourceId}
Get the content of an inventory secret resource (file).
Permissions
- Requires VIEW_SECRET_CONTENT_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- secretResourceId
string
(required) Example: 123456789012345678901234Id of the secret resource.
200
Headers
Content-Type: application/octet-stream
Update secret resource ¶
Update secret resourcePUT/inventories/{inventoryKey}/secret-resources/{secretResourceId}
Update the content of an inventory secret resource (file).
Limitations and known issues
-
Rollback deployment will use the new secret value.
-
Upload with a new file name won’t update the reference in the inventory. The file name will be out-dated in 'inv-res-secret://
# '.
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- secretResourceId
string
(required) Example: 123456789012345678901234Id of the secret resource.
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="bundle"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Example description for the secret resource
--CUSTOM-BOUNDARY-
200
Headers
Content-Type: application/json
Body
{
"secretResourceId": "9bb3080530791e46c6169a76",
"secretResourceName": "test-bundle-1.0.1.jar",
"description": "Example description for the secret resource",
"scope": "DEFAULT-INVENTORY"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretResourceId": {
"type": "string"
},
"secretResourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretResourceId",
"secretResourceName",
"scope"
]
}
Delete secret resource ¶
Delete secret resourceDELETE/inventories/{inventoryKey}/secret-resources/{secretResourceId}
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- secretResourceId
string
(required) Example: d88fc9762338df82d5f655c5Id of the secret resource.
200
Headers
Content-Type: application/json
Patch secret resource ¶
Patch secret resourcePATCH/inventories/{inventoryKey}/secret-resources/{secretResourceId}
Update the description or scope of an existing secret resource.
Permissions
-
Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
-
Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ also, if the scope of the secret resource is to be changed to the tenant.
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- secretResourceId
string
(required) Example: d88fc9762338df82d5f655c5Id of the secret resource.
Headers
Content-Type: application/json
Body
{
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": []
}
200
Headers
Content-Type: application/json
Inventory Resource ¶
List resources ¶
List resourcesGET/inventories/{inventoryKey}/resources{?usedIn,includeTenant}
Get the list of inventory resources (files)
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- usedIn
boolean
(optional) Example: trueif false, the computation of the usedIn field in the resulting beans will be skipped. Default: false
- includeTenant
boolean
(optional) Example: trueif true, the results will also contain the resources (files) scoped to the tenant of the inventory. Default: false
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"resourceId": "616d655b55c8fdfb7ad893e5f934bb9e",
"resourceName": "attachment.txt",
"description": "example description",
"scope": "DEFAULT-INVENTORY",
"usedIn": [
"DEFAULT-INVENTORY"
]
},
{
"resourceId": "bv4q4gf5xqjg45q4b5vq4v5q4hqh45gq",
"resourceName": "things.xml",
"description": "an other example description",
"scope": "DEFAULT-INVENTORY",
"usedIn": [
"DEFAULT-INVENTORY"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"resourceId": {
"type": "string"
},
"resourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
},
"usedIn": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"resourceId",
"resourceName",
"scope"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create resource ¶
Create resourcePOST/inventories/{inventoryKey}/resources
Create a new inventory resource (file). If the resource id is left unspecified, a random id will be generated.
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="resource"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Example description for the resource
--CUSTOM-BOUNDARY--
201
Headers
Content-Type: application/json
Body
{
"resourceId": "6b4c0af5d851e8f1798bb521e305f9ab",
"resourceName": "test-bundle-1.0.1.jar",
"description": "Example description for the resource",
"scope": "DEFAULT-INVENTORY"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"resourceId": {
"type": "string"
},
"resourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"resourceId",
"resourceName",
"scope"
]
}
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="resource"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Example description for the resource
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="resourceId"
0123456789abcdef0123456789abcdef
--CUSTOM-BOUNDARY--
201
Headers
Content-Type: application/json
Body
{
"resourceId": "0123456789abcdef0123456789abcdef",
"resourceName": "test-bundle-1.0.1.jar",
"description": "Example description for the resource",
"scope": "DEFAULT-INVENTORY"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"resourceId": {
"type": "string"
},
"resourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"resourceId",
"resourceName",
"scope"
]
}
Get resource ¶
Get resourceGET/inventories/{inventoryKey}/resources/{resourceId}
Get the content of an inventory resource (file).
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey’} or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- resourceId
string
(required) Example: 12345678901234567890123456789012Id of the resource.
200
Headers
Content-Type: application/octet-stream
Update resource ¶
Update resourcePUT/inventories/{inventoryKey}/resources/{resourceId}
Update an existing inventory resource (file).
Limitations and known issues
-
Rollback deployment will use the new resource (file) value.
-
Upload with a new file name won’t update the reference in the inventory. The file name will be out-dated in 'inv-res://
# '.
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- resourceId
string
(required) Example: 6b4c0af5d851e8f1798bb521e305f9abId of the resource.
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="resource"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Updated description
--CUSTOM-BOUNDARY--
200
Headers
Content-Type: application/json
Body
{
"resourceId": "6b4c0af5d851e8f1798bb521e305f9ab",
"resourceName": "test-bundle-1.0.1.jar",
"description": "Updated description",
"scope": "DEFAULT-INVENTORY"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"resourceId": {
"type": "string"
},
"resourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"resourceId",
"resourceName",
"scope"
]
}
Delete resource ¶
Delete resourceDELETE/inventories/{inventoryKey}/resources/{resourceId}
Permissions
- Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- resourceId
string
(required) Example: 616d655b55c8fdfb7ad893e5f934bb9eId of the resource.
200
Headers
Content-Type: application/json
Patch resource ¶
Patch resourcePATCH/inventories/{inventoryKey}/resources/{resourceId}
Update the description or scope of an existing resource.
Permissions
-
Requires MODIFY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
-
Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ also, if the scope of the resource is to be changed to the tenant.
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- resourceId
string
(required) Example: 616d655b55c8fdfb7ad893e5f934bb9eId of the resource.
Headers
Content-Type: application/json
Body
{
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": []
}
200
Headers
Content-Type: application/json
Inventory Certificate ¶
List certificates ¶
List certificatesGET/inventories/{inventoryKey}/certificates{?usedIn,includeTenant}
List certificates (.pem) uploaded as resource or secret-resource.
Permissions
- Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORYKey of the inventory.
- usedIn
boolean
(optional) Example: trueif false, the computation of the usedIn field in the resulting beans will be skipped. Default: false
- includeTenant
boolean
(optional) Example: trueif true, the results will also contain the certificates scoped to the tenant of the inventory. Default: false
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"source": "inv-res-secret://8a21f53e96f27fe9377714c6#cert.pem",
"id": "8a21f53e96f27fe9377714c6",
"fileName": "cert.pem",
"description": "example description",
"scope": "DEFAULT-INVENTORY",
"usedIn": [
"DEFAULT-INVENTORY"
],
"certificates": [
{
"subject": "C=ch,O=Nevis Security AG,CN=Nevis Keybox CA: myCA (nevis.example.net)",
"issuer": "C=ch,O=Nevis Security AG,CN=Nevis Keybox CA: myCA (nevis.example.net)",
"serial": 10058663222486049000,
"expires": "2036-02-16T12:16:15Z"
}
]
},
{
"source": "inv-res://058c34b6c6bd61e4c1b4fa47ce3ec1d1#cert.pem",
"id": "058c34b6c6bd61e4c1b4fa47ce3ec1d1",
"fileName": "cert.pem",
"description": "other example description",
"scope": "DEFAULT-INVENTORY",
"usedIn": [
"DEFAULT-INVENTORY"
],
"certificates": [
{
"subject": "C=ch,O=Nevis Security AG,CN=Nevis Keybox CA: myCA (nevis.example.net)",
"issuer": "C=ch,O=Nevis Security AG,CN=Nevis Keybox CA: myCA (nevis.example.net)",
"serial": 10058663222486049000,
"expires": "2036-02-16T12:16:15Z"
}
]
}
]
}
Deployment ¶
Managing deployment processes.
List all deployment processes ¶
List all deployment processesGET/deployments
Example URI
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"deploymentId": "0b7c2e7ba3a25e28665604fe",
"state": "INITIALIZED",
"projectKey": "DEFAULT-SIVEN-MASTER",
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"hostExpression": "test.host"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"deploymentId": {
"type": "string"
},
"state": {
"type": "string"
},
"projectKey": {
"type": "string"
},
"inventoryKey": {
"type": "string"
},
"hostExpression": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"deploymentId",
"state",
"projectKey",
"inventoryKey",
"hostExpression"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create new deployment process ¶
Create new deployment processPOST/deployments
Simple hostExpression
-
‘*’ - wildcard to generate to all host (default)
-
host (defined in the inventory)
-
group (defined in the inventory)
-
‘pattern://d3f51b1fcbd3eaf433588645’: Generates for all host, but only the provided instance pattern
Complex hostExpression
It’s possible to filter hosts and pattern instances at the same time with a complex hostExpression. The host filter and the pattern instance filter must be separated by ‘;’. The pattern instance list must be separated by ‘,’.
Examples:
-
‘*;pattern://b83aacda64dc0acfad2fb5d6,pattern://d3f51b1fcbd3eaf433588645’
-
‘proxy;pattern://b83aacda64dc0acfad2fb5d6’
-
’portal.nevis.net;pattern://b83aacda64dc0acfad2fb5d6,pattern://d3f51b1fcbd3eaf433588645’
Example URI
Headers
Content-Type: application/json
Body
{
"projectKey": "DEFAULT-SIVEN-MASTER",
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"hostExpression": "test.host2"
}
201
Headers
Content-Type: application/json
Body
{
"deploymentId": "4bf4a251fda824f27ebaa003",
"state": "INITIALIZED",
"projectKey": "DEFAULT-SIVEN-MASTER",
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"hostExpression": "test.host2"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"deploymentId": {
"type": "string"
},
"state": {
"type": "string"
},
"projectKey": {
"type": "string"
},
"inventoryKey": {
"type": "string"
},
"hostExpression": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"deploymentId",
"state",
"projectKey",
"inventoryKey"
]
}
Get a deployment process ¶
Get a deployment processGET/deployments/{deploymentId}
Possible states:
-
“INITIALIZED”: The deployment process has been created and the generation step can be started. Options: start generation
-
“GENERATING”: The generation step has been started and is currently ongoing.
-
“GENERATED”: The generation step has been completed. Options: start generation again or start planning
-
“PLANNING”: The planning step has been started and is ongoing.
-
“PLANNED”: The planning step has been completed. Options: start generation again or start planning again or start deployment
-
“DEPLOYING”: The deploy step has been started and is ongoing.
-
“DEPLOYED”: The deploy has been completed. Options: none
Example URI
- deploymentId
string
(required) Example: 234123sdfwd34ID of the deployment process.
200
Headers
Content-Type: application/json
Body
{
"deploymentId": "4bf4a251fda824f27ebaa003",
"state": "INITIALIZED",
"projectKey": "DEFAULT-SIVEN-MASTER",
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"hostExpression": "test.host2"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"deploymentId": {
"type": "string"
},
"state": {
"type": "string"
},
"projectKey": {
"type": "string"
},
"inventoryKey": {
"type": "string"
},
"hostExpression": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"deploymentId",
"state",
"projectKey",
"inventoryKey",
"hostExpression"
]
}
Delete a deployment process ¶
Delete a deployment processDELETE/deployments/{deploymentId}
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
200
Headers
Content-Type: application/json
Start/repeat generation step ¶
Start/repeat generation stepPUT/deployments/{deploymentId}/generation
-
If the Deployment state is ‘INITIALIZED’, it will start the generation and change the state to ‘GENERATING’. Once it is finished, it will change the state to ‘GENERATED’.
-
If the Deployment state is ‘GENERATED’, the same as above but re-running the generation.
In case the current Deployment state is not ‘INITIALIZED’ or ‘GENERATED’ the response will return a 409 Conflict error code.
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
202
Headers
Content-Type: application/json
Location: /deployments/4bf4a251fda824f27ebaa003/generation
Get status of generation step ¶
Get status of generation stepGET/deployments/{deploymentId}/generation
Fetches the status of the generation of a deployment run. It provides status information about the overall of the generation process and for each pattern-host combo in the generation.
First, all the status start in “PENDING” and as soon as the generation starts they change to “RUNNING”, same for the overall status. As soon as the generation ends the overall status will change to “DONE”. This does not mean that there were no errors during the generation, just that the generation ended. Each pattern-host combo will end with “DONE” or “FAILED” status depending on the success of the generation.
While the generation is at “RUNNING” status, it can be aborted (Abort generation step - DELETE /deployments/{deploymentId}/generation). If so, all the “RUNNING” status (overall included) will change to ‘CANCELLED’.
In case of a Cloud deployment the process is the same but the generation is done by pattern-service combo instead of by pattern-host combo.
Overall possible status:
-
PENDING
-
RUNNING
-
DONE
-
CANCELLED
Item possible status:
-
PENDING
-
RUNNING
-
DONE
-
FAILED
-
CANCELLED
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
200
Headers
Content-Type: application/json
Body
{
"status": "RUNNING",
"items": [
{
"status": "DONE",
"patternId": "345ksd8923",
"host": "g.host.com",
"label": "<deployable pattern name> on <host>",
"progress": "1.0"
},
{
"status": "RUNNING",
"patternId": "3490822",
"host": "g.host.com",
"label": "<deployable pattern name> on <host>",
"progress": "0.4"
},
{
"status": "FAILED",
"patternId": "23412341223",
"host": "g.host.com",
"label": "<deployable pattern name> on <host>",
"progress": "0.6"
},
{
"status": "PENDING",
"patternId": "345ksd8923",
"host": "other.host.com",
"label": "<deployable pattern name> on <host>",
"progress": "0.0"
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"status": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"patternId": {
"type": "string"
},
"host": {
"type": "string"
},
"label": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"status",
"patternId",
"host",
"label"
]
}
}
},
"additionalProperties": false,
"required": [
"status"
]
}
Abort generation step ¶
Abort generation stepDELETE/deployments/{deploymentId}/generation
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
200
Headers
Content-Type: application/json
Get generation issues ¶
Get generation issuesGET/deployments/{deploymentId}/generation/issues
Returns list of issues found in the generation/validation step of the deployment process.
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
200
Headers
Content-Type: application/json
Body
{
"timestamp": "2018-07-13T11:50:48.594Z",
"items": [
{
"code": "PROPERTY_VALIDATION_FAILURE",
"severity": "ERROR",
"message": "At least 1 value(s) are required",
"target": [
{
"sourceType": "PROJECT",
"value": "DEFAULT-EXPERIMENTAL-MASTER"
},
{
"sourceType": "DEPLOYABLE_PATTERN",
"value": "b356d905a1602a53ad5abf07"
},
{
"sourceType": "PATTERN",
"value": "d8b4447ab9fb1fc024a92de8"
},
{
"sourceType": "PROPERTY",
"value": "urls"
},
{
"sourceType": "HOST",
"value": "your-deployment-host1.com"
}
]
},
{
"code": "PROPERTY_VALIDATION_FAILURE",
"severity": "ERROR",
"message": "At least 1 value(s) are required",
"target": [
{
"sourceType": "PROJECT",
"value": "DEFAULT-EXPERIMENTAL-MASTER"
},
{
"sourceType": "DEPLOYABLE_PATTERN",
"value": "b356d905a1602a53ad5abf07"
},
{
"sourceType": "PATTERN",
"value": "d8b4447ab9fb1fc024a92de8"
},
{
"sourceType": "PROPERTY",
"value": "userBaseDN"
},
{
"sourceType": "HOST",
"value": "your-deployment-host1.com"
}
]
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"timestamp": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"severity": {
"type": "string"
},
"message": {
"type": "string"
},
"target": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sourceType": {
"type": "string"
},
"value": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"sourceType",
"value"
]
}
}
},
"additionalProperties": false,
"required": [
"code",
"severity",
"message",
"target"
]
}
}
},
"additionalProperties": false,
"required": [
"timestamp",
"items"
]
}
Get generation output ¶
Get generation outputGET/deployments/{deploymentId}/generation/output{?patternId,host}
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
- patternId
string
(optional) Example: d3f51b1fcbd3eaf433588645ID of deployable pattern for which a generation was done.
- host
string
(optional) Example: g.host.comName of a host or service for which a generation was done.
Classic deployment
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"patternId": "345ksd8923",
"host": "g.host.com",
"triggers": [
{
"triggerId": "123ds34fdf",
"label": "integrity check for Test_Auth-identity",
"command": "sudo -n $'/tmp/delta-deployment/resources/triggers/trigger_integrity_check_for_Test_Auth-identity'",
"patternId": "b83aacda64dc0acfad2fb5d6",
"onFailure": [
"adc668b846f1e3c44a953d62",
"asda24f34rg4t4g4g44fgg"
]
},
{
"triggerId": "er3ds34fdf",
"label": "integrity check for Test_Auth-identity",
"command": "sudo -n $'/tmp/delta-deployment/resources/triggers/trigger_integrity_check_for_Test_Auth-identity'",
"patternId": "d45aacda64dc0acfad2fb5d6",
"onFailure": [
"asd668b846f1e3c44a953d62"
],
"onSuccess": [
"gtr668b846f1e3c44a953d62"
]
}
],
"checks": [
{
"label": "Create directory command (mkdir) exists",
"command": "type mkdir",
"status": "PLANNED",
"errorMessage": ""
}
],
"commands": [
{
"commandId": "489kdch389",
"command": "sudo service restart nevisproxy@myInstance",
"patternId": "b34aacda64dc0acfad2fb5d6",
"label": "restart nevisproxy instance 'myInstance'",
"phase": "CONFIGURE",
"conditions": [
"89234jr987",
"23409wej937"
]
}
],
"directories": [
{
"directoryId": "349sdrg345",
"patternId": "b83aacda64dc0acfad2fb5d6",
"path": "/var/opt/nevisproxy/myInstance",
"phase": "CONFIGURE",
"deleteUnmanagedFiles": false,
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"onChange": []
},
{
"directoryId": "945ttrg365",
"patternId": "b83aacda64dc0acfad2fb5d6",
"parentId": "349sdrg345",
"path": "/var/opt/nevisproxy/myInstance/conf",
"phase": "CONFIGURE",
"deleteUnmanagedFiles": true,
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"onChange": [
"489kdch389"
]
}
],
"files": [
{
"fileId": "23409wej937",
"parentId": "945ttrg365",
"patternId": "b83aacda64dc0acfad2fb5d6",
"path": "/var/opt/nevisproxy/myInstance/conf/navajo.xml",
"phase": "CONFIGURE",
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"onChange": [
"489kdch389"
],
"fileContent": "/deployments/4bf4a251fda824f27ebaa003/generation/content/23409wej937"
},
{
"fileId": "89234jr987",
"parentId": "945ttrg365",
"patternId": "b83aacda64dc0acfad2fb5d6",
"path": "/var/opt/nevisproxy/myInstance/conf/web.xml",
"phase": "CONFIGURE",
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"onChange": [
"489kdch389"
],
"fileContent": "/deployments/4bf4a251fda824f27ebaa003/generation/content/89234jr987"
}
]
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"patternId": {
"type": "string"
},
"host": {
"type": "string"
},
"triggers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"triggerId": {
"type": "string"
},
"label": {
"type": "string"
},
"command": {
"type": "string"
},
"patternId": {
"type": "string"
},
"onFailure": {
"type": "array",
"items": {
"type": "string"
}
},
"onSuccess": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"triggerId",
"label",
"command",
"patternId"
]
}
},
"commands": {
"type": "array",
"items": {
"type": "object",
"properties": {
"commandId": {
"type": "string"
},
"command": {
"type": "string"
},
"patternId": {
"type": "string"
},
"label": {
"type": "string"
},
"phase": {
"type": "string"
},
"conditions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"commandId",
"command",
"label",
"phase",
"conditions"
]
}
},
"directories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"directoryId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"patternId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"deleteUnmanagedFiles": {
"type": "boolean"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
}
},
"onChange": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"directoryId",
"path",
"phase",
"deleteUnmanagedFiles",
"requested",
"onChange"
]
}
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"patternId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
}
},
"onChange": {
"type": "array",
"items": {
"type": "string"
}
},
"fileContent": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"fileId",
"parentId",
"path",
"phase",
"requested",
"onChange",
"fileContent"
]
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"command": {
"type": "string"
},
"status": {
"type": "string"
},
"errorMessage": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"label",
"command",
"status",
"errorMessage"
]
}
}
},
"additionalProperties": false,
"required": [
"patternId",
"host",
"commands",
"directories",
"files",
"checks"
]
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Cloud deployment
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"patternId": "345ksd8923",
"host": "proxy-service",
"directories": [
{
"directoryId": "349sdrg345",
"patternId": "b83aacda64dc0acfad2fb5d6",
"path": "/var/opt/nevisproxy/default",
"phase": "CONFIGURE",
"deleteUnmanagedFiles": false,
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"onChange": []
},
{
"directoryId": "945ttrg365",
"patternId": "b83aacda64dc0acfad2fb5d6",
"parentId": "349sdrg345",
"path": "/var/opt/nevisproxy/default/conf",
"phase": "CONFIGURE",
"deleteUnmanagedFiles": true,
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"onChange": [
"489kdch389"
]
}
],
"files": [
{
"fileId": "23409wej937",
"parentId": "945ttrg365",
"patternId": "b83aacda64dc0acfad2fb5d6",
"path": "/var/opt/nevisproxy/default/conf/navajo.xml",
"phase": "CONFIGURE",
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"onChange": [
"489kdch389"
],
"fileContent": "/deployments/4bf4a251fda824f27ebaa003/generation/content/23409wej937"
},
{
"fileId": "89234jr987",
"parentId": "945ttrg365",
"patternId": "b83aacda64dc0acfad2fb5d6",
"path": "/var/opt/nevisproxy/default/conf/web.xml",
"phase": "CONFIGURE",
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"onChange": [
"489kdch389"
],
"fileContent": "/deployments/4bf4a251fda824f27ebaa003/generation/content/89234jr987"
}
],
"kubernetesCustomResources": [
{
"fileId": "f5609wej6y7",
"parentId": "945ttrg365",
"patternId": "b83aacda64dc0acfad2fb5d6",
"path": "/var/etc/nevis/k8s_My_proxy_b83aacda64dc0acfad2fb5d6.yml",
"phase": "CONFIGURE",
"requested": {
"permissions": "rwxr--r--"
},
"fileContent": "/deployments/4bf4a251fda824f27ebaa003/generation/content/f5609wej6y7",
"label": "proxy-service: My Proxy (NevisProxy)"
}
]
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"patternId": {
"type": "string"
},
"host": {
"type": "string"
},
"triggers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"triggerId": {
"type": "string"
},
"label": {
"type": "string"
},
"command": {
"type": "string"
},
"patternId": {
"type": "string"
},
"onFailure": {
"type": "array",
"items": {
"type": "string"
}
},
"onSuccess": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"triggerId",
"label",
"command",
"patternId"
]
}
},
"commands": {
"type": "array",
"items": {
"type": "object",
"properties": {
"commandId": {
"type": "string"
},
"command": {
"type": "string"
},
"patternId": {
"type": "string"
},
"label": {
"type": "string"
},
"phase": {
"type": "string"
},
"conditions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"commandId",
"command",
"label",
"phase",
"conditions"
]
}
},
"directories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"directoryId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"patternId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"deleteUnmanagedFiles": {
"type": "boolean"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
}
},
"onChange": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"directoryId",
"path",
"phase",
"deleteUnmanagedFiles",
"requested",
"onChange"
]
}
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"patternId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
}
},
"onChange": {
"type": "array",
"items": {
"type": "string"
}
},
"fileContent": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"fileId",
"parentId",
"path",
"phase",
"requested",
"onChange",
"fileContent"
]
}
},
"kubernetesCustomResources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"patternId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
}
},
"onChange": {
"type": "array",
"items": {
"type": "string"
}
},
"fileContent": {
"type": "string"
},
"label": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"fileId",
"parentId",
"path",
"phase",
"requested",
"onChange",
"fileContent",
"label"
]
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"command": {
"type": "string"
},
"status": {
"type": "string"
},
"errorMessage": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"label",
"command",
"status",
"errorMessage"
]
}
}
},
"additionalProperties": false,
"required": [
"patternId",
"host",
"commands",
"directories",
"files",
"checks"
]
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Get generation output file content ¶
Get generation output file contentGET/deployments/{deploymentId}/generation/content/{fileId}
It fetches a file that was created at the generation state.
Since this file can be of different types (xml, yaml, etc.) the response Content-Type and Content-Disposition will have to be filled with the correct type (see an example in bellow response).
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
- fileId
string
(required) Example: 23409wej937ID of generated file to download.
200
Headers
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=bc.properties
Get generation output as a zip file ¶
Get generation output as a zip fileGET/deployments/{deploymentId}/generation/content
Downloads all files that were created at the generation state, in a zip file.
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
200
Headers
Content-Type: application/zip
Content-Disposition: attachment; filename="generation_K8S-SIVEN-MASTER_INV-K8S-USER3_20230721T142757Z.zip"
Content-Length: 1817
Start/repeat deployment planning step ¶
Start/repeat deployment planning stepPUT/deployments/{deploymentId}/plan{?scan}
-
If the Deployment state is ‘GENERATED’, it changes to state ‘PLANNING’ and after the plan generation ends it changes to ‘PLANNED’.
-
If the Deployment state is ‘PLANNED’, it changes back to ‘PLANNING’ and generates a plan again with the same generation output data (issues, files, commands, etc.).
-
If the optional parameter ‘scan’ is set to ‘false’, then ‘PLANNING’ state is skipped and the deployment changes directly to ‘PLANNED’. In this case, the target hosts are not scanned to generate the planning output.
-
In case the current Deployment state is not ‘GENERATED’ or ‘PLANNED’ the response will return a 409 Conflict error code.
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
- scan
boolean
(optional) Example: falseThe default value of this parameter is ‘true’. If it is set as ‘false’ the plan generation will skip the scanning process.
202
Headers
Content-Type: application/json
Location: /deployments/4bf4a251fda824f27ebaa003/plan
Get status of deployment planning step ¶
Get status of deployment planning stepGET/deployments/{deploymentId}/plan
Fetches the status of the plan generation of a deployment run. It provides status information about the overall of the plan generation process and for each host in the generation.
First, all the status start in “PENDING” and as soon as the plan generation starts they change to “RUNNING”, same for the overall status. As soon as the generation ends the overall status will change to “DONE”. This does not mean that there were no errors during the plan generation, just that the plan generation ended. Each host will end with “DONE” or “FAILED” status depending on the success of the plan generation.
While the plan generation is at “RUNNING” status, it can be aborted (Abort planning step - DELETE /deployments/{deploymentId}/plan). If so, all the “RUNNING” status (overall included) will change to ‘CANCELLED’.
In case of a Cloud deployment the process is the same but the plan generation is done by service instead of by host.
Overall possible status:
-
PENDING
-
RUNNING
-
DONE
-
CANCELLED
Item possible status:
-
PENDING
-
RUNNING
-
DONE
-
FAILED
-
CANCELLED
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
200
Headers
Content-Type: application/json
Body
{
"status": "DONE",
"items": [
{
"status": "DONE",
"host": "your-deployment-host1.com",
"label": "your-deployment-host1.com"
},
{
"status": "FAILED",
"host": "your-deployment-host1.com",
"label": "your-deployment-host1.com",
"errorMessage": "Failure opening ssh channel"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string"
},
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"status": {
"type": "string"
},
"host": {
"type": "string"
},
"label": {
"type": "string"
},
"errorMessage": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"status",
"host",
"label"
]
}
]
}
},
"additionalProperties": false,
"required": [
"status",
"items"
]
}
Abort planning step ¶
Abort planning stepDELETE/deployments/{deploymentId}/plan
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
200
Headers
Content-Type: application/json
Get planning output ¶
Get planning outputGET/deployments/{deploymentId}/plan/output
The example bellow shows a successful plan generation. However, note that the plan output will always be generated, even if the plan failed. If the plan fails it will return an additional field "error"
with the details of the failure.
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
Classic deployment
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"host": "g.host.com",
"triggers": [
{
"triggerId": "2472310b782044f64238257d",
"label": "integrity check for Test_Auth-identity",
"command": "sudo -n $'/tmp/delta-deployment/resources/triggers/trigger_integrity_check_for_Test_Auth-identity'",
"patternId": "b83aacda64dc0acfad2fb5d6",
"onFailure": [
"adc668b846f1e3c44a953d62"
],
"executionExitCode": 0,
"executionOutput": "/var/opt/keys/own/Test_Auth-identity/cert.pem: OK"
},
{
"triggerId": "6852310b782044f64238257d",
"label": "integrity check for Test_Auth-identity",
"command": "sudo -n $'/tmp/delta-deployment/resources/triggers/trigger_integrity_check_for_Test_Auth-identity'",
"patternId": "b83aacda64dc0acfad2fb5d6",
"onSuccess": [
"asde68b846f1e3c44a953d62",
"ferf8b846f1e3c44a953d62"
],
"onFailure": [
"gre668b846f1e3c44a953d62"
],
"executionExitCode": 0,
"executionOutput": "/var/opt/keys/own/Test_Auth-identity/cert.pem: OK"
}
],
"checks": [
{
"label": "Create directory command (mkdir) exists",
"command": "type mkdir",
"status": "done",
"errorMessage": ""
},
{
"label": "Openssl exists",
"command": "type openssl",
"status": "done",
"errorMessage": ""
}
],
"commands": [
{
"commandId": "489kdch389",
"command": "sudo service restart nevisproxy@myInstance",
"label": "restart nevisproxy instance 'myInstance'",
"phase": "CONFIGURE",
"patternId": "d3f51b1fcbd3eaf433588645",
"deployablePatternId": "d3f51b1fcbd3eaf433588645",
"conditions": [
"89234jr987",
"23409wej937"
],
"tasks": [
"execute"
]
}
],
"directories": [
{
"directoryId": "349sdrg345",
"path": "/var/opt/nevisproxy/myInstance",
"phase": "CONFIGURE",
"patternId": "d3f51b1fcbd3eaf433588645",
"deployablePatternId": "d3f51b1fcbd3eaf433588645",
"deleteUnmanagedFiles": false,
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"scanned": {
"owner": "foobar",
"group": "blablu",
"permissions": "rwxr--r--"
},
"onChange": [
"489kdch389"
],
"tasks": [
"change group"
]
},
{
"directoryId": "945ttrg365",
"parentId": "349sdrg345",
"path": "/var/opt/nevisproxy/myInstance/conf",
"phase": "CONFIGURE",
"patternId": "e2f51b13fbd3eaf44t6887u4",
"deployablePatternId": "d3f51b1fcbd3eaf433588645",
"deleteUnmanagedFiles": true,
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"tasks": [
"create"
]
}
],
"files": [
{
"fileId": "23409wej937",
"parentId": "945ttrg365",
"path": "/var/opt/nevisproxy/myInstance/conf/navajo.xml",
"phase": "CONFIGURE",
"patternId": "d3f51b1fcbd3eaf433588645",
"deployablePatternId": "d3f51b1fcbd3eaf433588645",
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"scanned": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"onChange": [
"489kdch389"
],
"tasks": [],
"localFile": "/deployments/4bf4a251fda824f27ebaa003/generation/content/23409wej937",
"remoteFile": "/deployments/4bf4a251fda824f27ebaa003/plan/remote-content/23409wej937"
},
{
"fileId": "89234jr987",
"parentId": "945ttrg365",
"path": "/var/opt/nevisproxy/myInstance/conf/web.xml",
"phase": "CONFIGURE",
"patternId": "d3f51b1fcbd3eaf433588645",
"deployablePatternId": "d3f51b1fcbd3eaf433588645",
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"onChange": [
"489kdch389"
],
"tasks": [
"create"
],
"localFile": "/deployments/4bf4a251fda824f27ebaa003/generation/content/89234jr987",
"remoteFile": "/deployments/4bf4a251fda824f27ebaa003/plan/remote-content/89234jr987"
}
]
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"host": {
"type": "string"
},
"error": {
"type": "string"
},
"triggers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"triggerId": {
"type": "string"
},
"label": {
"type": "string"
},
"command": {
"type": "string"
},
"patternId": {
"type": "string"
},
"onFailure": {
"type": "array",
"items": {
"type": "string"
}
},
"onSuccess": {
"type": "array",
"items": {
"type": "string"
}
},
"executionExitCode": {
"type": "number"
},
"executionOutput": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"triggerId",
"label",
"command",
"patternId",
"executionExitCode"
]
}
},
"commands": {
"type": "array",
"items": {
"type": "object",
"properties": {
"commandId": {
"type": "string"
},
"command": {
"type": "string"
},
"label": {
"type": "string"
},
"phase": {
"type": "string"
},
"patternId": {
"type": "string"
},
"deployablePatternId": {
"type": "string"
},
"conditions": {
"type": "array",
"items": {
"type": "string"
}
},
"tasks": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"commandId",
"command",
"label",
"phase",
"patternId",
"deployablePatternId",
"conditions",
"tasks"
]
}
},
"directories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"directoryId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"patternId": {
"type": "string"
},
"deployablePatternId": {
"type": "string"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"permissions"
]
},
"onChange": {
"type": "array"
},
"scanned": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"permissions"
]
},
"tasks": {
"type": "array",
"items": {
"type": "string"
}
},
"deleteUnmanagedFiles": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"directoryId",
"path",
"phase",
"patternId",
"deployablePatternId",
"requested",
"tasks",
"deleteUnmanagedFiles"
]
}
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"patternId": {
"type": "string"
},
"deployablePatternId": {
"type": "string"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"owner",
"group",
"permissions"
]
},
"onChange": {
"type": "array",
"items": {
"type": "string"
}
},
"scanned": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"permissions"
]
},
"tasks": {
"type": "array",
"items": {
"type": "string"
}
},
"localFile": {
"type": "string"
},
"remoteFile": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"fileId",
"parentId",
"path",
"phase",
"patternId",
"deployablePatternId",
"requested",
"tasks",
"localFile"
]
}
},
"kubernetesCustomResources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"patternId": {
"type": "string"
},
"deployablePatternId": {
"type": "string"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"owner",
"group",
"permissions"
]
},
"tasks": {
"type": "array",
"items": {
"type": "string"
}
},
"localFile": {
"type": "string"
},
"remoteFile": {
"type": "string"
},
"label": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"fileId",
"parentId",
"path",
"phase",
"patternId",
"deployablePatternId",
"requested",
"tasks",
"localFile",
"label"
]
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"command": {
"type": "string"
},
"status": {
"type": "string"
},
"errorMessage": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"label",
"command",
"status",
"errorMessage"
]
}
}
},
"additionalProperties": false,
"required": [
"host"
]
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Cloud deployment
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"host": "proxy-service",
"directories": [
{
"directoryId": "349sdrg345",
"path": "/var/opt/nevisproxy/default",
"phase": "CONFIGURE",
"patternId": "d3f51b1fcbd3eaf433588645",
"deployablePatternId": "d3f51b1fcbd3eaf433588645",
"deleteUnmanagedFiles": false,
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"scanned": {
"owner": "foobar",
"group": "blablu",
"permissions": "rwxr--r--"
},
"tasks": [
"change group"
]
},
{
"directoryId": "945ttrg365",
"parentId": "349sdrg345",
"path": "/var/opt/nevisproxy/default/conf",
"phase": "CONFIGURE",
"patternId": "e2f51b13fbd3eaf44t6887u4",
"deployablePatternId": "d3f51b1fcbd3eaf433588645",
"deleteUnmanagedFiles": true,
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"tasks": [
"create"
]
}
],
"files": [
{
"fileId": "23409wej937",
"parentId": "945ttrg365",
"path": "/var/opt/nevisproxy/default/conf/navajo.xml",
"phase": "CONFIGURE",
"patternId": "d3f51b1fcbd3eaf433588645",
"deployablePatternId": "d3f51b1fcbd3eaf433588645",
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"scanned": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"tasks": [],
"localFile": "/deployments/4bf4a251fda824f27ebaa003/generation/content/23409wej937",
"remoteFile": "/deployments/4bf4a251fda824f27ebaa003/plan/remote-content/23409wej937"
},
{
"fileId": "89234jr987",
"parentId": "945ttrg365",
"path": "/var/opt/nevisproxy/default/conf/web.xml",
"phase": "CONFIGURE",
"patternId": "d3f51b1fcbd3eaf433588645",
"deployablePatternId": "d3f51b1fcbd3eaf433588645",
"requested": {
"owner": "foobar",
"group": "blabla",
"permissions": "rwxr--r--"
},
"tasks": [
"create"
],
"localFile": "/deployments/4bf4a251fda824f27ebaa003/generation/content/89234jr987",
"remoteFile": "/deployments/4bf4a251fda824f27ebaa003/plan/remote-content/89234jr987"
}
],
"kubernetesCustomResources": [
{
"fileId": "f5609wej6y7",
"parentId": "945ttrg365",
"path": "/var/etc/nevis/k8s_My_proxy_b83aacda64dc0acfad2fb5d6.yml",
"phase": "CONFIGURE",
"patternId": "b83aacda64dc0acfad2fb5d6",
"deployablePatternId": "d3f51b1fcbd3eaf433588645",
"requested": {
"permissions": "rwxr--r--"
},
"tasks": [
"create"
],
"localFile": "/deployments/4bf4a251fda824f27ebaa003/generation/content/f5609wej6y7",
"remoteFile": "/deployments/4bf4a251fda824f27ebaa003/plan/remote-content/23409wej937",
"label": "proxy-service: My Proxy (NevisProxy)"
}
]
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"host": {
"type": "string"
},
"error": {
"type": "string"
},
"directories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"directoryId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"patternId": {
"type": "string"
},
"deployablePatternId": {
"type": "string"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"permissions"
]
},
"onChange": {
"type": "array"
},
"scanned": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"permissions"
]
},
"tasks": {
"type": "array",
"items": {
"type": "string"
}
},
"deleteUnmanagedFiles": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"directoryId",
"path",
"phase",
"patternId",
"deployablePatternId",
"requested",
"tasks",
"deleteUnmanagedFiles"
]
}
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"patternId": {
"type": "string"
},
"deployablePatternId": {
"type": "string"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"owner",
"group",
"permissions"
]
},
"onChange": {
"type": "array",
"items": {
"type": "string"
}
},
"scanned": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"permissions"
]
},
"tasks": {
"type": "array",
"items": {
"type": "string"
}
},
"localFile": {
"type": "string"
},
"remoteFile": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"fileId",
"parentId",
"path",
"phase",
"patternId",
"deployablePatternId",
"requested",
"tasks",
"localFile"
]
}
},
"kubernetesCustomResources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"parentId": {
"type": "string"
},
"path": {
"type": "string"
},
"phase": {
"type": "string"
},
"patternId": {
"type": "string"
},
"deployablePatternId": {
"type": "string"
},
"requested": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"group": {
"type": "string"
},
"permissions": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"owner",
"group",
"permissions"
]
},
"tasks": {
"type": "array",
"items": {
"type": "string"
}
},
"localFile": {
"type": "string"
},
"remoteFile": {
"type": "string"
},
"label": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"fileId",
"parentId",
"path",
"phase",
"patternId",
"deployablePatternId",
"requested",
"tasks",
"localFile",
"label"
]
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"command": {
"type": "string"
},
"status": {
"type": "string"
},
"errorMessage": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"label",
"command",
"status",
"errorMessage"
]
}
}
},
"additionalProperties": false,
"required": [
"host"
]
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Get remote file content ¶
Get remote file contentGET/deployments/{deploymentId}/plan/remote-content/{fileId}
It fetches a file form the remote host.
Since this file can be of different types (xml, yaml, etc.) the response Content-Type and Content-Disposition will have to be filled with the correct type (see an example in bellow response).
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
- fileId
string
(required) Example: 23409wej937ID of generated file to download.
200
Headers
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=web.xml
Start deploy step of deployment process ¶
Start deploy step of deployment processPUT/deployments/{deploymentId}/deploy
-
If the Deployment state is ‘PLANNED’, it changes to state ‘DEPLOYING’ and when the deployment ends it changes to ‘DEPLOYED’.
-
In case the current Deployment state is not ‘PLANNED’ the response will return a 403 Forbidden error code.
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
Headers
Content-Type: application/json
Body
{
"comment": "Example comment for the deployment."
}
202
Headers
Content-Type: application/json
Location: /deployments/1f5b2cfca207b6edaa9139e7/deploy
Get status/report of deploy step ¶
Get status/report of deploy stepGET/deployments/{deploymentId}/deploy
Fetches the status of the deployment execution of a deployment run. It provides status information about the overall of the deployment execution process and for each host in the deployment. Once the deployment finishes, it will provide the information of the deployment for each host and a link to the log of the execution.
First, all the status start in “PENDING” and as soon as the deployment execution starts they change to “RUNNING”, same for the overall status. As soon as the deployment execution ends the overall status will change to “DONE”. This does not mean that there were no errors during the deployment execution, just that the deployment execution ended. Each host will end with “DONE” or “FAILED” status depending on the success of the deployment execution.
While the deployment execution is at “RUNNING” status, it can be aborted (Abort deploy step - DELETE /deployments/{deploymentId}/deploy). If so, all the “RUNNING” status (overall included) will change to ‘CANCELLED’.
In case of a Cloud deployment the process is the same but the deployment execution is done by Kubernetes custom resource instead of by host.
Overall possible status:
-
PENDING
-
RUNNING
-
DONE
-
CANCELLED
Item possible status:
-
PENDING
-
RUNNING
-
DONE
-
FAILED
-
CANCELLED
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
200
Headers
Content-Type: application/json
Body
{
"status": "RUNNING",
"items": [
{
"status": "FAILED",
"host": "your-deployment-host1.com",
"label": "your-deployment-host1.com",
"errorMessage": "Non-zero return code from executing the command \"sudo systemctl restart nevisproxy@Default_Proxy && sudo /var/opt/nevisproxy/Default_Proxy/run/status.sh\"\nStandardout:\nStandarderror:\nJob for nevisproxy@Default_Proxy.service failed because a configured resource limit was exceeded. See \"systemctl status nevisproxy@Default_Proxy.service\" and \"journalctl -xe\" for details.\nErrorCode:\n1",
"log": "/jobs/a5e0a9fb4c0b5299b76d6a44/log",
"progress": "0.0"
},
{
"status": "RUNNING",
"host": "your-deployment-host2.com",
"label": "your-deployment-host2.com",
"log": "/jobs/a5e0a9fb4c0b5299b76d6a44/log",
"progress": "0.4",
"currentTask": "Modifying the content of \"/etc/systemd/system/nevisproxy@Test_Proxy.service\""
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string"
},
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"status": {
"type": "string"
},
"host": {
"type": "string"
},
"label": {
"type": "string"
},
"errorMessage": {
"type": "string"
},
"log": {
"type": "string"
},
"progress": {
"type": "string"
},
"currentTask": {
"type": "string"
}
},
"required": [
"status",
"host",
"label",
"log",
"progress"
]
}
]
}
},
"required": [
"status",
"items"
]
}
Abort deploy step ¶
Abort deploy stepDELETE/deployments/{deploymentId}/deploy
Example URI
- deploymentId
string
(required) Example: 4bf4a251fda824f27ebaa003ID of the deployment process.
200
Headers
Content-Type: application/json
Quick deployment ¶
Quick deploymentPOST/quick-deployments
Create a new deployment process then generate, plan and deploy it in one step. If the inventory requires a published project and inventory for deployment, the deployment will only be scheduled if the project and inventory are published. If a quick deployment is currently in progress for the same project and inventory, the new deployment will be scheduled to run once the ongoing one completes. However, if a quick deployment for the same project and inventory is already in the queue, the new deployment will replace the queued one.
Permissions
-
Requires VIEW_PROJECT on ‘/tenants/{tenantKey}/projects/{projectKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
-
Requires VIEW_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
-
Requires DEPLOY_INVENTORY on ‘/tenants/{tenantKey}/inventories/{inventoryKey}’ or higher targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
Headers
Content-Type: application/json
Body
{
"projectKey": "DEFAULT-SIVEN-MASTER",
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"hostExpression": "*",
"comment": "Initial deployment"
}
202
Headers
Content-Type: application/json
Location: /jobs/b5cce2eecd0598427e175a9a
Body
{
"deploymentId": "8ca9fe8898d1a259052ae982",
"state": "INITIALIZED",
"projectKey": "DEFAULT-SIVEN-MASTER",
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"hostExpression": "*",
"comment": "Initial deployment"
}
Plugin Bundle ¶
Resources related to plugin bundles in the API.
List plugin bundles ¶
List plugin bundlesGET/bundles
Example URI
200
Headers
Content-Type: application/json
Body
{
"items": [
"nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisproxy:4.0.0-SNAPSHOT",
"nevisadmin-plugin-nevisauth:4.0.0-SNAPSHOT"
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Get plugin bundle infos ¶
Get plugin bundle infosGET/bundles/{bundleKey}
Example URI
- bundleKey
string
(required) Example: nevisadmin-plugin-nevisproxy:4.0.0-SNAPSHOTKey of the plugin bundle.
Headers
Accept: application/json
200
Headers
Content-Type: application/json
Body
{
"bundleKey": "nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT",
"name": "nevisAdmin: generation base plugins",
"symbolicName": "nevisadmin-plugin-base-generation",
"version": "4.0.0-SNAPSHOT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"bundleKey": {
"type": "string"
},
"name": {
"type": "string"
},
"symbolicName": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"bundleKey",
"name",
"symbolicName",
"version"
]
}
Download plugin bundle ¶
Download plugin bundleGET/bundles/{bundleKey}
Example URI
- bundleKey
string
(required) Example: nevisadmin-plugin-base-generation:4.0.0-SNAPSHOTKey of the plugin bundle.
200
Headers
Content-Type: application/java-archive
Content-Disposition: attachment; filename=nevisadmin-plugin-base-generation:4.0.0-SNAPSHOT.jar
Content-Length: 146532
Upload bundle ¶
Upload bundlePOST/bundles
Example URI
Headers
Content-Type: multipart/form-data; boundary=CUSTOM-BOUNDARY
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="bundle"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpSSytT29/QDx4WpjZ+Zg5otU3ClFeyQftbCYSWHC284SRCrntM7FpUJUkjtiSFSmsIeVs+9ImTm54Y+6MCrNWyENRDYwRYTAEecZYZuLunWt7icbIJawgSeGBfkzYwpA8YU2ZiGOLfFK+zqWvB7hW84cqwVKrA0Sv0QznT+J3BiSc7bvG+TjUUBXe/zDo+dLWdYCN5oyzD1BLBwgUl15VtgAAAA8BAABQSwMECgAACAAAG46RTAAAAAAAAAAAAAAAAAkAAABNRVRBLUlORi9QSwMECgAACAAAG46RTAAAAAAAAAAAAAAAAAMAAABjaC9QSwMECgAACAAAG46RTAAAAAAAAAAAAAAAAAkAAABjaC9uZXZpcy9QSwMECgAACAAAG46RTAAAAAAAAAAAAAAAABAAAABjaC9uZXZpcy90cmlhbHMvUEsDBAoAAAgAABuOkUwAAAAAAAAAAAAAAAAYAAAAY2gvbmV2aXMvdHJpYWxzL2VxdWlub3gvUEsDBAoAAAgAABuOkUwAAAAAAAAAAAAAAAAcAAAAY2gvbmV2aXMvdHJpYWxzL2VxdWlub3gvYXBpL1BLAwQKAAAIAAAbjpFMAAAAAAAAAAAAAAAADwAAAE1FVEEtSU5GL21hdmVuL1BLAwQKAAAIAAAbjpFMAAAAAAAAAAAAAAAAHwAAAE1FVEEtSU5GL21hdmVuL2NoLm5ldmlzLnRyaWFscy9QSwMECgAACAAAG46RTAAAAAAAAAAAAAAAACsAAABNRVRBLUlORi9tYXZlbi9jaC5uZXZpcy50cmlhbHMvdGVzdC1idW5kbGUvUEsDBAoACAgIABiOkUwiSRlAywEAAKADAAAvAAAAY2gvbmV2aXMvdHJpYWxzL2VxdWlub3gvYXBpL05vdFJlZmVyZW5jZWQuY2xhc3OdUk1v00AQfet8pwltUyiUr9Jb0krdS/mQWlVCSJzSUjUo942zuFM562CvI/qvQAIhceAH8KMQs3ZI5ZRDxcEzu29n3ts33l+/f/wE8AI7TZTxpIESntawXcMzgdJETQVW+5dqpmRqKZQnanoo0BhQYJRNYy3wvHh6lG9DZQI5sDGZ4PAmcswc1SMyZI9ZpNsbCpTfRGPttMjo03Qy0vF7NQoZ6fQjX4VDFZPbz8GyvaBEYK/vX0ijZ5RIJlZhIvXHlEz0SaopydPInusPOtbG12OnGGh74gytd3s3LL1cxm5vJJnTdrpLrM7XZvH6V9O/Fl51/0vPcTYHURr7+i1l8ynY3HctAlvnqbE00UNKiNVeGxNZZSkyPLT966Gp8YSMnB1IP4p1NjO1qJRnYRqQYYOVmQpTVmoXlFpooNlCBVWB3q1/g8Datal3o0vtW+zwkyvzExTwHB3nGu881BkXToXjCiOSs+Bc2f0O8SUraXGsZmAdbY6tvAB3sJoRrmGdq4rNX+F9Xmpu/6M5v0OHsQ3cnZOccfZc1+7eN3juCqWMpZmhHe7dyJg286o5k1vlvu4tVBxSXzh19fez1QNscV7hk4f8PUrw+A9QSwcIIkkZQMsBAACgAwAAUEsDBAoACAgIABmOkUyrUdJBowQAAKAKAAArAAAAY2gvbmV2aXMvdHJpYWxzL2VxdWlub3gvYXBpL1RoZUdyb292eS5jbGFzc51WbVcTVxB+LokGlkVCeNdipaKEJGVFqVVALdIiSoKUUGiklS6bS7K47OLuJsrXfusP6XfUlmJ72uMnPac/qqdzdzeRl4SDnpzcm50788w8M7Nz8+9/f/4DYATPGS5pRcXkZd1RXFtXDUfhT0u6aT1X1C1dWSzye7ZllbcjYAzRDbWsKoZqFpSHaxtccyMIMfQUPA1f7mtXTk+RTRVi2NdjGE5XXar5Td1UyqOKZtnc86iapuWqrm6ZyrxRKujmOMOpsmqUOENTFYtwBxyhpk0ZquPcN9cthkTasguElOdFteQoQVg2XzcoGAFY1SXMyOoqIWSmGNgjQt7kruodM3Sn9xPKVA7I5vSEburubYZQfGiJoW2gwN0p1TCyussnbVulsK7Gh1Zqh1EyXX2TKxrpO6SvVAzHZbSjQ0IDOmW0ISYhjG6GdgGe9Shm3sfWGx+qE52MXpwVKOdktCLaRL/6GMJuUSezwfSJikwUGx11e4YbBqWzg3y9L3iWDM0CabR4x6kLzyzbyPc34iLD2HGE3e0tkpt5QxcoRct2F0kyE0giuMQga6rjLlq+C4bL8fThRhuvEYqMQcQlXMbQgc70TyNIUt8UbM5dhthRPGIqiudntf0A00o+FVwRtRhhGDmOX1az9S337rbLhcZkXt1yuR3BNcqU6JZ9xUvW5FWvnF/guoRRfCmjGbIo502G+EkbPAJiKFcY+q/HrfgRkkMnf2Nk3MJtCRO44wNXQ5UxKRpvAnfpwOH7CZ+N12En3h5ZN8vWE07CopVnuBE/WuHj2yAQiZ4n1501PUVwn+FBjbx/pDMZ05htxgOkGZopC/O2tcVtd/tQ0waQNQAOEa0bTU3fc5gXvr8l385+34Mnyx0l/ebHpmJJRhbfCe+EcmZAOzj1+vZZUPcoWWvdXeDr3Oamxolzx4Bmc9Xlh4bl9XidBqw3Kz278RBdXaBR++GmEfx4KFt+P67UKMCSmMarEh7jJxnfIydewTWGc8cwjYAaOVQQI+fg8KxWcB0FCRxFGY+wIjp3gzq31ljwvBtCd5PmmOrn68qHXy0WtpqIwlO6CqbITMxCi/SWVLoG1gy+KBaG1rRu8rnS5hq3A4mUtUq2xqd18dC74HtY0h2dTierV7SDfuIQpmKcRjgqiUkFRH9BC87Q/rO4iGiXRPqoZBLp0QVHq0NPo2QpKtm1h6504g/0JHbxSSaVWP0d51PLL7wSu7TKtAOd+BQXPFk/PgsQZmkXCO0CITaQSS2n9pB4g9QO2yFxg2feRTvIrW8eoSA+xzDJSl5AIvgm+kjRsLg/A+BrJBdWgxTS1VjDr2hM7OHGzkuMpZPv0Cqke/gql36FseQupoQzRJmYgwHARTIXUXcnfsP53FuEd5YTOaJH1ISkYvA1vgkMYoHH04kk6bwIzqdxLzjvpTgF1RbyPZNIpl4jE0YFZg4PA7UeUhIwsq/2GguhqlYWi3XBlsPwfUqiLwO1Pq+wlLvYD38jNfsXHudiDVQodSdQpb8t1VqGPNX4S2hv0UbrLvQ3ZDD7DrE9PCFjniNT8xU0SoDtIVCkZW+N4BntzYTQSN8mB9L/UEsHCKtR0kGjBAAAoAoAAFBLAwQKAAgICADXi5FMJxl9LPIEAADrFQAAMgAAAE1FVEEtSU5GL21hdmVuL2NoLm5ldmlzLnRyaWFscy90ZXN0LWJ1bmRsZS9wb20ueG1s3VhZj9s2EH62f4XqxwVE+lhsgS3XQFqkbYAcBrYN+sqlaJu7kqiSlI/8+vKQZIqSbCdp0KB6sMWZb4Yz5BwUUSH4MyUqOmRpLh8mW6WKewgzvKM5wAUmWwq42MDVh3fwFkzBdOKQ9wfJGvR+vwf7hcXNp9MZ/Ovd20ctmOGY5VLhnNDJeKQF7qWlvuUEK8bzK2aLhhAHmThibHFAjyfL8QhlPKHpRyqk1r+0LARbNI3ZCF4Wb5Il2YKc7pgESjCcSgRrhsZgodgaE6VHikoVP5V5klIEPbpG7SqlMz3RDMF6ONasp5KlBjNCRVpu9DqY93pg30+GaIdq35yjlYhvkcF7kzvfCc8KllIRO4HAPCNSm7QAP5qlaCy0TMLzNduUwu6Go42Q5KUgdDnT6Oq1YigsNlRZRvXqtMAeNSihBc0TmhNGtedR9bQ4xxO95vkLwvdzgGXmrUGI9py1QN/5EFs7fgdm/
k5F6Ic4jv6UNMrpnoqookd8Hb16fBfFcaPJeBUhGFpvF6DtrCWd9vkbbPszvmrHZ90dpwdKSrNNst7VhlIRRoglSxftZh4EWdJwii2WdKktfsEbnQtuWDM3XOdQPXLDpVVg32oUbMF6I9CQUywlWzMqlnXieaQGxnKSlgk9zdqQljc3sNCF5whvtAcVrZGDHUG9xmTLdtTTlOGcrXXqn0galSS/GDsKrLZLJUpTEHzSSRp2xRuNr3NdcHyrR+hnt+CPx+yJp4y8xxkNyxPw6lBTjvrkumot+Yz4gNjHdnULqB7e5BBaCbbDisYrFx42uveSz0H2VIAtTVO+5yJNEAyB0UnTCL3JCi5USwmXGwbWQtuoFbz8JKjkqY3Y+wdemH+cIhjI2cwd1BquLP27ZDk/6GRkHU2elteHq7TYuEMwQPfocTXhrBrwq/ldtTV6taQda2FgmerQCuveWq2pYRHorwqlpMl3UROMIV9SEYzc/7QguCX5wnLQEv7aYnBllrg5vzZJ2lq+eWJ4hLDRm9F31ep7HQrj3M8OXf26ydFJjTAxumlxbVJ0U2IwIT43Hc5nwlAe9KfA5yXAteFvW01/9A+FbRC0fSHrnztH41Y4RsHTDTWsZyvz3mjrCPtpEDLbgH6+xeguUn3AuI4yCHRNpcFWPWYQHqzLEM5iFZYvAz54zyW+05PQdZTr0HmY6KTmuyOZXJQzj+1jTs6UCaK/Vre4lMApAXpbwG+VvouGOmNInWqRoGuWPExczakWEDTsCbys0HzsWdeugFZuR7paqISJh4n7TnSdmkp43XpIQayw/teZwHL4jHcYTqKUSbXW9kutVxeV/2YxKhcvRBW8EFad3B0EVkejs7PZw5RO3fpYdcb6YW2tXneGGYj7Fad+NwULweoCZBzeBVTfC+ZiR5qbnV0uaMElU1wcza40hQeabKAkZYWkQB3Jlrco5rOgOua37hTCttvS0O63fg0MVXfard9tTQ/Yzaezu+nddBHPFou7dvdFkvDC9RYE3fu4dVFwvGh2UAaGDXf8GKfpsMlzcAtmi5aNVxvzXOZMDU9fsYdm1vPO/9W1qRsqTjJmsljQYdtOwNgAhw5S/jVer63yKBXNGmtd5Buupa/MmQZueUah/IT1cYNIWN2qSngy4RaG5pgDV1UhU/Yk+/judjN+fP9q9fj7hz+A/Xjypu2uXHgbhWpblv8AUEsHCCcZfSzyBAAA6xUAAFBLAwQKAAgICAAbjpFMrOfuvlkAAABcAAAAOQAAAE1FVEEtSU5GL21hdmVuL2NoLm5ldmlzLnRyaWFscy90ZXN0LWJ1bmRsZS9wb20ucHJvcGVydGllcw3JsQqAIBAA0N2vEJo7Eml0iKaGPuLUKwWxOC+hv6+3vmFlQqGo/auXG0MivWOnqi3MYNXJ13Nv0YUElXpuIJyxNIUs+cAgfwk1Gf1TYyHViVu+qjMwgVEfUEsHCKzn7r5ZAAAAXAAAAFBLAwQKAAgICAAYjpFM8X4zwd8AAAAvAQAAMgAAAGNoL25ldmlzL3RyaWFscy9lcXVpbm94L2FwaS9NeUZhbmN5SW50ZXJmYWNlLmNsYXNzZY/NSgNRDIVPatvRVqELu/ANFKR3I25c6aIgVBQL7tNrHFPuZHTmzmBfzYUP4EOJt11UsIH8LE7Ol3z/fH4BuMRRhmGGQ0ImhcabwITj07PZklt2gS1381ip5VeEwbxsKi9TDUIY362mbH51a1GqF/YyWW8QTh4bi1rIk9a6CHJtVkaOWlpNmMz8qzNptXb8XKi59sL5shLHb+p4q3QPocnVErHXcmgSbPQfRjjfWqXzONRO3hu18mPjtSsf/f1zv1iKj30CoYN1UJewh26aOuhtah9Z6sOk2E95UGPwC1BLBwjxfjPB3wAAAC8BAABQSwECFAMUAAgICAAbjpFMFJdeVbYAAAAPAQAAFAAAAAAAAAAAAAAApIEAAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZQSwECFAMKAAAIAAAbjpFMAAAAAAAAAAAAAAAACQAAAAAAAAAAABAA7UH4AAAATUVUQS1JTkYvUEsBAhQDCgAACAAAG46RTAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAQAO1BHwEAAGNoL1BLAQIUAwoAAAgAABuOkUwAAAAAAAAAAAAAAAAJAAAAAAAAAAAAEADtQUABAABjaC9uZXZpcy9QSwECFAMKAAAIAAAbjpFMAAAAAAAAAAAAAAAAEAAAAAAAAAAAABAA7UFnAQAAY2gvbmV2aXMvdHJpYWxzL1BLAQIUAwoAAAgAABuOkUwAAAAAAAAAAAAAAAAYAAAAAAAAAAAAEADtQZUBAABjaC9uZXZpcy90cmlhbHMvZXF1aW5veC9QSwECFAMKAAAIAAAbjpFMAAAAAAAAAAAAAAAAHAAAAAAAAAAAABAA7UHLAQAAY2gvbmV2aXMvdHJpYWxzL2VxdWlub3gvYXBpL1BLAQIUAwoAAAgAABuOkUwAAAAAAAAAAAAAAAAPAAAAAAAAAAAAEADtQQUCAABNRVRBLUlORi9tYXZlbi9QSwECFAMKAAAIAAAbjpFMAAAAAAAAAAAAAAAAHwAAAAAAAAAAABAA7UEyAgAATUVUQS1JTkYvbWF2ZW4vY2gubmV2aXMudHJpYWxzL1BLAQIUAwoAAAgAABuOkUwAAAAAAAAAAAAAAAArAAAAAAAAAAAAEADtQW8CAABNRVRBLUlORi9tYXZlbi9jaC5uZXZpcy50cmlhbHMvdGVzdC1idW5kbGUvUEsBAhQDFAAICAgAGI6RTCJJGUDLAQAAoAMAAC8AAAAAAAAAAAAAALSBuAIAAGNoL25ldmlzL3RyaWFscy9lcXVpbm94L2FwaS9Ob3RSZWZlcmVuY2VkLmNsYXNzUEsBAhQDFAAICAgAGY6RTKtR0kGjBAAAoAoAACsAAAAAAAAAAAAAALSB4AQAAGNoL25ldmlzL3RyaWFscy9lcXVpbm94L2FwaS9UaGVHcm9vdnkuY2xhc3NQSwECFAMUAAgICADXi5FMJxl9LPIEAADrFQAAMgAAAAAAAAAAAAAAtIHcCQAATUVUQS1JTkYvbWF2ZW4vY2gubmV2aXMudHJpYWxzL3Rlc3QtYnVuZGxlL3BvbS54bWxQSwECFAMUAAgICAAbjpFMrOfuvlkAAABcAAAAOQAAAAAAAAAAAAAAtIEuDwAATUVUQS1JTkYvbWF2ZW4vY2gubmV2aXMudHJpYWxzL3Rlc3QtYnVuZGxlL3BvbS5wcm9wZXJ0aWVzUEsBAhQDFAAICAgAGI6RTPF+M8HfAAAALwEAADIAAAAAAAAAAAAAALSB7g8AAGNoL25ldmlzL3RyaWFscy9lcXVpbm94L2FwaS9NeUZhbmN5SW50ZXJmYWNlLmNsYXNzUEsFBgAAAAAPAA8AbwQAAC0RAAAAAA==
--CUSTOM-BOUNDARY--
201
Headers
Content-Type: application/json
Delete plugin bundle ¶
Delete plugin bundleDELETE/bundles/{bundleKey}
Example URI
- bundleKey
string
(required) Example: ch.nevis.trials.test-bundle:1.0.1Key of the plugin bundle.
200
List plugin bundle upgrade notes ¶
List plugin bundle upgrade notesGET/bundles/{bundleKey}/upgrade-notes{?from}
Return a list of upgrade notes for the given bundleKey
-
‘nevisadmin-plugin-base-generation’ plugins released before 4.7.0 have no upgrade notes included.
-
If there are no upgrade notes in the requested Bundle, an empty list is returned.
Permissions
- No permissions required
Example URI
- bundleKey
string
(required) Example: nevisadmin-plugin-base-generation:4.7.0.59Key of the plugin bundle you want to upgrade to. Only ‘nevisadmin-plugin-base-generation’ bundleKeys are accepted.
- from
string
(required) Example: nevisadmin-plugin-base-generation:4.6.0.41Key of the plugin bundle you want to upgrade from. Only ‘nevisadmin-plugin-base-generation’ bundleKeys are accepted.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"version": "4.7.0",
"html": "<div>some upgrade notes for 4.7.0</div>"
},
{
"verison": "4.6.1",
"html": "<div>some upgrade notes for 4.6.1</div>"
},
{
"verison": "4.6.0",
"html": "<div>some upgrade notes for 4.6.0</div>"
}
]
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"version": {
"type": "string"
},
"html": {
"type": "string"
}
}
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Reports ¶
Resources related to generation and fetching of reports.
Start generation of project report ¶
Start generation of project reportPOST/reports
Start the generation of a report. The caller indicates which project and which inventory shall be reported on and which report class (loaded from the project dependencies) aggregates the report as well as in which media-type the report shall be emitted.
To get a list of available reports in a project, query its plugins for implementations of
ch.nevis.admin.v4.core.api.reporting.Report
:
GET nevisadmin/api/v1/project/{projectKey}/plugins?className=ch.nevis.admin.v4.core.api.reporting.Report
Example URI
Headers
Content-Type: application/json
Body
{
"projectKey": "SIVEN-PROJECT-DEV",
"inventoryKey": "SIVEN-INVENTORY-DEV",
"reportClassName": "ch.nevis.admin.v4.plugin.nevisproxy.reports.ServiceMappingReport",
"mediaType": "text/html"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"projectKey": {
"type": "string"
},
"inventoryKey": {
"type": "string"
},
"reportClassName": {
"type": "string"
},
"mediaType": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"projectKey",
"inventoryKey",
"reportClassName",
"mediaType"
]
}
202
Headers
Content-Type: application/json
Location: /reports/0b7c2e7ba3a25e28665604fe
Body
{
"id": "0b7c2e7ba3a25e28665604fe",
"projectKey": "SIVEN-PROJECT-DEV",
"inventoryKey": "SIVEN-INVENTORY-DEV",
"reportClassName": "ch.nevis.admin.v4.plugin.nevisproxy.reports.ServiceMappingReport"
"mediaType": "text/html",
"overallStatus": "GENERATING",
"overallProgress": 0.0
}
Schema
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"id":{
"type":"string"
},
"projectKey":{
"type":"string"
},
"inventoryKey":{
"type":"string"
},
"reportClassName":{
"type":"string"
},
"mediaType":{
"type":"string"
},
"overallStatus":{
"type":"string",
"enum":[
"CREATED",
"INITIALIZED",
"GENERATING",
"AGGREGATING",
"DONE",
"FAILED",
"NOTHING_TO_DO"
]
},
"overallProgress":{
"type":"number"
}
},
"additionalProperties":false,
"required":[
"id",
"projectKey",
"inventoryKey",
"reportClassName",
"mediaType",
"overallStatus"
]
}
Get status of report ¶
Get status of reportGET/reports/{reportId}
Get the status of a report generation run
Example URI
- reportId
string
(required) Example: 0b7c2e7ba3a25e28665604feID of the report.
200
Headers
Content-Type: application/json
Body
{
"id": "0b7c2e7ba3a25e28665604fe",
"projectKey": "SIVEN-PROJECT-DEV",
"inventoryKey": "SIVEN-INVENTORY-DEV",
"reportClassName": "ch.nevis.admin.v4.plugin.nevisproxy.reports.ServiceMappingReport"
"mediaType": "text/html",
"overallStatus": "AGGREGATING",
"overallProgress": 0.75,
}
Schema
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"id":{
"type":"string"
},
"projectKey":{
"type":"string"
},
"inventoryKey":{
"type":"string"
},
"reportClassName":{
"type":"string"
},
"mediaType":{
"type":"string"
},
"overallStatus":{
"type":"string",
"enum":[
"CREATED",
"INITIALIZED",
"GENERATING",
"AGGREGATING",
"DONE",
"FAILED",
"NOTHING_TO_DO"
]
},
"overallProgress":{
"type":"number"
}
},
"additionalProperties":false,
"required":[
"id",
"projectKey",
"inventoryKey",
"reportClassName",
"mediaType",
"overallStatus"
]
}
Get output of report ¶
Get output of reportGET/reports/{reportId}/output
Get the output of a report whose generation is complete. The content-type of the response will be the media-type defined when the generation was started.
- Note: the output of the report can only be fetched if the status is DONE.
Example URI
- reportId
string
(required) Example: 0b7c2e7ba3a25e28665604feID of the report.
200
Headers
Content-Type: text/html
Content-Length: 6532
Jobs ¶
Resources related to jobs in the API.
Get list of jobs ¶
Get list of jobsGET/jobs{?type,jobKey}
Permissions
- SUPER_ADMIN permission is required to get the whole list of jobs, otherwise only the jobs owned by the currently logged user will be fetched (e.g. a deployment executed by the user).
Example URI
- type
string
(optional) Example: PROJECT_VALIDATIONType of the job.
- jobKey
string
(optional) Example: b5d5e214a7f01ba23c728b29-d3f51b1fcbd3eaf433588645-your-deployment-host1.comKey of the job.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"jobId": "36ea66f4efb05abca9daa3ef",
"jobKey": "DEV-SIVEN-WITH-ERRORS-MASTER",
"type": "PROJECT_VALIDATION",
"name": "PeriodicProjectGeneration",
"progress": 0.5,
"creationTime": "2018-10-24T11:10:40.345Z",
"startTime": "2018-10-24T11:10:41.943Z",
"endTime": "2018-10-24T11:10:42.18Z",
"userKey": "admin",
"log": [
"2018-10-24T13:10:42.016+0200 starting generation-run for deployable patternId: 'b83aacda64dc0acfad2fb5d6', host: 'auth",
"2018-10-24T13:10:42.088+0200 loading patterns for deployable patternId: 'b83aacda64dc0acfad2fb5d6', host: 'auth",
"2018-10-24T13:10:42.123+0200 patterns are loaded for deployable patternId: 'b83aacda64dc0acfad2fb5d6', host: 'auth",
"2018-10-24T13:10:42.124+0200 Issues encountered during pattern instance loading, aborting generation run",
"2018-10-24T13:10:42.124+0200 starting generation-run for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'Test-Proxy-deployment.host",
"2018-10-24T13:10:42.161+0200 loading patterns for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'Test-Proxy-deployment.host",
"2018-10-24T13:10:42.179+0200 patterns are loaded for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'Test-Proxy-deployment.host",
"2018-10-24T13:10:42.179+0200 Issues encountered during pattern instance loading, aborting generation run"
],
"statusEntries": {}
},
{
"jobId": "e8c57396af2f0d63b170a414",
"jobKey": "9c68d0f47fe86895bc81f50d-ch.nevis.admin.v4.plugin.nevisproxy.reports.ServiceMappingReport-generation-d3f51b1fcbd3eaf433588645-your-deployment-host1.com",
"type": "GENERATION",
"name": "ReportGenerationRun",
"progress": 1,
"creationTime": "2018-10-24T10:08:13.885Z",
"startTime": "2018-10-24T10:08:14.687Z",
"endTime": "2018-10-24T10:08:14.815Z",
"userKey": "admin",
"log": [],
"statusEntries": {}
},
{
"jobId": "1c48981a9d886001a9b73007",
"jobKey": "b5d5e214a7f01ba23c728b29-d3f51b1fcbd3eaf433588645-your-deployment-host1.com",
"type": "GENERATION",
"name": "GenerationRun",
"progress": 1,
"creationTime": "2018-10-19T14:40:20.050Z",
"startTime": "2018-10-19T14:40:23.044Z",
"endTime": "2018-10-19T14:40:23.367Z",
"userKey": "admin",
"log": [
"2018-10-19T16:40:23.046+0200 starting generation-run for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com",
"2018-10-19T16:40:23.085+0200 loading patterns for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com",
"2018-10-19T16:40:23.093+0200 patterns are loaded for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com",
"2018-10-19T16:40:23.134+0200 starting generation for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com",
"2018-10-19T16:40:23.339+0200 finishing on provisioning-provider for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com",
"2018-10-19T16:40:23.339+0200 generation done for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com"
],
"statusEntries": {
"GenerationStatusEntry": {
"patternId": "d3f51b1fcbd3eaf433588645",
"host": "your-deployment-host1.com",
"progress": "1.0",
"label": "Test Proxy on your-deployment-host1.com",
"status": "DONE"
}
}
}
]
}
Get a job ¶
Get a jobGET/jobs/{jobId}
Get the job status.
-
If progress is 0, startTime has no value and endTime has no value -> pending
-
If progress is 0 <= p < 1, startTime has value and endTime has no value -> running
-
If progress is 0 <= p < 1, startTime has value and endTime has value -> failed
-
If progress is 1, startTime has value and endTime has value -> done
Permissions
- SUPER_ADMIN permission is required or to be logged in with the user owner of the job (e.g. a deployment executed by the user).
Example URI
- jobId
string
(required) Example: 1c48981a9d886001a9b73007ID of the job.
200
Headers
Content-Type: application/json
Body
{
"jobId": "1c48981a9d886001a9b73007",
"jobKey": "b5d5e214a7f01ba23c728b29-d3f51b1fcbd3eaf433588645-your-deployment-host1.com",
"type": "GENERATION",
"name": "GenerationRun",
"progress": 1,
"creationTime": "2018-10-19T14:40:21.173Z",
"startTime": "2018-10-19T14:40:23.044Z",
"endTime": "2018-10-19T14:40:23.367Z",
"userKey": "admin",
"log": [
"2018-10-19T16:40:23.046+0200 starting generation-run for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com",
"2018-10-19T16:40:23.085+0200 loading patterns for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com",
"2018-10-19T16:40:23.093+0200 patterns are loaded for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com",
"2018-10-19T16:40:23.134+0200 starting generation for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com",
"2018-10-19T16:40:23.339+0200 finishing on provisioning-provider for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com",
"2018-10-19T16:40:23.339+0200 generation done for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com"
],
"statusEntries": {
"GenerationStatusEntry": {
"patternId": "d3f51b1fcbd3eaf433588645",
"host": "your-deployment-host1.com",
"progress": "1.0",
"label": "Test Proxy on your-deployment-host1.com",
"status": "DONE"
}
}
}
Cancel a job ¶
Cancel a jobPUT/jobs/{jobId}/cancel
Permissions
- SUPER_ADMIN permission is required or to be logged in with the user owner of the job (e.g. a deployment executed by the user).
Example URI
- jobId
string
(required) Example: 1c48981a9d886001a9b73007ID of the job.
200
Headers
Content-Type: application/json
Get log of a job ¶
Get log of a jobGET/jobs/{jobId}/log
Permissions
- SUPER_ADMIN permission is required or to be logged in with the user owner of the job (e.g. a deployment executed by the user).
Example URI
- jobId
string
(required) Example: 1c48981a9d886001a9b73007ID of the job.
200
Headers
Content-Type: text/plain
Body
2018-10-19T16:40:23.046+0200 starting generation-run for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com
2018-10-19T16:40:23.085+0200 loading patterns for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com
2018-10-19T16:40:23.093+0200 patterns are loaded for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com
2018-10-19T16:40:23.134+0200 starting generation for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com
2018-10-19T16:40:23.339+0200 finishing on provisioning-provider for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com
2018-10-19T16:40:23.339+0200 generation done for deployable patternId: 'd3f51b1fcbd3eaf433588645', host: 'your-deployment-host1.com
Terminate a job ¶
Terminate a jobDELETE/jobs/{jobId}
Permissions
- SUPER_ADMIN permission is required or to be logged in with the user owner of the job (e.g. a deployment executed by the user).
Example URI
- jobId
string
(required) Example: 1c48981a9d886001a9b73007ID of the job.
200
Headers
Content-Type: application/json
Log ¶
Resources related to log in the API.
Get the log of the nevisAdmin 4 pod ¶
Get the log of the nevisAdmin 4 podGET/log{?sinceSeconds,tailLines}
Get the log of the nevisAdmin 4 pod. Requires nevisAdmin 4 to be running on Kubernetes.
Permissions
- SUPER_ADMIN permission is required.
Example URI
- sinceSeconds
number
(optional) Example: 60A relative time in seconds before the current time from which to show logs.
- tailLines
number
(optional) Example: 100The number of lines from the end of the logs to show.
200
Headers
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=nevisadmin4.log
Info ¶
Resources related to info in the API.
Get BE build information ¶
Get BE build informationGET/info
Fetches information about the backend.
Example URI
200
Headers
Content-Type: application/json
Body
{
"version": "4.11.0.9",
"latestVersion": "4.17.0.0",
"commitId": "a4252a3b62s43092271325233b0d619b1948442e",
"modes": [
"idc"
],
"platform": "KUBERNETES",
"analyticsMeta": {
"enabled": true,
"lastConfirmTime": "2024-04-23T12:04:35.526731Z",
"lastConfirmUser": "admin"
}
}
Schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"version": {
"type": "string"
},
"latestVersion": {
"type": "string"
},
"commitId": {
"type": "string"
},
"modes": {
"type": "array",
"items": {
"type": "string"
}
},
"platform": {
"type": "string"
},
"analyticsMeta": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"lastConfirmTime": {
"type": "string"
},
"lastConfirmUser": {
"type": "string"
}
}
}
},
"additionalProperties": false
}
Version ¶
Resources related to versions in the API.
Get version control status of a project ¶
Get version control status of a projectGET/projects/{projectKey}/meta
-
“bundles”, “variables” and the “description” are objects, each treated as a file in VC, so they each have a VC state.
-
All current patterns are listed as well as patterns that have been deleted but whose deletion has not yet been published.
-
commitId: this is the ID of the commit in which the object was last modified.
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
200
Headers
Content-Type: application/json
Body
{
"lastModification": "2018-10-28T13:42:01.366Z",
"lastAuthor": "admin",
"localHead": "e7a9f86cfe424aad5381107a7d3af14b3fc1c3b1",
"bundles": {
"localStatus": "MODIFIED",
"localAuthor": "admin",
"localDate": "2018-10-28T13:41:53.403Z"
},
"variables": {
"localStatus": "MODIFIED",
"localAuthor": "admin",
"localAuthors": [
"admin",
"eris"
],
"localDate": "2018-10-28T13:42:01.365Z"
},
"description": {
"localStatus": "MODIFIED",
"localAuthor": "admin",
"localDate": "2022-03-23T16:57:12.120046Z",
"headValue": "Sandbox project for experimenting",
"commitId": "aa099aaa996840aacf54da2d3fee0b44bc779afb",
"remoteDate": "2022-03-23T16:56:55Z"
},
"patterns": {
"bd73c0740ae895fc8ae722f9": {
"name": "My Web App",
"localStatus": "MODIFIED",
"localAuthor": "admin",
"localAuthors": [
"admin",
"eris"
],
"localDate": "2018-10-28T13:40:04.578Z",
"commitId": "0ff4be93233f3145fea8d81fddade236937a610e",
"remoteDate": "2018-10-28T13:39:55Z"
},
"6755ed2cb095890027dde119": {
"name": "My Access Restriction",
"localStatus": "DELETED",
"localAuthor": "admin",
"localDate": "2018-10-28T13:40:01.661Z",
"commitId": "0ff4be93233f3145fea8d81fddade236937a610e",
"remoteDate": "2018-10-28T13:39:55Z"
},
"bd9c8f7416d602b7af954577": {
"name": "New HTTP Error Handling",
"localStatus": "ADDED",
"localAuthor": "admin",
"localDate": "2018-10-28T13:40:17.37Z"
},
"a77cc31a28f673029acda3b6": {
"name": "My LDAP",
"localStatus": "UNMODIFIED",
"commitId": "874dfdbf0da3d2e3b57168594c7579956392f311",
"remoteDate": "2018-10-28T11:39:11Z"
}
}
}
Clear local changes ¶
Clear local changesDELETE/projects/{projectKey}/meta
Clears local changes made to the project since the last publish or git update.
Permissions
- Requires MODIFY_PROJECT on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- projectKey
string
(required) Example: DEFAULT-SIVEN-MASTERKey of the project.
200
Headers
Content-Type: application/json
Publish project modifications ¶
Publish project modificationsPOST/projects/{projectKey}/revisions
Allows a client to execute a publishing operation for the project. This will publish all local modifications to the version control repository the project is associated with. The client provides a message that explains the publish operation.
The response will return 409 Conflict error code if:
-
There is an edit newer than the ‘lastModification’ sent in the Request.
-
There is a head commit newer than the ‘localHead’ sent in the Request.
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
tags
(optional, array[string])
Headers
Content-Type: application/json
Body
{
"lastModification": "2018-10-28T14:06:26.798Z",
"localHead": "e7a9f86cfe424aad5381107a7d3af14b3fc1c3b1",
"message": "SIVEN-1044: Added support for Foobar\nAdded 3 patterns",
"tags": [
"1.0.0"
]
}
200
Headers
Content-Type: application/json
Body
{
"commitId": "37a31526bb6c4cd46f5ac17559c758295b990f0c",
"message": "SIVEN-1044: Added support for Foobar\nAdded 3 patterns",
"parentIds": [
"f938aaa11d868ff48792642432017f640c65ba97"
],
"committer": {
"name": "admin",
"emailAddress": "test-mail@test.test",
"when": "2018-10-28T15:04:04+01:00"
},
"author": {
"name": "admin",
"emailAddress": "test-mail@test.test",
"when": "2018-10-28T15:04:04+01:00"
}
}
Clear local changes ¶
Clear local changesDELETE/inventories/{inventoryKey}/meta
Clears local changes made to the inventory since the last publish or git update.
Permissions
- Requires MODIFY_INVENTORY on ‘tenants/{tenantKey}/inventories/{inventoryKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’).
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INV-K8S-USER3-MASTERKey of the inventory.
200
Headers
Content-Type: application/json
Get revision list ¶
Get revision listGET/projects/{projectKey}/revisions{?size}
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- size
number
(optional) Example: 99Restrict the returned revision list size. (default=10)
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"commitId": "37a31526bb6c4cd46f5ac17559c758295b990f0c",
"message": "SIVEN-1044: Added support for Foobar\nAdded 3 patterns",
"parentIds": [
"f938aaa11d868ff48792642432017f640c65ba97"
],
"committer": {
"name": "admin",
"emailAddress": "admin@nevis.net",
"when": "2018-10-28T15:04:04+01:00"
},
"author": {
"name": "admin",
"emailAddress": "admin@nevis.net",
"when": "2018-10-28T15:04:04+01:00"
}
},
{
"commitId": "7955085b1003ff7719a8356e69e704f767b20b3d",
"message": "Added labels for Realm",
"parentIds": [
"f938aaa11d868ff48792642432017f640c65ba97"
],
"committer": {
"name": "nevis",
"emailAddress": "nevis@nevis.net",
"when": "2018-10-25T13:00:00+01:00"
},
"author": {
"name": "nevis",
"emailAddress": "nevis@nevis.net",
"when": "2018-10-25T13:00:00+01:00"
}
}
]
}
Get revision information ¶
Get revision informationGET/projects/{projectKey}/revisions/{commitId}
Example URI
- projectKey
string
(required) Example: SIVEN-TEST-PROJECTKey of the project.
- commitId
string
(required) Example: e589a95c009b47bcfb6d364cID of the commit.
200
Headers
Content-Type: application/json
Body
{
"commitId": "37a31526bb6c4cd46f5ac17559c758295b990f0c",
"message": "SIVEN-1044: Added support for Foobar\nAdded 3 patterns",
"parentIds": [
"f938aaa11d868ff48792642432017f640c65ba97"
],
"committer": {
"name": "admin",
"emailAddress": "test-mail@test.test",
"when": "2018-10-28T15:04:04+01:00"
},
"author": {
"name": "admin",
"emailAddress": "test-mail@test.test",
"when": "2018-10-28T15:04:04+01:00"
}
}
Get version control status of an inventory ¶
Get version control status of an inventoryGET/inventories/{inventoryKey}/meta
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
200
Headers
Content-Type: application/json
Body
{
"lastAuthor": "admin",
"lastModification": "2019-04-25T13:44:48.258Z",
"localHead": "e7a9f86cfe424aad5381107a7d3af14b3fc1c3b1",
"content": {
"commitId": "0ff4be93233f3145fea8d81fddade236937a610e",
"localAuthor": "admin",
"localDate": "2019-04-25T13:44:48.258Z",
"localStatus": "MODIFIED",
"remoteDate": "2019-04-25T13:44:48.258Z"
}
}
Publish inventory modifications ¶
Publish inventory modificationsPOST/inventories/{inventoryKey}/revisions
Allows a client to execute a publishing operation for the inventory. This will publish all local modifications to the version control repository the inventory is associated with. The client provides a message that explains the publish operation.
The response will return 409 Conflict error code if:
-
There is an edit newer than the ‘lastModification’ sent in the Request.
-
There is a head commit newer than the ‘localHead’ sent in the Request.
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
Headers
Content-Type: application/json
Body
{
"lastModification": "2018-10-28T14:06:26.798Z",
"localHead": "e7a9f86cfe424aad5381107a7d3af14b3fc1c3b1",
"message": "SIVEN-1045: Added 3 hosts"
}
200
Headers
Content-Type: application/json
Body
{
"commitId": "37a31526bb6c4cd46f5ac17559c758295b990f0c",
"message": "SIVEN-1045: Added 3 hosts",
"parentIds": [
"f938aaa11d868ff48792642432017f640c65ba97"
],
"committer": {
"name": "admin",
"emailAddress": "test-mail@test.test",
"when": "2018-10-28T15:04:04+01:00"
},
"author": {
"name": "admin",
"emailAddress": "test-mail@test.test",
"when": "2018-10-28T15:04:04+01:00"
}
}
Get revision information of an inventory ¶
Get revision information of an inventoryGET/inventories/{inventoryKey}/revisions/{commitId}
Example URI
- inventoryKey
string
(required) Example: DEFAULT-INVENTORY-CD-TESTKey of the inventory.
- commitId
string
(required) Example: e589a95c009b47bcfb6d364cID of the commit.
200
Headers
Content-Type: application/json
Body
{
"commitId": "37a31526bb6c4cd46f5ac17559c758295b990f0c",
"message": "SIVEN-1045: Added 3 hosts",
"parentIds": [
"f938aaa11d868ff48792642432017f640c65ba97"
],
"committer": {
"name": "admin",
"emailAddress": "test-mail@test.test",
"when": "2018-10-28T15:04:04+01:00"
},
"author": {
"name": "admin",
"emailAddress": "test-mail@test.test",
"when": "2018-10-28T15:04:04+01:00"
}
}
List branches ¶
List branchesGET/vc/branches{?repoUrl,name}
Example URI
- repoUrl
string
(required) Example: git://repo/urlThe URL of the repository.
- name
string
(optional) Example: masterName of the branch.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"name": "master",
"commitId": "8c5f6c204520f02565a0d52fb3154c4f333bb301"
},
{
"name": "feature/branch1",
"commitId": "8c5f6c204420f02565a0d52fb3154c4f333bb301"
},
{
"name": "feature/branch2",
"commitId": "8c5f6c204420f02565a0d22fb3154c3f333bb301"
}
]
}
Tenant ¶
Resources related to tenants in the API.
Get all tenants ¶
Get all tenantsGET/tenants
Permissions
-
Calling this endpoint requires no permissions, however, the user’s permissions will determine which tenants will be included in the result.
-
If the user has SUPER_ADMIN permission, or has VIEW_PROJECT, CREATE_PROJECT, VIEW_INVENTORY, CREATE_INVENTORY, MODIFY_TENANT, VIEW_SECRET_CONTENT_INVENTORY or VIEW_SECRET_CONTENT_TENANT assigned globally, all tenants are returned.
-
Otherwise, only those tenants are returned onto which the user has VIEW_PROJECT, CREATE_PROJECT, VIEW_INVENTORY, CREATE_INVENTORY, MODIFY_TENANT, VIEW_SECRET_CONTENT_INVENTORY or VIEW_SECRET_CONTENT_TENANT permissions assigned. Additionally, tenants in which at least one project is present onto which the user has VIEW_PROJECT permission assigned or at least one inventory is present onto which the user has VIEW_INVENTORY permission assigned are also included.
Example URI
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"tenantKey": "DEFAULT",
"description": "the default tenant that is available on all instances",
"_userAuthorization": [
"CREATE_PROJECT",
"CREATE_INVENTORY"
]
},
{
"tenantKey": "DEFAULT",
"_userAuthorization": [
"CREATE_PROJECT"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"tenantKey": {
"type": "string"
},
"description": {
"type": "string"
},
"_userAuthorization": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"tenantKey",
"_userAuthorization"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Get tenant ¶
Get tenantGET/tenants/{tenantKey}
Permissions
- requires SUPER_ADMIN permission assigned globally (target=’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
200
Headers
Content-Type: application/json
Body
{
"tenantKey": "DEFAULT",
"description": "the default tenant that is available on all instances"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"tenantKey": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"tenantKey"
]
}
Create tenant ¶
Create tenantPOST/tenants
The tenant key in the request body has to be all-uppercase. If it’s not, it will be transformed into all-uppercase.
Permissions
- requires SUPER_ADMIN permission assigned globally (target=’/’).
Example URI
Headers
Content-Type: application/json
Body
{
"tenantKey": "NEWTENANT",
"description": "new tenant created for testing"
}
201
Headers
Content-Type: application/json
Body
{
"tenantKey": "NEWTENANT",
"description": "new tenant created for testing"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"tenantKey": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"tenantKey"
]
}
Update tenant ¶
Update tenantPUT/tenants/{tenantKey}
Permissions
- requires SUPER_ADMIN permission assigned globally (target=’/’).
Example URI
- tenantKey
string
(required) Example: NEWTENANTKey of the tenant.
Headers
Content-Type: application/json
Body
{
"tenantKey": "NEWTENANT",
"description": "new tenant with new description"
}
200
Headers
Content-Type: application/json
Body
{
"tenantKey": "NEWTENANT",
"description": "new tenant with new description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"tenantKey": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"tenantKey"
]
}
Delete tenant ¶
Delete tenantDELETE/tenants/{tenantKey}
Deletes the specified tenant. Also deletes all projects, inventories, secrets and attachments scoped to this tenant and all secrets and attachments scoped to the inventories of the tenant.
Permissions
- requires SUPER_ADMIN permission assigned globally (target=’/’).
Example URI
- tenantKey
string
(required) Example: NEWTENANTKey of the tenant.
200
Headers
Content-Type: application/json
Deployment histories ¶
Deployment historiesGET/tenants/deployment-history{?projectKey,inventoryKey,since,jobStatus}
Returns a list of the past deployments.
Permissions
-
Requires ‘VIEW_PROJECT’ on tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’) if a projectKey is specified.
-
Requires ‘VIEW_INVENTORY’ on tenants/{tenantKey}/inventories/{inventoryKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’) if an inventoryKey is specified.
-
Otherwise, it is only required that the user has view permission on at least something in the tenant. Note that only results from projects where the user has ‘VIEW_PROJECT’ on tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’) are going to be returned. In case the user only has permission to view the project but not the inventory, the inventory key will be hidden. In case the user only has permission to view the inventory but not the project, the project key will be hidden.
Example URI
- inventoryKey
string
(optional) Example: DEFAULT-INVENTORY-CD-TESTsearch for deployment histories for this inventory only
- projectKey
string
(optional) Example: DEFAULT-PROJECT-CD-TESTsearch for deployment histories for this project only
- since
string
(optional) Example: 2023-10-16T15:28:28.939493Zonly list deployments that happened since this date. Default: the current date minus one month
- jobStatus
string
(optional) Example: RUNNINGfilter for deployments that have this status
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"deploymentHistoryId": 3,
"projectKey": "DEFAULT-SIVEN-MASTER",
"projectCommitId": "4fe5e3ceaf702af6eb5220252e677a079c586e4d",
"projectDeleted": false,
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"inventoryCommitId": "d59a5dd113221773386b608066c7bbfdee9e0c55",
"userKey": "admin",
"timestamp": "2020-11-09T12:18:53.283Z",
"deploymentState": "PROMOTED",
"canaryRouting": {
"header": "canary",
"cookie": "canary"
},
"postfix": "-v11",
"namespace": "test-namespace",
"tag": "r-c4fa0d390583d05cd1606ef3718a1caac23f5085",
"deploymentTargets": [
"proxy",
"auth",
"login"
],
"actions": [
{
"userKey": "admin",
"timestamp": "2020-11-09T12:18:53.283Z",
"action": "PROMOTE"
},
{
"userKey": "admin",
"timestamp": "2020-11-09T12:08:24.728Z",
"action": "DEPLOY",
"comment": "deploy as secondary"
}
],
"jobStatus": "DONE"
},
{
"deploymentHistoryId": 2,
"projectKey": "DEFAULT-SIVEN-MASTER",
"projectCommitId": "4fe5e3ceaf702af6eb5220252e677a079c586e4d",
"projectDeleted": false,
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"inventoryCommitId": "d59a5dd113221773386b608066c7bbfdee9e0c55",
"userKey": "admin",
"timestamp": "2019-05-03T12:14:17.28Z",
"jobStatus": "DONE"
},
{
"deploymentHistoryId": 1,
"projectKey": "DEFAULT-ERROR-MASTER",
"projectCommitId": "78aadd11448db4a00a44419d5d798efaa3b27f30",
"projectDeleted": true,
"inventoryKey": "DEFAULT-INVENTORY-CD-TEST",
"inventoryCommitId": "3bd241da3eebb32e4c17cc500fc1fd52382aa5d8",
"userKey": "admin",
"timestamp": "2019-05-02T10:41:37.511Z",
"jobStatus": "FAILED"
}
]
}
Tenant Project Template ¶
List project templates ¶
List project templatesGET/tenants/{tenantKey}/project-templates{?includeStandard}
Get the list of available project templates that are scoped to a specific tenant.
Permissions
- Requires ‘implicit view tenant’ - have any permission for projects or inventories belong to the tenant.
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- includeStandard
boolean
(optional) Example: trueIf set to true, the standard project templates will also be included in the results.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"projectTemplateKey": "standard-saml-idp",
"title": "SAML 2.0 Identity Provider",
"categories": [
"Federation",
"SAML",
"Authentication"
],
"summary": "SAML 2.0 Identity Provider with username / password authentication.",
"description": "# SAML 2.0 Identity Provider\n\nA basic SAML 2.0 Identity Provider.\nAuthentication uses username and password.\n\nIn order to integrate a relying party application, \nyou have to add a `SAML SP Connector` pattern to the project.\n",
"type": "STANDARD"
},
{
"projectTemplateKey": "custom-default-authenticator-1",
"title": "Authentication provider",
"categories": [
"Authentication"
],
"summary": "A template that authenticates.",
"description": "A basic project that provides authentication\n",
"type": "CUSTOM",
"scope": "DEFAULT",
"creationAuthor": "admin",
"lastModificationAuthor": "admin",
"creation": "2023-03-14T15:16:36.378173Z",
"lastModification": "2023-03-14T15:16:36.378185Z"
},
{
"projectTemplateKey": "identificator",
"title": "identity provider",
"categories": [
"Identity Management"
],
"summary": "A template that identifies.",
"description": "A basic project that provides identity management\n",
"type": "CUSTOM",
"scope": "DEFAULT",
"creationAuthor": "admin",
"lastModificationAuthor": "admin",
"creation": "2023-03-14T15:16:36.378173Z",
"lastModification": "2023-03-14T15:16:36.378185Z"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"projectTemplateKey": {
"type": "string"
},
"title": {
"type": "string"
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string"
},
"scope": {
"type": "string"
},
"creationAuthor": {
"type": "string"
},
"lastModificationAuthor": {
"type": "string"
},
"creation": {
"type": "string"
},
"lastModification": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
}
Download icon ¶
Download iconGET/tenants/{tenantKey}/project-templates/{projectTemplateKey}/icon
Download the icon for a specific project template
Permissions
- Requires ‘implicit view tenant’ - have any permission for projects or inventories belong to the tenant.
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant which is the scope of the project template
- projectTemplateKey
string
(required) Example: customidentity-1 (required, string) - Key of the project template
200
Headers
Content-Type: image/png
Content-Disposition: attachment; filename="icon"
Content-Length: 9718
Create template ¶
Create templatePOST/tenants/{tenantKey}/project-templates
Create a new project template from a project. Providing an icon is optional Note: If no projectTemplateKey is provided in the body, the template will be generated with a projectTemplateKey derived from the projectKey.
Permissions
- Requires MODIFY_TENANT permission on the tenant
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant. This will be the scope of the project template
Headers
Content-Type: multipart/form-data; boundary=--CUSTOM-BOUNDARY
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="projectTemplate"; filename="projectTemplate.json"
Content-Type: application/json
{
"projectTemplateKey": "identificator",
"title": "identity provider",
"categories": [
"Identity Management"
],
"summary": "A template that identifies.",
"projectKey": "DEFAULT-IDENTIFIER"
}
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="icon"; filename="image.png"
Content-Type: image/png
--CUSTOM-BOUNDARY
Schema
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"items":{
"type":"array",
"items":[
{
"type":"object",
"properties":{
"projectTemplateKey":{
"type":"string"
},
"title":{
"type":"string"
},
"categories":{
"type":"array",
"items":{
"type":"string"
}
},
"summary":{
"type":"string"
},
"projectKey":{
"type":"string"
}
},
"additionalProperties":false
}
]
}
}
"additionalProperties":false
}
201
Headers
Content-Type: application/octet-stream
Body
{
"projectTemplateKey": "custom-default-authenticator-1",
"title": "Authentication provider",
"categories": [
"Authentication"
],
"summary": "A template that authenticates.",
"description": "A basic project that provides authentication\n",
"type": "CUSTOM",
"scope": "DEFAULT",
"creationAuthor": "admin",
"lastModificationAuthor": "admin",
"creation": "2023-03-14T15:16:36.378173Z",
"lastModification": "2023-03-14T15:16:36.378185Z"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"projectTemplateKey": {
"type": "string"
},
"title": {
"type": "string"
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string"
},
"scope": {
"type": "string"
},
"creationAuthor": {
"type": "string"
},
"lastModificationAuthor": {
"type": "string"
},
"creation": {
"type": "string"
},
"lastModification": {
"type": "string"
}
},
"additionalProperties": false
}
Update template ¶
Update templatePUT/tenants/{tenantKey}/project-templates/{projectTemplateKey}
Update a project template. Sending the projectTemplate in the body, and filling out its title, summary, and categories fields is mandatory. Setting the projectKey field is optional. If set, the template’s content and description will be reloaded from the specified project. Note: This is the only way to update the project’s description. If no icon is sent, the original icon will be kept.
Permissions
- Requires MODIFY_TENANT permission on the tenant
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant. This is the scope of the project template
- projectTemplateKey
string
(required) Example: identity1 (required, string) - Key of the project template to update
Headers
Content-Type: multipart/form-data; boundary=--CUSTOM-BOUNDARY
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="projectTemplate"; filename="projectTemplate.json"
Content-Type: application/json
{
"projectTemplateKey": "identificator",
"title": "identity provider",
"categories": [
"Identity Management"
],
"summary": "A template that identifies.",
"projectKey": "DEFAULT-IDENTIFIER"
}
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="icon"; filename="image.png"
Content-Type: image/png
--CUSTOM-BOUNDARY
Schema
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"items":{
"type":"array",
"items":[
{
"type":"object",
"properties":{
"projectTemplateKey":{
"type":"string"
},
"title":{
"type":"string"
},
"categories":{
"type":"array",
"items":{
"type":"string"
}
},
"summary":{
"type":"string"
},
"projectKey":{
"type":"string"
}
},
"additionalProperties":false
}
]
}
}
"additionalProperties":false
}
200
Headers
Content-Type: application/octet-stream
Body
{
"projectTemplateKey": "custom-default-authenticator-1",
"title": "Authentication provider",
"categories": [
"Authentication"
],
"summary": "A template that authenticates.",
"description": "A basic project that provides authentication\n",
"type": "CUSTOM",
"scope": "DEFAULT",
"creationAuthor": "admin",
"lastModificationAuthor": "admin",
"creation": "2023-03-14T15:16:36.378173Z",
"lastModification": "2023-03-16T15:16:36.378185Z"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"projectTemplateKey": {
"type": "string"
},
"title": {
"type": "string"
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string"
},
"scope": {
"type": "string"
},
"creationAuthor": {
"type": "string"
},
"lastModificationAuthor": {
"type": "string"
},
"creation": {
"type": "string"
},
"lastModification": {
"type": "string"
}
},
"additionalProperties": false
}
Delete template ¶
Delete templateDELETE/tenants/{tenantKey}/project-templates/{projectTemplateKey}
Deletes a project template.
Permissions
- Requires MODIFY_TENANT permission on the tenant
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant which is the scope of the project template
- projectTemplateKey
string
(required) Example: customidentity-1 (required, string) - Key of the project template to delete
200
Headers
Content-Type: application/json
Tenant Secret ¶
List secrets ¶
List secretsGET/tenants/{tenantKey}/secrets{?usedIn}
Get the list of tenant secrets.
Permissions
- Requires ‘implicit view tenant’ - have any permission for projects or inventories belong to the tenant.
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- usedIn
boolean
(optional) Example: trueif false, the computation of the usedIn field in the resulting beans will be skipped. Default: false
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"secretId": "6b57bc535c5475101a8b9be2",
"description": "example description",
"scope": "DEFAULT",
"usedIn": [
"DEFAULT-INVENTORY"
]
},
{
"secretId": "d88fc9762338df82d5f655c5",
"description": "an other example description",
"scope": "DEFAULT",
"usedIn": [
"DEFAULT-INVENTORY"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"secretId": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
},
"usedIn": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"secretId",
"scope"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create secret ¶
Create secretPOST/tenants/{tenantKey}/secrets
Create a new tenant secret. If the secret id is left unspecified, a random id will be generated.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
Headers
Content-Type: application/json
Body
{
"value": "my secret value",
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"value": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"value"
]
}
201
Headers
Content-Type: application/json
Body
{
"secretId": "d88fc9762338df82d5f655c5",
"description": "example description",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretId": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretId"
]
}
Headers
Content-Type: application/json
Body
{
"secretId": "0123456789abcdef01234567"
"value": "my secret value",
"description": "example description"
}
Schema
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"secretId":{
"type":"string"
}
"value":{
"type":"string"
}
"description":{
"type":"string"
}
},
"additionalProperties":false,
"required":[
"value"
]
}
201
Headers
Content-Type: application/json
Body
{
"secretId": "0123456789abcdef01234567",
"description": "example description",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretId": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretId"
]
}
Get secret ¶
Get secretGET/tenants/{tenantKey}/secrets/{secretId}
Get the content of a tenant secret.
Permissions
- Requires VIEW_SECRET_CONTENT_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- secretId
string
(required) Example: 123456789012345678901234Id of the secret.
200
Headers
Content-Type: application/octet-stream
Body
{
"secretId": "d88fc9762338df82d5f655c5",
"value": "my secret value",
"description": "example description",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretId": {
"type": "string"
},
"value": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretId"
]
}
Update secret ¶
Update secretPUT/tenants/{tenantKey}/secrets/{secretId}
Update the value and description of an existing tenant secret.
Limitations and known issues
- Rollback deployment will use the new secret value.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- secretId
string
(required) Example: 123456789012345678901234Id of the secret.
Headers
Content-Type: application/json
Body
{
"value": "mysecret",
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"value": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"value"
]
}
200
Headers
Content-Type: application/json
Body
{
"secretId": "123456789012345678901234",
"description": "example description",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretId": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretId"
]
}
Delete secret ¶
Delete secretDELETE/tenants/{tenantKey}/secrets/{secretId}
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- secretId
string
(required) Example: d88fc9762338df82d5f655c5Id of the secret.
200
Headers
Content-Type: application/json
Patch secret ¶
Patch secretPATCH/tenants/{tenantKey}/secrets/{secretId}
Update the description of an existing secret.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- secretId
string
(required) Example: d88fc9762338df82d5f655c5Id of the secret.
Headers
Content-Type: application/json
Body
{
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": []
}
200
Headers
Content-Type: application/json
Tenant Secret Resource ¶
List secret resources ¶
List secret resourcesGET/tenants/{tenantKey}/secret-resources{?usedIn}
Get the list of tenant secret resources (files)
Permissions
- Requires ‘implicit view tenant’ - have any permission for projects or inventories belong to the tenant.
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- usedIn
boolean
(optional) Example: trueif false, the computation of the usedIn field in the resulting beans will be skipped. Default: false
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"secretResourceId": "616d655b55c8fdfb7ad893e5",
"secretResourceName": "secret-attachment.txt",
"description": "example description",
"scope": "DEFAULT",
"usedIn": [
"DEFAULT-INVENTORY"
]
},
{
"secretResourceId": "bv4q4gf5xqjg45q4b5vq4v5q",
"secretResourceName": "secret-things.xml",
"description": "an other example description",
"scope": "DEFAULT",
"usedIn": [
"DEFAULT-INVENTORY"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"secretResourceId": {
"type": "string"
},
"secretResourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
},
"usedIn": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"secretResourceId",
"secretResourceName",
"scope"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create secret resource ¶
Create secret resourcePOST/tenants/{tenantKey}/secret-resources
Create a new tenant secret resource (file). If the id of the secret resource is left unspecified, a random id will be generated.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="resource"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Example description for the secret resource
--CUSTOM-BOUNDARY-
201
Headers
Content-Type: application/json
Body
{
"secretResourceId": "9bb3080530791e46c6169a76",
"secretResourceName": "test-bundle-1.0.1.jar",
"description": "Example description for the secret resource",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretResourceId": {
"type": "string"
},
"secretResourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretResourceId",
"secretResourceName",
"scope"
]
}
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="resource"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Example description for the secret resource
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="secretResourceId"
0123456789abcdef01234567
--CUSTOM-BOUNDARY--
201
Headers
Content-Type: application/json
Body
{
"secretResourceId": "0123456789abcdef01234567",
"secretResourceName": "test-bundle-1.0.1.jar",
"description": "Example description for the secret resource",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretResourceId": {
"type": "string"
},
"secretResourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretResourceId",
"secretResourceName",
"scope"
]
}
Get secret resource ¶
Get secret resourceGET/tenants/{tenantKey}/secret-resources/{secretResourceId}
Get the content of a tenant secret resource (file).
Permissions
- Requires VIEW_SECRET_CONTENT_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- secretResourceId
string
(required) Example: 123456789012345678901234Id of the secret resource.
200
Headers
Content-Type: application/octet-stream
Update secret resource ¶
Update secret resourcePUT/tenants/{tenantKey}/secret-resources/{secretResourceId}
Update the content of a tenant secret resource (file).
Limitations and known issues
-
Rollback deployment will use the new secret value.
-
Upload with a new file name won’t update the reference in the inventory. The file name will be out-dated in 'inv-res-secret://
# '.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- secretResourceId
string
(required) Example: 123456789012345678901234Id of the secret resource.
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="bundle"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Example description for the secret resource
--CUSTOM-BOUNDARY-
200
Headers
Content-Type: application/json
Body
{
"secretResourceId": "9bb3080530791e46c6169a76",
"secretResourceName": "test-bundle-1.0.1.jar",
"description": "Example description for the secret resource",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"secretResourceId": {
"type": "string"
},
"secretResourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"secretResourceId",
"secretResourceName",
"scope"
]
}
Delete secret resource ¶
Delete secret resourceDELETE/tenants/{tenantKey}/secret-resources/{secretResourceId}
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- secretResourceId
string
(required) Example: d88fc9762338df82d5f655c5Id of the secret resource.
200
Headers
Content-Type: application/json
Patch secret resource ¶
Patch secret resourcePATCH/tenants/{tenantKey}/secret-resources/{secretResourceId}
Update the description of an existing secret resource.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- secretResourceId
string
(required) Example: d88fc9762338df82d5f655c5Id of the secret resource.
Headers
Content-Type: application/json
Body
{
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": []
}
200
Headers
Content-Type: application/json
Tenant Resource ¶
List resources ¶
List resourcesGET/tenants/{tenantKey}/resources{?usedIn}
Get the list of tenant resources (files)
Permissions
- Requires ‘implicit view tenant’ - have any permission for projects or inventories belong to the tenant.
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- usedIn
boolean
(optional) Example: trueif false, the computation of the usedIn field in the resulting beans will be skipped. Default: false
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"resourceId": "616d655b55c8fdfb7ad893e5f934bb9e",
"resourceName": "attachment.txt",
"description": "example description",
"scope": "DEFAULT",
"usedIn": [
"DEFAULT-INVENTORY"
]
},
{
"resourceId": "bv4q4gf5xqjg45q4b5vq4v5q4hqh45gq",
"resourceName": "things.xml",
"description": "an other example description",
"scope": "DEFAULT",
"usedIn": [
"DEFAULT-INVENTORY"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"resourceId": {
"type": "string"
},
"resourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
},
"usedIn": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"resourceId",
"resourceName",
"scope"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create resource ¶
Create resourcePOST/tenants/{tenantKey}/resources
Create a new tenant resource (file). If the resource id is left unspecified, a random id will be generated.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="resource"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Example description for the resource
--CUSTOM-BOUNDARY--
201
Headers
Content-Type: application/json
Body
{
"resourceId": "6b4c0af5d851e8f1798bb521e305f9ab",
"resourceName": "test-bundle-1.0.1.jar",
"description": "Example description for the resource",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"resourceId": {
"type": "string"
},
"resourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"resourceId",
"resourceName",
"scope"
]
}
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="resource"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Example description for the resource
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="resourceId"
0123456789abcdef0123456789abcdef
--CUSTOM-BOUNDARY--
201
Headers
Content-Type: application/json
Body
{
"resourceId": "0123456789abcdef0123456789abcdef",
"resourceName": "test-bundle-1.0.1.jar",
"description": "Example description for the resource",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"resourceId": {
"type": "string"
},
"resourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"resourceId",
"resourceName",
"scope"
]
}
Get resource ¶
Get resourceGET/tenants/{tenantKey}/resources/{resourceId}
Get the content of a tenant resource (file).
Permissions
- Requires ‘implicit view tenant’ - have any permission for projects or inventories belong to the tenant.
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- resourceId
string
(required) Example: 12345678901234567890123456789012Id of the resource.
200
Headers
Content-Type: application/octet-stream
Update resource ¶
Update resourcePUT/tenants/{tenantKey}/resources/{resourceId}
Update an existing tenant resource (file).
Limitations and known issues
-
Rollback deployment will use the new resource (file) value.
-
Upload with a new file name won’t update the reference in the inventory. The file name will be out-dated in 'inv-res://
# '.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- resourceId
string
(required) Example: 6b4c0af5d851e8f1798bb521e305f9abId of the resource.
Headers
Content-Type: application/json
Body
--CUSTOM-BOUNDARY
Content-Disposition: form-data; name="resource"; filename="test-bundle-1.0.1.jar"
Content-Type: application/java-archive
Content-Transfer-Encoding: base64
UEsDBAoACAgIABuOkUwUl15VtgAAAA8BAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUZtj80KwjAQhO+BvENeIIu1eulNxYugCIL3bbra2DSpS
--CUSTOM-BOUNDARY--
Content-Disposition: form-data; name="description"
Updated description
--CUSTOM-BOUNDARY--
200
Headers
Content-Type: application/json
Body
{
"resourceId": "6b4c0af5d851e8f1798bb521e305f9ab",
"resourceName": "test-bundle-1.0.1.jar",
"description": "Updated description",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"resourceId": {
"type": "string"
},
"resourceName": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"resourceId",
"resourceName",
"scope"
]
}
Delete resource ¶
Delete resourceDELETE/tenants/{tenantKey}/resources/{resourceId}
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- resourceId
string
(required) Example: 616d655b55c8fdfb7ad893e5f934bb9eId of the resource.
200
Headers
Content-Type: application/json
Patch resource ¶
Patch resourcePATCH/tenants/{tenantKey}/resources/{resourceId}
Update the description of an existing resource.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- resourceId
string
(required) Example: 616d655b55c8fdfb7ad893e5f934bb9eId of the resource.
Headers
Content-Type: application/json
Body
{
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": []
}
200
Headers
Content-Type: application/json
Tenant Certificate ¶
List certificates ¶
List certificatesGET/tenants/{tenantKey}/certificates{?usedIn,includeInventories}
List certificates (.pem) uploaded as resource or secret-resource.
Permissions
- Requires ‘implicit view tenant’ - have any permission for projects or inventories belong to the tenant.
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- usedIn
boolean
(optional) Example: trueif false, the computation of the usedIn field in the resulting beans will be skipped. Default: false
- includeInventories
boolean
(optional) Example: trueif true, also loads inventory certificates. Default: false
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"source": "inv-res-secret://8a21f53e96f27fe9377714c6#cert.pem",
"id": "8a21f53e96f27fe9377714c6",
"fileName": "cert.pem",
"description": "example description",
"scope": "DEFAULT",
"usedIn": [
"DEFAULT-INVENTORY"
],
"certificates": [
{
"subject": "C=ch,O=Nevis Security AG,CN=Nevis Keybox CA: myCA (nevis.example.net)",
"issuer": "C=ch,O=Nevis Security AG,CN=Nevis Keybox CA: myCA (nevis.example.net)",
"serial": 10058663222486049000,
"expires": "2036-02-16T12:16:15Z"
}
]
},
{
"source": "inv-res://058c34b6c6bd61e4c1b4fa47ce3ec1d1#cert.pem",
"id": "058c34b6c6bd61e4c1b4fa47ce3ec1d1",
"fileName": "cert.pem",
"description": "other example description",
"scope": "DEFAULT",
"usedIn": [
"DEFAULT-INVENTORY"
],
"certificates": [
{
"subject": "C=ch,O=Nevis Security AG,CN=Nevis Keybox CA: myCA (nevis.example.net)",
"issuer": "C=ch,O=Nevis Security AG,CN=Nevis Keybox CA: myCA (nevis.example.net)",
"serial": 10058663222486049000,
"expires": "2036-02-16T12:16:15Z"
}
]
}
]
}
Tenant constant ¶
List constants ¶
List constantsGET/tenants/{tenantKey}/constants{?usedIn}
Get the list of tenant constants.
Permissions
- Requires ‘implicit view tenant’ - have any permission for projects or inventories belong to the tenant.
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- usedIn
boolean
(optional) Example: trueif false, the computation of the usedIn field in the resulting beans will be skipped. Default: false
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"name": "host-name",
"value": "www.example.com",
"description": "example description",
"scope": "DEFAULT",
"usedIn": [
"DEFAULT-INVENTORY"
]
},
{
"name": "port",
"value": "8080",
"description": "an other example description",
"scope": "DEFAULT",
"usedIn": [
"DEFAULT-INVENTORY"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
},
"usedIn": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
}
Create constant ¶
Create constantPOST/tenants/{tenantKey}/constants
Create a new tenant constant.
Limitations and known issues
- Constants are not version controlled and are not exported during file export.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
201
Headers
Content-Type: application/json
Body
{
"name": "host-name",
"value": "www.example.com",
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name",
"value"
]
}
200
Headers
Content-Type: application/json
Get constant ¶
Get constantGET/tenants/{tenantKey}/constants/{name}
Get a tenant constant.
Permissions
- Requires ‘implicit view tenant’ - have any permission for projects or inventories belong to the tenant.
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- name
string
(required) Example: host-namename of the constant.
200
Headers
Content-Type: application/octet-stream
Body
{
"name": "port",
"value": "8080",
"description": "example description",
"scope": "DEFAULT"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false
}
Update constant ¶
Update constantPUT/tenants/{tenantKey}/constants/{name}
Update the value and description of an existing tenant constant.
Limitations and known issues
- Constants are not version controlled and are not exported during file export.
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- name
string
(required) Example: host-namename of the constant.
Headers
Content-Type: application/json
Body
{
"value": "www.example.com",
"description": "example description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"description": {
"type": "string"
},
"scope": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"value"
]
}
200
Headers
Content-Type: application/json
Delete constant ¶
Delete constantDELETE/tenants/{tenantKey}/constants/{name}
Permissions
- Requires MODIFY_TENANT on ‘/tenants/{tenantKey}’ or root target (’/’).
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
- name
string
(required) Example: portname of the constant.
200
Headers
Content-Type: application/json
Group ¶
Resources related to groups in the API.
List all the groups ¶
List all the groupsGET/groups
Returns a list of all groups that exist.
Example URI
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"groupKey": "adminGroup",
"description": "some desc",
"ldapDNs": [
"cn=adminGroup,ou=Groups,o=Adnovum,c=ch"
],
"userKeys": [
"admin"
]
},
{
"groupKey": "guestGroup",
"description": "some other desc",
"ldapDNs": [
"cn=guestGroup,ou=Groups,o=Adnovum,c=ch"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"groupKey": {
"type": "string"
},
"description": {
"type": "string"
},
"ldapDNs": {
"type": "array",
"items": {
"type": "string"
}
},
"userKeys": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"groupKey",
"ldapDNs"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create a new group ¶
Create a new groupPOST/groups
Example URI
Headers
Content-Type: application/json
Body
{
"groupKey": "adminGroup",
"description": "This is a description of adminGroup",
"ldapDNs": [
"cn=adminGroup,ou=Groups,o=Adnovum,c=ch"
]
}
201
Headers
Content-Type: application/json
Body
{
"groupKey": "adminGroup",
"description": "This is a description of adminGroup",
"ldapDNs": [
"cn=adminGroup,ou=Groups,o=Adnovum,c=ch"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"groupKey": {
"type": "string"
},
"description": {
"type": "string"
},
"ldapDNs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"groupKey",
"ldapDNs"
]
}
Get a group ¶
Get a groupGET/groups/{groupKey}
Example URI
- groupKey
String
(required) Example: adminGroupKey of the group.
200
Headers
Content-Type: application/json
Body
{
"groupKey": "adminGroup",
"description": "This is a description of adminGroup",
"ldapDNs": [
"cn=adminGroup,ou=Groups,o=Adnovum,c=ch"
],
"userKeys": [
"admin"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"groupKey": {
"type": "string"
},
"description": {
"type": "string"
},
"ldapDNs": {
"type": "array",
"items": {
"type": "string"
}
},
"userKeys": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"groupKey",
"ldapDNs"
]
}
Update a group ¶
Update a groupPUT/groups/{groupKey}
Example URI
- groupKey
String
(required) Example: adminGroupKey of the group.
Headers
Content-Type: application/json
Body
{
"groupKey": "adminGroup",
"description": "This is a new description of adminGroup",
"ldapDNs": [
"cn=adminGroup,ou=Groups,o=Adnovum,c=ch"
]
}
200
Headers
Content-Type: application/json
Body
{
"groupKey": "adminGroup",
"description": "This is a new description of adminGroup",
"ldapDNs": [
"cn=adminGroup,ou=Groups,o=Adnovum,c=ch"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"groupKey": {
"type": "string"
},
"description": {
"type": "string"
},
"ldapDNs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"groupKey",
"ldapDNs"
]
}
Delete a group ¶
Delete a groupDELETE/groups/{groupKey}
Example URI
- groupKey
String
(required) Example: TestGroupKey of the group.
200
Headers
Content-Type: application/json
Add a user to a group ¶
Add a user to a groupPOST/groups/{groupKey}/users
Example URI
- groupKey
String
(required) Example: adminGroupKey of the group.
Headers
Content-Type: application/json
Body
{
"userKey": "admin"
}
201
Headers
Content-Type: application/json
Body
{
"userKey": "admin"
}
List all users of a group ¶
List all users of a groupGET/groups/{groupKey}/users
Example URI
- groupKey
String
(required) Example: adminGroupKey of the group.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"userKey": "admin"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"userKey": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"userKey"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Delete a user from a group ¶
Delete a user from a groupDELETE/groups/{groupKey}/users/{userKey}
Example URI
- groupKey
String
(required) Example: adminGroupKey of the group.
- userKey
String
(required) Example: adminKey of the user.
200
Headers
Content-Type: application/json
List assigned permissions of a group ¶
List assigned permissions of a groupGET/groups/{groupKey}/permissions{?permissionType}
permissionType options:
- GROUP_DIRECT: The permission assigned directly to this group. Only this type is allowed at this moment.
Example URI
- groupKey
String
(required) Example: testGroupKey of the group.
- permissionType
String
(optional) Example: GROUP_DIRECTDefines the permissionTypes to get in the response.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"assignee": "testGroup",
"permission": {
"target": "/tenants/DEFAULT",
"operationKey": "ADMIN_PROJECT"
},
"permissionType": "GROUP_DIRECT"
},
{
"assignee": "testGroup",
"permission": {
"target": "/tenants/DEFAULT",
"operationKey": "ADMIN_INVENTORY"
},
"permissionType": "GROUP_DIRECT"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"assignee": {
"type": "string"
},
"permission": {
"type": "object",
"properties": {
"target": {
"type": "string"
},
"operationKey": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"target",
"operationKey"
]
},
"permissionType": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"assignee",
"permission",
"permissionType"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
User ¶
Resources related to users in the API.
List all the users ¶
List all the usersGET/users
Returns a list of all users that exist.
Example URI
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"userKey": "adminUser",
"email": "adminUser@test.com",
"familyName": "Mouse",
"givenName": "Mickey",
"type": "local",
"groupKeys": [
"admin_mice"
]
},
{
"userKey": "otherUser",
"email": "otherUser@test.com",
"familyName": "Mouse",
"givenName": "Minnie",
"type": "local"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"userKey": {
"type": "string"
},
"email": {
"type": "string"
},
"familyName": {
"type": "string"
},
"givenName": {
"type": "string"
},
"type": {
"type": "string"
},
"groupKeys": {
"type": "array",
"items": [
{
"type": "string"
}
]
}
},
"additionalProperties": false,
"required": [
"userKey",
"type"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Create a new user ¶
Create a new userPOST/users
Example URI
type
(optional, string) - default:local
, possible values:local
,ldap
,saml
Headers
Content-Type: application/json
Body
{
"userKey": "testUser",
"password": "testUserPassword",
"email": "testUser@test.com",
"familyName": "Mouse",
"givenName": "Mickey"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"userKey": {
"type": "string"
},
"password": {
"type": "string"
},
"email": {
"type": "string"
},
"familyName": {
"type": "string"
},
"givenName": {
"type": "string"
},
"type": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"userKey",
"password"
]
}
201
Headers
Content-Type: application/json
Body
{
"userKey": "testUser",
"email": "testUser@test.com",
"familyName": "Mouse",
"givenName": "Mickey",
"type": "local"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"userKey": {
"type": "string"
},
"email": {
"type": "string"
},
"familyName": {
"type": "string"
},
"givenName": {
"type": "string"
},
"type": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"userKey",
"type"
]
}
Get a user ¶
Get a userGET/users/{userKey}
Example URI
- userKey
String
(required) Example: testUserKey of the user.
200
Headers
Content-Type: application/json
Body
{
"userKey": "testUser",
"email": "testUser@test.com",
"familyName": "Mouse",
"givenName": "Mickey",
"type": "local",
"groupKeys": [
"admin_mice"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"userKey": {
"type": "string"
},
"email": {
"type": "string"
},
"familyName": {
"type": "string"
},
"givenName": {
"type": "string"
},
"type": {
"type": "string"
},
"groupKeys": {
"type": "array",
"items": [
{
"type": "string"
}
]
}
},
"additionalProperties": false,
"required": [
"userKey",
"type"
]
}
Update a user ¶
Update a userPUT/users/{userKey}
Example URI
- userKey
String
(required) Example: testUserKey of the user.
Headers
Content-Type: application/json
Body
{
"userKey": "testUser",
"email": "testUser@test.com",
"familyName": "Mouse2",
"givenName": "Mickey2",
"type:": "local"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"userKey": {
"type": "string"
},
"email": {
"type": "string"
},
"familyName": {
"type": "string"
},
"givenName": {
"type": "string"
},
"type": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"userKey",
"type"
]
}
200
Headers
Content-Type: application/json
Body
{
"userKey": "testUser",
"email": "testUser@test.com",
"familyName": "Mouse2",
"givenName": "Mickey2",
"type": "local"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"userKey": {
"type": "string"
},
"email": {
"type": "string"
},
"familyName": {
"type": "string"
},
"givenName": {
"type": "string"
},
"type": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"userKey",
"type"
]
}
Update password of a user ¶
Update password of a userPUT/users/{userKey}/password
Example URI
- userKey
String
(required) Example: testUserKey of the user.
Headers
Content-Type: application/json
Body
{
"password": "newPassword"
}
204
Headers
Content-Type: application/json
Delete a user ¶
Delete a userDELETE/users/{userKey}
Example URI
- userKey
String
(required) Example: testUser2Key of the user.
200
Headers
Content-Type: application/json
List all groups of a user ¶
List all groups of a userGET/users/{userKey}/groups
Lists all groups a user is part of.
Example URI
- userKey
String
(required) Example: testUserKey of the user.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"groupKey": "myGroup",
"description": "This is the description of the group"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"groupKey": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"groupKey"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
List assigned permissions of a user ¶
List assigned permissions of a userGET/users/{userKey}/permissions{?permissionType}
permissionType options:
-
USER_DIRECT: The permission is directly assigned to the user.
-
GROUP_DIRECT: The user gets this permission from a group where she belongs.
Example URI
- userKey
String
(required) Example: testUserKey of the user.
- permissionType
String
(optional) Example: USER_DIRECTDefines the permissionTypes to get in the response.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"assignee": "testUser",
"permission": {
"target": "/tenants/DEFAULT",
"operationKey": "ADMIN_PROJECT"
},
"permissionType": "USER_DIRECT"
},
{
"assignee": "testUser",
"permission": {
"target": "/tenants/DEFAULT",
"operationKey": "ADMIN_INVENTORY"
},
"permissionType": "USER_DIRECT"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"assignee": {
"type": "string"
},
"permission": {
"type": "object",
"properties": {
"target": {
"type": "string"
},
"operationKey": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"target",
"operationKey"
]
},
"permissionType": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"assignee",
"permission",
"permissionType"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
List Kubernetes namespaces ¶
List Kubernetes namespacesGET/kubernetes/namespaces{?url,token}
Example URI
- url
string
(required) Example: https://adnaks-1eebd09e.hcp.westeurope.azmk8s.io:443 (required, string) - The URL of the Kubernetes cluster.
- token
string
(required) Example: eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3token to access the Kubernetes cluster.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"name": "namespace A",
"status": "Active"
},
{
"name": "namespace B",
"status": "Terminating"
},
{
"name": "namespace C",
"status": "Active"
}
]
}
Identities ¶
Resources related to identities data in the API.
Download users and groups management file ¶
Download users and groups management fileGET/identities
Downloads a YAML file containing all the local users and groups. Per each user and group it contains their information and the permissions assigned to them.
Example URI
200
Headers
Content-Type: text/yaml
Content-Disposition: attachment;filename="identities.yaml"
Content-Length: 2555
Body
localUsers:
john:
email: john@mail.org
givenName: John
familyName: Doe
password: mysecretpassword
globalPermissions:
- "VIEW_PROJECT"
tenantPermissions:
DEV:
- "MODIFY_PROJECT"
projectPermissions:
DEV-SIVEN-MASTER:
- "ADMIN_PROJECT"
inventoryPermissions:
DEV-SIVEN-INVENTORY:
- "DEPLOY_INVENTORY"
groups:
admins:
description: "Group of administrators"
ldapDNs:
- "CN=dummyGroup1,CN=Users,DC=samdom,DC=local"
localUsers:
- "john"
globalPermissions:
- "ADMIN_PROJECT"
- "ADMIN_INVENTORY"
- "VIEW_PROJECT"
- "VIEW_INVENTORY"
tenantPermissions:
DEV:
- "CREATE_PROJECT"
- "CREATE_INVENTORY"
projectPermissions:
DEV-SIVEN-MASTER:
- "MODIFY_PROJECT"
inventoryPermissions:
DEV-SIVEN-INVENTORY:
- "DEPLOY_INVENTORY"
Upload users and groups management file ¶
Upload users and groups management filePUT/identities{?identityDeletion}
Uploads a YAML file with local users and groups back to nevisAdmin 4. Local users and groups in nevisAdmin 4 will be updated, added or deleted according to the data in the file.
Example URI
- identityDeletion
boolean
(optional) Example: trueDetermines if users and groups missing in the file will be deleted or not. False by default.
Headers
Content-Type: multipart/form-data; boundary=---------------------------114782935826962
Content-Lengh: 2555
Body
-----------------------------114782935826962
Content-Disposition: form-data; name="yamlFile"; filename="identities.yaml"
Content-Type: application/octet-stream
localUsers:
john:
email: john@mail.org
givenName: John
familyName: Doe
password: mysecretpassword
globalPermissions:
- "VIEW_PROJECT"
tenantPermissions:
DEV:
- "MODIFY_PROJECT"
projectPermissions:
DEV-SIVEN-MASTER:
- "ADMIN_PROJECT"
inventoryPermissions:
DEV-SIVEN-INVENTORY:
- "DEPLOY_INVENTORY"
groups:
admins:
description: "Group of administrators"
ldapDNs:
- "CN=dummyGroup1,CN=Users,DC=samdom,DC=local"
localUsers:
- "john"
globalPermissions:
- "ADMIN_PROJECT"
- "ADMIN_INVENTORY"
- "VIEW_PROJECT"
- "VIEW_INVENTORY"
tenantPermissions:
DEV:
- "CREATE_PROJECT"
- "CREATE_INVENTORY"
projectPermissions:
DEV-SIVEN-MASTER:
- "MODIFY_PROJECT"
inventoryPermissions:
DEV-SIVEN-INVENTORY:
- "DEPLOY_INVENTORY"
-----------------------------114782935826962--
200
Headers
Content-Type: application/json
Permission ¶
Resources related to permissions in the API.
List all assigned permissions ¶
List all assigned permissionsGET/permissions{?target,operationKey,withUserName,allAssignees}
Returns a list of all assigned permissions to groups and users (so no permissions granted by a role or by belonging to a group).
Example URI
- target
String
(required) Example: /tenants/DEVTarget of the permissions.
- operationKey
String[]
(required) Example: VIEW_PROJECTList of keys of the operations the permission provides.
- withUserName
boolean
(optional) Example: trueBoolean value that indicates if the reponse gets the ‘assigneeName’ or not (only for users, not groups). It is false by default.
- allAssignees
boolean
(optional) Example: trueBoolean value that indicates if the reponse gets all groups and users even if they have no permissions assigned. It is false by default.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"assignee": "user://admin",
"permissions": [
{
"target": "/tenants/DEV/projects/DEV-SIVEN-MASTER",
"operationKey": "VIEW_PROJECT"
},
{
"target": "/tenants/DEV",
"operationKey": "VIEW_PROJECT"
}
]
},
{
"assignee": "group://adminGroup",
"permissions": [
{
"target": "/tenants/DEV/projects/DEV-SIVEN-MASTER",
"operationKey": "VIEW_PROJECT"
}
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"assignee": {
"type": "string"
},
"assigneeName": {
"type": "string"
},
"permissions": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"target": {
"type": "string"
},
"operationKey": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"target",
"operationKey"
]
}
]
}
},
"additionalProperties": false,
"required": [
"assignee",
"permissions"
]
}
]
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Modify permissions ¶
Modify permissionsPUT/permissions
Example URI
Headers
Content-Type: application/json
Body
{
"items": [
{
"assignee": "user://admin",
"addPermissions": [
{
"target": "/tenants/DEV/inventories/DEV-SIVEN-INVENTORY",
"operationKey": "DEPLOY_INVENTORY"
}
],
"removePermissions": [
{
"target": "/tenants/DEV/projects/DEV-SIVEN-MASTER",
"operationKey": "VIEW_PROJECT"
}
]
}
]
}
200
Headers
Content-Type: application/json
Operation ¶
Resources related to operations in the API.
Get list of Operations ¶
Get list of OperationsGET/operations
Example URI
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"operationKey": "VIEW_PROJECT",
"name": "View project",
"description": "View project settings"
},
{
"operationKey": "MODIFY_PROJECT",
"name": "Modify project",
"description": "Modify project settings"
}
]
}
Get list of assigned permissions using an operation ¶
Get list of assigned permissions using an operationGET/operations/{operationKey}/usage
Example URI
- operationKey
string
(required) Example: ADMIN_INVENTORYKey of the operation.
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"assignee": "admin",
"assigneeName": "",
"permission": {
"target": "/",
"operationKey": "ADMIN_INVENTORY"
},
"permissionType": "USER_DIRECT"
},
{
"assignee": "admin",
"assigneeName": "",
"permission": {
"target": "/tenants/DEFAULT/inventories/DEFAULT-TEST_UNVERSIONED",
"operationKey": "ADMIN_INVENTORY"
},
"permissionType": "USER_DIRECT"
}
]
}
Secret ¶
Recover secret access ¶
Recover secret accessPOST/recover-master-key
Recover access to your secrets. The password provided when using this endpoint must be the password of the local admin user.
Permissions
- Requires SUPER_ADMIN
Example URI
Headers
Content-Type: application/json
Body
{
"password": "***"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"password": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"password"
]
}
200
Headers
Content-Type: application/json
Search ¶
Search ¶
SearchPOST/tenants/{tenantKey}/search/
Search in a project, in an inventory, or everywhere. Searches are performed case-insensitively.
Permissions
-
Requires ‘VIEW_PROJECT’ on ‘tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’) if a project is specified as the scope of the search.
-
Requires ‘VIEW_INVENTORY’ on ‘tenants/{tenantKey}/inventories/{inventoryKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’) if an inventory is specified as the scope of the search.
-
If neither are specified, no permissions are required, but the search will only return results from projects where the user has ‘VIEW_PROJECT’ on tenants/{tenantKey}/projects/{projectKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’), plus results from inventories where the user has ‘VIEW_INVENTORY’ on tenants/{tenantKey}/inventories/{inventoryKey}’ or higher level targets (e.g. ‘/tenants/{tenantKey}’),
Example URI
- tenantKey
string
(required) Example: DEFAULTKey of the tenant.
200
Headers
Content-Type: application/json
Body
{
"searchTerm": "applicationContext",
"searchResultTypes": [
"PROJECT_DESCRIPTION",
"PATTERN_NAME",
"PROPERTY_VALUE",
"PATTERN_NOTE",
"VARIABLE_KEY",
"ATTACHMENT_FILE_NAME",
"ATTACHMENT_FILE_CONTENT"
],
"projectKey": "DEFAULT-SIVEN-MASTER"
}
Schema
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"searchTerm":{
"type":"string"
},
"searchResultTypes":{
"type":"array",
"items":{
"type":"string"
}
}
"projectKey":{
"type":"string"
}
},
"additionalProperties":false,
"required":[
"searchTerm",
"searchResultTypes"
]
}
200
Headers
Content-Type: application/json
Body
{
items:
[
{
"searchResultType: "ATTACHMENT_FILE_NAME",
"searchResultId": {
"projectKey": "DEFAULT-GLOBAL-SEARCH-TEST-MASTER",
"patternId": "467332bed274b4061e8fb2d4",
"fieldKey": "errorPages",
"fileName": "searchTerm.html",
"patternName": "HTTP error handling"
},
"sample": "searchTerm.html"
},
{
"searchResultType: "ATTACHMENT_FILE_CONTENT",
"searchResultId": {
"projectKey": "DEFAULT-GLOBAL-SEARCH-TEST-MASTER",
"patternId": "467332bed274b4061e8fb2d4",
"fieldKey": "errorPages",
"fileName": "searchTerm.html",
"lineNumber": 1,
"patternName": "HTTP error handling"
},
"sample": "\tsearchTerm head"
},
{
"searchResultType: "ATTACHMENT_FILE_CONTENT",
"searchResultId": {
"projectKey": "DEFAULT-GLOBAL-SEARCH-TEST-MASTER",
"patternId": "467332bed274b4061e8fb2d4",
"fieldKey": "errorPages",
"fileName": "sanyi.html",
"lineNumber": 4,
"patternName": "HTTP error handling"
},
"sample": "\tsearchTerm body"
},
{
"searchResultType: "VARIABLE_KEY",
"searchResultId": {
"projectKey": "DEFAULT-GLOBAL-SEARCH-TEST-MASTER",
"variableKey": "deleted-http-searchTerm-handling-redirect-status-code-mapping"
},
"sample": "deleted-http-searchTerm-handling-redirect-status-code-mapping"
}
]
}
Schema
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"type":"array"
"items":{
"type":"object"
"properties":[
"searchResultType":{
"type":"string"
},
"searchResultId":{
"type":"object"
"properties":[
"projectKey":{
"type":"string"
},
"patternId":{
"type":"string"
},
"fieldKey":{
"type":"string"
},
"fileName":{
"type":"string"
},
"lineNumber":{
"type":"number"
},
"variableKey":{
"type":"string"
},
"patternName":{
"type":"string"
}
]
},
"sample":{
"type":"string"
}
]
}
}
200
Headers
Content-Type: application/json
Body
{
"searchTerm": "color",
"searchResultTypes": [
"INVENTORY_CONTENT",
"SECRET_DESCRIPTION",
"SECRET_FILE_DESCRIPTION",
"NON_SECRET_FILE_DESCRIPTION",
"SECRET_FILE_NAME",
"NON_SECRET_FILE_NAME"
],
"inventoryKey": "DEFAULT-INV-K8S-USER3"
}
200
Headers
Content-Type: application/json
Body
{
"items": [
{
"searchResultType": "INVENTORY_CONTENT",
"searchResultId": {
"tenantKey": "DEFAULT",
"inventoryKey": "DEFAULT-INV-K8S-USER3",
"lineNumber": 3
},
"sample": "color: blue"
},
{
"searchResultType": "SECRET_DESCRIPTION",
"searchResultId": {
"inventoryKey": "DEFAULT-INV-K8S-USER3",
"lineNumber": 1,
"secretId": "a167a854239a25a85fd8e5d8"
},
"sample": "secret for blue color inventory"
}
]
}
Product Analytics ¶
Resources related to product analytics.
Download the product analytics ¶
Download the product analyticsGET/product-analytics
Download the product analytics.
Example URI
200
Headers
Content-Type: application/octet-stream
accept-ranges: bytes
content-disposition: attachment; filename="product-analytics.jsonl"
content-length: 14201
date: Tue,23 Apr 2024 13:04:48 GMT
referrer-policy: same-origin
vary: Origin,Access-Control-Request-Method,Access-Control-Request-Headers
Body
{"metric":{"__name__":"nevisadmin_inventory_count","instance":"nevisadmin4-0","job":"nevisadmin4-monitoring","type":"nevis-product-analytics"},"value":[1.713877488998E9,"7"]}
{"metric":{"__name__":"nevisadmin_inventory_secret_count","instance":"nevisadmin4-0","inventoryKey":"DEFAULT-CLOUD","job":"nevisadmin4-monitoring","type":"nevis-product-analytics"},"value":[1.713877488998E9,"1"]}
{"metric":{"__name__":"nevisadmin_inventory_secret_count","instance":"nevisadmin4-0","inventoryKey":"DEFAULT-COMPLEX-MANUAL","job":"nevisadmin4-monitoring","type":"nevis-product-analytics"},"value":[1.713877488998E9,"1"]}
{"checksum":"86bc3c079c3b67727797e1a4aacfdb15a871b2915a1cc86884173c012d480e25"}
Confirm report was sent ¶
Confirm report was sentPOST/product-analytics/confirm-sent
Confirm that the analytics report was sent to Zendesk.
Example URI
200
Headers
content-length: 0
date: Tue,23 Apr 2024 13:20:26 GMT
referrer-policy: same-origin
vary: Origin,Access-Control-Request-Method,Access-Control-Request-Headers