NAO Track configuration publication

NAO Track configuration publication

After the NAO Cloud configuration has been updated, a publication is required before the changes are taken into account in production.

The publication is an asynchronous process, meaning that it will take time and does not return an immediate response.

When the system receives the request, it will return a HTTP 303 response. The header of the response will contain the location header. The URL in location contains the information about the status of the publication process.

The location header contains the ID of the background job. You can use the proposed URL in the location header to get the status in JSON format and to monitor the processing progress. The format of the URL is API_VERSION_PREFIX/background_jobs/{id} endpoint.

code example:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/vnd.api+json' --header 'Authorization:JhbGciOiJIUzI1NiJ9' 'https://www.nao-cloud.com/api/v2/sites/11090/asset_tracking_config/publish'

curl response for the first time (http 303):

HTTP/1.1 303 See Other
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
x-download-options: noopen
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
permissions-policy: geolocation=(), camera=(), microphone=(), usb=(), payment=()
feature-policy: microphone ‘none’; geolocation ‘none’
location: https://www.nao-cloud.com/api/v2/background_jobs/62
content-type: text/html; charset=utf-8
cache-control: no-cache
x-request-id: 0e36c596-b4b8-4288-8ebf-eafe677dabe6
x-runtime: 0.024997
vary: Origin,Accept-Encoding
transfer-encoding: chunked
connection: close

The response body after doing HTTP GET on the location header of the response 303:

{
"data": {
"id": "86487",
"type": "job_watcher",
"attributes":
{
"id": 86487,
"name": null,
"description": null,
"status": "success",
"message": "success",
"created_at": "2023-11-13T19:50:57.145Z",
"updated_at": "2023-11-13T19:51:18.361Z",
"has_finished": true
}
} }

We can call the individual GET background_jobs/{id} endpoint to monitor the processing progress.

    • Related Articles

    • App publication

      If your application needs to use the service in background mode, you must follow a few rules to avoid a rejection of your application on AppStore. Basic rule Apple only accepts applications that use background modes when it is justified. Example use ...
    • Release 22.09 (NAO SDK 4.11.8)

      Versions Component Version NAO® Cloud 22.09 NAO® SDK iOS 4.11.8 NAO® SDK Android 4.11.8 NAO® Logger iOS 4.11.8 NAO® Logger Android 4.11.8 New Features NAO® Cloud NAO Server, NAO Cloud self-hosted version is now available MappedIn maps compatibility ...
    • Release 21.02 (NAO SDK 4.10)

      Versions Component Version NAO® Cloud 21.02.0 NAO® SDK iOS 4.10 NAO® SDK Android 4.10 NAO® Logger iOS 4.10 NAO® Logger Android 4.10 Important Note : AndroidX & NAO® SDK Since 2018, Google maintains the AndroidX library to provide backward ...
    • Release 22.06 (NAO SDK 4.11.7.8 / Hot Fix iOS 4.11.7.9)

      Versions Component Version Hotfix NAO® Cloud 22.06 NAO® SDK iOS 4.11.7.8 4.11.7.9 NAO® SDK Android 4.11.7.8 NAO® Logger iOS 4.11.7.8 NAO® Logger Android 4.11.7.8 New Features NAO® Cloud Nao track web app is now available Nao track web app crash ...
    • Release 20.06 (NAO SDK 4.9)

      Release 20.06 NAO Cloud – July, 9th 2020 New Features Import Visioglobe places as geofences. Beacons guidelines conformity: a new heatmap is now available, highlighting the areas that do not meet the radio requirements for the location engine. It is ...