Skip to content

Commit

Permalink
Merge pull request #354 from reubenmiller/feat-application-versions
Browse files Browse the repository at this point in the history
feat: ui plugin management
  • Loading branch information
reubenmiller authored Apr 26, 2024
2 parents 00f1c17 + 9bbc856 commit 61fd14f
Show file tree
Hide file tree
Showing 129 changed files with 8,741 additions and 62 deletions.
325 changes: 325 additions & 0 deletions api/spec/json/applicationVersions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,325 @@
{
"group": {
"name": "applications/versions",
"description": "Cumulocity application versions",
"descriptionLong": "API methods to retrieve, create, update and delete application versions",
"link": "https://cumulocity.com/api/core/#tag/Application-versions"
},
"commands": [
{
"name": "getApplicationVersionCollection",
"description": "Get application version collection",
"descriptionLong": "Get a collection of application versions by a given filter",
"method": "GET",
"path": "/application/applications/{application}/versions",
"accept": "application/vnd.com.nsn.cumulocity.applicationVersionCollection+json",
"collectionType": "application/vnd.com.nsn.cumulocity.applicationVersion+json",
"collectionProperty": "applicationVersions",
"alias": {
"go": "list",
"powershell": "Get-ApplicationVersionCollection"
},
"examples": {
"powershell": [
{
"description": "Get application versions",
"command": "Get-ApplicationVersionCollection -Application 1234"
}
],
"go": [
{
"description": "Get application versions",
"command": "c8y applications versions list --application 1234 --pageSize 100"
},
{
"description": "Get an application versions by name",
"command": "c8y applications versions list --application cockpit",
"assertStdOut": {
"json": {
"path": "r//application/applications/\\d+/versions$"
}
}
}
]
},
"pathParameters": [
{
"name": "application",
"type": "application_with_versions",
"description": "Application",
"pipeline": true,
"pipelineAliases": [
"id",
"name"
]
}
]
},
{
"name": "getApplicationVersion",
"description": "Get a specific version of an application",
"descriptionLong": "Retrieve the selected version of an application in your tenant. To select the version, use only the version or only the tag query parameter",
"method": "GET",
"path": "/application/applications/{application}/versions",
"accept": "application/vnd.com.nsn.cumulocity.applicationVersion+json",
"addAccept": true,
"collectionProperty": "-",
"alias": {
"go": "get",
"powershell": "Get-ApplicationVersion"
},
"examples": {
"powershell": [
{
"description": "Get application version by tag",
"command": "Get-ApplicationVersion -Application 1234 -Tag tag1"
},
{
"description": "Get application version by version name",
"command": "Get-ApplicationVersion -Application 1234 -Version 1.0"
}
],
"go": [
{
"description": "Get application version by tag",
"command": "c8y applications versions get --application 1234 --tag tag1"
},
{
"description": "Get application version by version name",
"command": "c8y applications versions get --application 1234 --version 1.0"
}
]
},
"pathParameters": [
{
"name": "application",
"type": "application_with_versions",
"description": "Application",
"pipeline": true,
"pipelineAliases": [
"id",
"name"
]
}
],
"queryParameters": [
{
"name": "version",
"type": "string",
"description": "The version field of the application version"
},
{
"name": "tag",
"type": "string",
"description": "The tag of the application version"
}
]
},
{
"name": "newApplicationVersion",
"description": "Create application version",
"descriptionLong": "Uploaded version and tags can only contain upper and lower case letters, integers and ., +, -. Other characters are prohibited.",
"method": "POST",
"path": "/application/applications/{application}/versions",
"accept": "application/json",
"collectionProperty": "-",
"alias": {
"go": "create",
"powershell": "New-ApplicationVersion"
},
"examples": {
"powershell": [
{
"description": "Create a new application version",
"command": "New-ApplicationVersion -Application 1234 -File ./myapp.zip -Version \"2.0.0\"",
"skipTest": true
}
],
"go": [
{
"description": "Create a new application version",
"command": "c8y applications versions create --application 1234 --file \"./testdata/myapp.zip\" --version \"2.0.0\"",
"skipTest": true
}
]
},
"pathParameters": [
{
"name": "application",
"type": "application_with_versions",
"description": "Application",
"pipeline": true,
"pipelineAliases": [
"id",
"name"
]
}
],
"bodyContent": {
"type": "formdata"
},
"bodyTemplateOptions": {
"enabled": true
},
"body": [
{
"name": "file",
"type": "formDataFile",
"property": "applicationBinary",
"description": "The ZIP file to be uploaded"
},
{
"name": "version",
"property": "version",
"type": "string",
"options": {
"formData": "applicationVersion"
},
"required": true,
"description": "The JSON file with version information."
},
{
"name": "tags",
"property": "tags",
"type": "string[]",
"options": {
"formData": "applicationVersion"
},
"required": true,
"description": "The JSON file with version information. todo"
},
{
"name": "data",
"type": "json_custom",
"description": "data"
}
]
},
{
"name": "deleteApplicationVersion",
"description": "Delete a specific version of an application",
"descriptionLong": "Delete a specific version of an application in your tenant, by a given tag or version",
"method": "DELETE",
"path": "/application/applications/{application}/versions",
"alias": {
"go": "delete",
"powershell": "Remove-ApplicationVersion"
},
"examples": {
"powershell": [
{
"description": "Delete application version by tag",
"command": "Remove-ApplicationVersion -Application 1234 -Tag tag1"
},
{
"description": "Delete application version by version name",
"command": "Remove-ApplicationVersion -Application 1234 -Version 1.0"
}
],
"go": [
{
"description": "Delete application version by tag",
"command": "c8y applications versions delete --application 1234 --tag tag1"
},
{
"description": "Delete application version by version name",
"command": "c8y applications versions delete --application 1234 --version 1.0"
}
]
},
"pathParameters": [
{
"name": "application",
"type": "application_with_versions",
"description": "Application",
"pipeline": true,
"pipelineAliases": [
"id",
"name"
]
}
],
"queryParameters": [
{
"name": "version",
"type": "string",
"description": "The version field of the application version"
},
{
"name": "tag",
"type": "string",
"description": "The tag of the application version"
}
]
},
{
"name": "updateApplicationVersionTags",
"description": "Replace an application version's tags",
"descriptionLong": "Replaces the tags of a given application version in your tenant",
"method": "PUT",
"path": "/application/applications/{application}/versions/{version}",
"accept": "application/vnd.com.nsn.cumulocity.applicationVersion+json",
"collectionProperty": "-",
"addAccept": true,
"alias": {
"go": "update",
"powershell": "Update-ApplicationVersionTag"
},
"examples": {
"powershell": [
{
"description": "Get application version by tag",
"command": "Update-ApplicationVersionTag -Application 1234 -Tag tag1"
},
{
"description": "Get application version by version name",
"command": "Update-ApplicationVersionTag -Application 1234 -Version 1.0"
}
],
"go": [
{
"description": "Replace application version's tags",
"command": "c8y applications versions update --application 1234 --version 1.0 --tag tag1,latest",
"assertStdOut": {
"json": {
"path": "/application/applications/1234/versions/1.0",
"body.tags.0": "tag1",
"body.tags.1": "latest"
}
}
}
]
},
"pathParameters": [
{
"name": "application",
"type": "application_with_versions",
"description": "Application",
"pipeline": true,
"pipelineAliases": [
"id",
"name"
]
},
{
"name": "version",
"type": "string",
"description": "Application version"
}
],
"body": [
{
"name": "tag",
"property": "tags",
"type": "string[]",
"description": "Tag assigned to the version. Version tags must be unique across all versions and version fields of application versions"
},
{
"name": "data",
"type": "json",
"description": "Custom data"
}
]
}
]
}
10 changes: 10 additions & 0 deletions api/spec/json/applications.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@
"name": "hasVersions",
"type": "boolean",
"description": "When set to true, the returned result contains applications with an applicationVersions field that is not empty. When set to false, the result will contain applications with an empty applicationVersions field."
},
{
"name": "availability",
"type": "string",
"description": "Application access level for other tenants.",
"validationSet": [
"SHARED",
"PRIVATE",
"MARKET"
]
}
]
},
Expand Down
12 changes: 12 additions & 0 deletions api/spec/json/binaries.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@
"type": "id[]",
"required": true,
"pipeline": true,
"pipelineAliases": [
"id",
"binaryId"
],
"description": "Inventory binary id"
}
]
Expand Down Expand Up @@ -271,6 +275,10 @@
"type": "id[]",
"required": true,
"pipeline": true,
"pipelineAliases": [
"id",
"binaryId"
],
"description": "Inventory binary id"
}
],
Expand Down Expand Up @@ -328,6 +336,10 @@
"type": "id[]",
"required": true,
"pipeline": true,
"pipelineAliases": [
"id",
"binaryId"
],
"description": "Inventory binary id"
}
]
Expand Down
Loading

0 comments on commit 61fd14f

Please sign in to comment.