Skip to content

Commit

Permalink
add application completion
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller committed Apr 2, 2024
1 parent d85070e commit fb0e73b
Show file tree
Hide file tree
Showing 29 changed files with 434 additions and 149 deletions.
99 changes: 62 additions & 37 deletions api/spec/json/applicationVersions.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"description": "Get application version collection",
"descriptionLong": "Get a collection of application versions by a given filter",
"method": "GET",
"path": "/application/applications/{id}/versions",
"path": "/application/applications/{application}/versions",
"accept": "application/vnd.com.nsn.cumulocity.applicationVersionCollection+json",
"collectionType": "application/vnd.com.nsn.cumulocity.applicationVersion+json",
"collectionProperty": "applicationVersions",
Expand All @@ -23,25 +23,30 @@
"powershell": [
{
"description": "Get application versions",
"command": "Get-ApplicationVersionCollection -Id 1234"
"command": "Get-ApplicationVersionCollection -Application 1234"
}
],
"go": [
{
"description": "Get application versions",
"command": "c8y applications versions list --id 1234 --pageSize 100"
"command": "c8y applications versions list --application 1234 --pageSize 100"
},
{
"description": "Get an application versions by name",
"command": "c8y applications versions list --id cockpit"
"command": "c8y applications versions list --application cockpit"
}
]
},
"pathParameters": [
{
"name": "id",
"type": "hostedapplication",
"description": "Application"
"name": "application",
"type": "application_with_versions",
"description": "Application",
"pipeline": true,
"pipelineAliases": [
"id",
"name"
]
}
]
},
Expand All @@ -50,41 +55,46 @@
"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/{id}/versions",
"path": "/application/applications/{application}/versions",
"accept": "application/vnd.com.nsn.cumulocity.applicationVersion+json",
"addAccept": true,
"collectionProperty": "-",
"alias": {
"go": "find",
"go": "get",
"powershell": "Get-ApplicationVersion"
},
"examples": {
"powershell": [
{
"description": "Get application version by tag",
"command": "Get-ApplicationVersion -Id 1234 -Tag tag1"
"command": "Get-ApplicationVersion -Application 1234 -Tag tag1"
},
{
"description": "Get application version by version name",
"command": "Get-ApplicationVersion -Id 1234 -Version 1.0"
"command": "Get-ApplicationVersion -Application 1234 -Version 1.0"
}
],
"go": [
{
"description": "Get application version by tag",
"command": "c8y applications versions find --id 1234 --tag tag1"
"command": "c8y applications versions get --application 1234 --tag tag1"
},
{
"description": "Get application version by version name",
"command": "c8y applications versions find --id 1234 --version 1.0"
"command": "c8y applications versions get --application 1234 --version 1.0"
}
]
},
"pathParameters": [
{
"name": "id",
"type": "hostedapplication",
"description": "Application"
"name": "application",
"type": "application_with_versions",
"description": "Application",
"pipeline": true,
"pipelineAliases": [
"id",
"name"
]
}
],
"queryParameters": [
Expand All @@ -105,7 +115,7 @@
"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/{id}/versions",
"path": "/application/applications/{application}/versions",
"accept": "application/json",
"collectionProperty": "-",
"alias": {
Expand All @@ -116,22 +126,27 @@
"powershell": [
{
"description": "Create a new application version",
"command": "New-ApplicationVersion -Name $AppName -Key \"${AppName}-key\" -ContextPath $AppName -Type HOSTED",
"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 --id 1234 --file ./myapp.zip --version \"\""
"command": "c8y applications versions create --application 1234 --file ./myapp.zip --version \"2.0.0\""
}
]
},
"pathParameters": [
{
"name": "id",
"type": "hostedapplication",
"description": "Application"
"name": "application",
"type": "application_with_versions",
"description": "Application",
"pipeline": true,
"pipelineAliases": [
"id",
"name"
]
}
],
"bodyContent": {
Expand Down Expand Up @@ -179,7 +194,7 @@
"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/{id}/versions",
"path": "/application/applications/{application}/versions",
"alias": {
"go": "delete",
"powershell": "Remove-ApplicationVersion"
Expand All @@ -188,29 +203,34 @@
"powershell": [
{
"description": "Delete application version by tag",
"command": "Remove-ApplicationVersion -Id 1234 -Tag tag1"
"command": "Remove-ApplicationVersion -Application 1234 -Tag tag1"
},
{
"description": "Delete application version by version name",
"command": "Remove-ApplicationVersion -Id 1234 -Version 1.0"
"command": "Remove-ApplicationVersion -Application 1234 -Version 1.0"
}
],
"go": [
{
"description": "Delete application version by tag",
"command": "c8y applications versions delete --id 1234 --tag tag1"
"command": "c8y applications versions delete --application 1234 --tag tag1"
},
{
"description": "Delete application version by version name",
"command": "c8y applications versions delete --id 1234 --version 1.0"
"command": "c8y applications versions delete --application 1234 --version 1.0"
}
]
},
"pathParameters": [
{
"name": "id",
"type": "hostedapplication",
"description": "Application"
"name": "application",
"type": "application_with_versions",
"description": "Application",
"pipeline": true,
"pipelineAliases": [
"id",
"name"
]
}
],
"queryParameters": [
Expand All @@ -231,7 +251,7 @@
"description": "Replace an application version's tags",
"descriptionLong": "Replaces the tags of a given application version in your tenant",
"method": "PUT",
"path": "/application/applications/{id}/versions/{version}",
"path": "/application/applications/{application}/versions/{version}",
"accept": "application/vnd.com.nsn.cumulocity.applicationVersion+json",
"collectionProperty": "-",
"addAccept": true,
Expand All @@ -243,25 +263,30 @@
"powershell": [
{
"description": "Get application version by tag",
"command": "Update-ApplicationVersionTag -Id 1234 -Tag tag1"
"command": "Update-ApplicationVersionTag -Application 1234 -Tag tag1"
},
{
"description": "Get application version by version name",
"command": "Update-ApplicationVersionTag -Id 1234 -Version 1.0"
"command": "Update-ApplicationVersionTag -Application 1234 -Version 1.0"
}
],
"go": [
{
"description": "Replace application version's tags",
"command": "c8y applications versions update --id 1234 --version 1.0 --tag tag1,latest"
"command": "c8y applications versions update --application 1234 --version 1.0 --tag tag1,latest"
}
]
},
"pathParameters": [
{
"name": "id",
"type": "hostedapplication",
"description": "Application"
"name": "application",
"type": "application_with_versions",
"description": "Application",
"pipeline": true,
"pipelineAliases": [
"id",
"name"
]
},
{
"name": "version",
Expand Down
1 change: 1 addition & 0 deletions api/spec/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"enum": [
"application",
"applicationname",
"application_with_versions",
"hostedapplication",
"boolean",
"booleanDefault",
Expand Down
Loading

0 comments on commit fb0e73b

Please sign in to comment.