Skip to content

foundation-licenses

  • UNDER CONSTRUCTION

  • The contents of this page are subject to change

Overview

Licenses is a Foundation's module responsible for providing the information for Synchro customers to license the contracted products into Foundation.

This module will not work on its own, internet connection is necessary, not for all, the access must be set for a specific address (This specific address will be informed in application requirements).

Setup

Starting the licenses module, it's necessary to inform Synchro licensing URL

Synchro licensing URL

Please fill in the information requested with: host:port

Important

It is also important to make sure that specific address is not being blocked by your firewall.

License Requirements

In order to ensure a correct performance of licenses module, must be informed:

  • License key
  • Environment Type

Fill in the information requested in Tenant information.

Licenses information

About the License key

The customer will receive the license key by a specific department.

Not received yet? For now, fill in with any value.

License Activation

Activation is the process of activating a license that allows you to use the application until the license expires.

Use the License Activation button in Tenant list to start the licensing process.

Tenant list

Failed License Activation

If license activation fails, you'll see Unlicensed Product in the title bar of your Foundation apps, and access to apps are disabled. To restore all features of apps, you'll need to fix the problem that's causing activation to fail.

Developer Questions

Endpoints available for Licenses Module

Your app can make requests to the following REST endpoints:

Actions

Token

Don't worry about Token, it is generated by Foundation with Tenant ID.

Validation

Service of periodical validation of software license to ensure that the products are up-to-date and operating correctly.

Code samples:

Object Payload (JSON)

{
   "tenant":"TESTE"
}

Shell

curl -X GET \
  -H "Content-type: application/json" \
  -H "Accept: application/json" \
  -d '{"tenant":"TESTE"}' \
  -H 'Cookie: JSESSIONID=node0uyah95og25441xcb4r052xorx27.node0; FOUNDATIONID=eyJhbGciOiJIUzI1NiJ9' \
  "http://127.0.0.1/licenses/validation"

Success Responses

{
   "success":true,
   "result":"Success Validation",
   "details":null,
   "content":{
      "sistemas":[
         {
            "sistema":"SFISC",
            "produtos":[
               {
                  "codigocliente":"XXX",
                  "sistema":"SFISC",
                  "tituloproduto":"Governança",
                  "siglaproduto":"OBR_CLOUD",
                  "statusproduto":"ATIVO",
                  "quantidadesites":1,
                  "quantidadeestabelecimentos":7,
                  "quantidadeusuarios":2,
                  "quantidadetransacoes":0,
                  "quantidadeempregados":0,
                  "datainiciovigencia":"Apr 1, 2017 12:00:00 AM",
                  "dataterminovigencia":"Mar 31, 2018 12:00:00 AM"
               },
               {
                  "codigocliente":"XXX",
                  "sistema":"WEB",
                  "tituloproduto":"Apuração de Contribuições",
                  "siglaproduto":"APURA",
                  "statusproduto":"ATIVO",
                  "quantidadesites":4,
                  "quantidadeestabelecimentos":3,
                  "quantidadeusuarios":4,
                  "quantidadetransacoes":0,
                  "quantidadeempregados":0,
                  "datainiciovigencia":"Jun 1, 2016 12:00:00 AM",
                  "dataterminovigencia":"May 31, 2017 12:00:00 AM"
               }
            ]
         }
      ]
   },
   "version":""
}
Error Response

{
   "success":false,
   "result":"An error occurred while trying to read tenant details",
   "details":null,
   "content":{
      "tenant":"",
      "environment":"",
      "error":"Tenant not found",
      "response":""
   },
   "version":""
}

Collect

Service of periodical collect of software information, version and environment.

Code samples:

Object Payload (JSON)

{
   "tenant":"TESTE",
   "siglaProduto":"XsX",
   "versao":"1.4v",
   "parametros":[
      {
         "chave":"PARAM0001",
         "valor":"1"
      }
   ]
}

Shell

  curl 'http://127.0.0.1/licenses/collect' \
  -H 'Cookie: JSESSIONID=node0uyah95og25441xcb4r052xorx27.node0; FOUNDATIONID=eyJhbGciOiJIUzI1NiJ9' \
  --data-binary '{"tenant":"TESTE","siglaProduto":"XsX","versao":"1.4v","parametros":[{"chave":"PARAM0001","valor":"1"}]}' \
  --compressed

Success Responses

{
   "success":true,
   "result":"Success Collect",
   "details":null,
   "content":{
      "msg":"Coleta salva com sucesso!"
   },
   "version":""
}

Error response

{
   "success":false,
   "result":"An error occurred while trying to collect information",
   "details":null,
   "content":{
      "errorCode":150,
      "message":"Parâmetros obrigatórios: token, siglaProduto, versao, ambiente e possuir pelo menos 1 parâmetro"
   },
   "version":""
}