Developer API - Applications Versions

  1. Application version attributes
  2. List of all application versions
  3. Find a specific application version
  4. Create a new application version
  5. Update an application version
  6. Delete an application version

Application version attributes

An application version has the following attributes:

Name Type Description
id Integer Record ID
app_id Integer Application ID
number String Version number
crc String Application version CRC
size Integer Version size (bytes)
created_by Integer User ID that created the record
displayable Boolean Determine whether the application should be displayed in the services menu
authorizer_url String Authorizer IP address or URL.
pos_display_label String POS exibition name (if displayable is true)
created_at String Timestamp in ISO 8601 format
updated_at String Timestamp in ISO 8601 format
uuid String Universally unique identifier
group_ids Array Groups IDs that the version is associated (returned in a specific search)
module_ids Array Modules IDs that are associated with the version (returned in a specific search)
file_ids Array Files IDs that are associated with the version (returned in a specific search)

List of all application versions

Return an array with all application versions.

Method and URL format

GET https://api.cloudwalk.io/{version}/apps/{type}/{id_app}/versions?access_token={token}

Example of use

$ curl -X GET "https://api.cloudwalk.io/v1/apps/posxml/173/versions?access_token=$TOKEN"
require 'net/http'

token = 'API_TOKEN'

uri = URI("https://api.cloudwalk.io/v1/apps/posxml/173/versions?access_token=#{token}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

res = http.request(request)

puts "Response #{res.code} #{res.message}: #{res.body}"

Example of response

{
   "pagination":{
      "page":1,
      "total_pages":1,
      "entries":2,
      "total_entries":2
   },
   "appversions":[
      {
         "app_version":{
            "id":102,
            "app_id":172,
            "number":"1.0.1",
            "crc":"48AF",
            "size":13183,
            "created_by":1111,
            "displayable":true,
            "uuid": "50f1887fce9c4e50a6a6269309d13b15",
            "authorizer_url": "http://myhost.com",
            "pos_display_label": "HELLO WORLD v2",
            "created_at": "2018-03-30T12:09:30-03:00",
            "updated_at": "2018-03-30T12:09:49-03:00"
         }
      },
      {
         "app_version":{
            "id":101,
            "app_id":172,
            "number":"1.0.0",
            "crc":"48AF",
            "size":13183,
            "created_by":1111,
            "displayable":true,
            "uuid": "50f1521fce9c4e50a6a6269309d13b15",
            "authorizer_url": "http://myhost.com",
            "pos_display_label": "HELLO WORLD",
            "created_at": "2018-01-30T12:09:30-03:00",
            "updated_at": "2018-01-30T12:09:49-03:00"
         }
      }
   ]
}

Find a specific application version

Return the details of a specific application version.

Method and URL format

GET https://api.cloudwalk.io/{version}/apps/{type}/{id_app}/versions/{id_version}?access_token={token}

Example of use

$ curl -X GET "https://api.cloudwalk.io/v1/apps/posxml/172/versions/102?access_token=$TOKEN"
require 'net/http'

token = 'API_TOKEN'

uri = URI("https://api.cloudwalk.io/v1/apps/posxml/172/versions/102?access_token=#{token}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

res = http.request(request)

puts "Response #{res.code} #{res.message}: #{res.body}"

Example of response

{
  "app_version":{
    "id":102,
    "app_id":172,
    "number":"1.0.1",
    "crc":"48AF",
    "size":13183,
    "created_by":1111,
    "displayable":true,
    "bytecode":"PgoxCg0+CjIKDT4KMwoNPgo0Cg0+CjUKDT4KNgoNPgo3Cg0+CjgKDT4KOQoNPlBPU1QKM"
    "uuid": "50f1887fce9c4e50a6a6269309d13b15",
    "authorizer_url": "http://myhost.com",
    "pos_display_label": "HELLO WORLD v2",
    "created_at": "2018-03-30T12:09:30-03:00",
    "updated_at": "2018-03-30T12:09:49-03:00"
    "group_ids": [354],
    "module_ids": [12579],
    "file_ids": [951478]
  }
}

Create a new application version

Create a new application version.

Method and URL format

POST https://api.cloudwalk.io/{version}/apps/{type}/{id_app}/versions?access_token={token}

Example of use

$ curl -X POST "https://api.cloudwalk.io/v1/apps/posxml/172/versions?access_token=$TOKEN" \
-d '{"number":"1.0.2","displayable":"true","authorizer_url":"http://myhost.com","pos_display_label":"HELLO WORLD v3"}'
require 'net/http'
require 'json'

token = 'API_TOKEN'

payload = {
  "number" => "1.0.2",
  "displayable" => true,
  "authorizer_url" => "http://myhost.com",
  "pos_display_label" => "HELLO WORLD v3"
}

uri = URI("https://api.cloudwalk.io/v1/apps/posxml/172/versions?access_token=#{token}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri.request_uri)
request.body = payload.to_json

res = http.request(request)

puts "Response #{res.code} #{res.message}: #{res.body}"

Example of response

{
  "app_version": {
    "id": 103,
    "app_id": 172,
    "number": "1.0.2",
    "crc": "1018",
    "size": 22,
    "created_by": 1111,
    "displayable": true,
    "bytecode": "ZDAKMAp6ZW52aWEucG9zeG1sCg11DQ==",
    "uuid": "398a30df90e1444912585660d3aa3b6b",
    "authorizer_url": "http://myhost.com",
    "pos_display_label": "HELLO WORLD v3",
    "created_at": "2018-07-10T17:15:56.025-03:00",
    "updated_at": "2018-07-10T17:15:56.025-03:00"
  }
}

Update an application version

Update an existing application version.

Method and URL format

PUT https://api.cloudwalk.io/{version}/apps/{type}/{id_app}/versions/{id_version}?access_token={token}

Example of use

$ curl -X PUT "https://api.cloudwalk.io/v1/apps/posxml/172/versions/103?access_token=$TOKEN" \
-d '{"authorizer_url":"http://my-new-host.com"}'
require 'net/http'
require 'json'

token = 'API_TOKEN'

payload = {
  "authorizer_url" => "http://my-new-host.com"
}

uri = URI("https://api.cloudwalk.io/v1/apps/posxml/172/versions/103?access_token=#{token}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Put.new(uri.request_uri)
request.body = payload.to_json

res = http.request(request)

puts "Response #{res.code} #{res.message}: #{res.body}"

Example of response

{
  "app_version": {
    "id": 103,
    "app_id": 172,
    "number": "1.0.2",
    "crc": "1018",
    "size": 22,
    "created_by": 1111,
    "displayable": true,
    "bytecode": "ZDAKMAp6ZW52aWEucG9zeG1sCg11DQ==",
    "uuid": "398a30df90e1444912585660d3aa3b6b",
    "authorizer_url": "http://my-new-host.com",
    "pos_display_label": "HELLO WORLD v3",
    "created_at": "2018-07-10T17:15:56.025-03:00",
    "updated_at": "2018-07-10T17:15:56.025-03:00"
  }
}

Delete an application version

Delete an application version.

Method and URL format

DELETE https://api.cloudwalk.io/{version}/apps/{type}/{id_app}/versions/{id_version}?access_token={token}

Example of use

$ curl -X DELETE "https://api.cloudwalk.io/v1/apps/posxml/172/versions/103?access_token=$TOKEN"
require 'net/http'

token = 'API_TOKEN'

uri = URI("https://api.cloudwalk.io/v1/apps/posxml/172/versions/103?access_token=#{token}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(uri.request_uri)

res = http.request(request)

puts "Response #{res.code} #{res.message}: #{res.body}"

Example of response

{}