Description
This endpoint must be used for getting all the profiles available to the user
This endpoint must be consumed in GET request
Request
As part of the request headers a Basic Auth must be sended:
This must be sended in the Http headers of the request, look at the next cURL example for a better understanding
Copy codecurl --location 'host:port/zynchro.api.system-config/v1/profiles?transaction_id=123456&client_id=38' \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTg3NTA5MTQsInVzZXJfbmFtZSI6ImFsZWphbmRyby56YW5hYnJpYUBkaWdpd29ya3MuY29tLm14IiwiYXV0aG9yaXRpZXMiOlsiNTFfRnVsbCBBY2Nlc3MiLCIyMV9GdWxsIEFjY2VzcyIsIjUzX0Z1bGwgQWNjZXNzIiwiMzBfRnVsbCBBY2Nlc3MiLCIzMl9GdWxsIEFjY2VzcyIsIjQxX0Z1bGwgQWNjZXNzIiwiNDNfRnVsbCBBY2Nlc3MiLCIzMV9GdWxsIEFjY2VzcyIsIjI5X0Z1bGwgQWNjZXNzIiwiNDlfRnVsbCBBY2Nlc3MiLCIzOF9GdWxsIEFjY2VzcyIsIjI4X0Z1bGwgQWNjZXNzIiwiMzlfRnVsbCBBY2Nlc3MiLCI0NV9GdWxsIEFjY2VzcyIsIjQ3X0Z1bGwgQWNjZXNzIiwiMzRfRnVsbCBBY2Nlc3MiLCIzNl9GdWxsIEFjY2VzcyIsIjIzX0Z1bGwgQWNjZXNzIiwiMjdfRnVsbCBBY2Nlc3MiLCI1NV9GdWxsIEFjY2VzcyIsIjI0X0Z1bGwgQWNjZXNzIFdpdGggUHJpY2luZyIsIjIyX0Z1bGwgQWNjZXNzIiwiMjZfRnVsbCBBY2Nlc3MiLCIzM19GdWxsIEFjY2VzcyIsIjM1X0Z1bGwgQWNjZXNzIl0sImp0aSI6ImVlTkJFRDJHLU5QS0tsTWdGMFRlVDdpUWU3QSIsImNsaWVudF9pZCI6Inp5bmNocm8iLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXX0.vYMXO18lzsBhkVejcjwerhi0ZN_46RJp5F0Td2BQYcw'
In java it would be something like this (depending on the dependency you use)
Copy codeOkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = RequestBody.create(mediaType, ""); Request request = new Request.Builder() .url("host:port/zynchro.api.system-config/v1/profiles?transaction_id=123456&client_id=38") .method("GET", body) .addHeader("Authorization", "Bearer ••••••") .build(); Response response = client.newCall(request).execute();
Next are listed the params required in the request
Field | SubField | Type | Description | IsRequired |
---|---|---|---|---|
transaction_id | text | A custom value to identify the data related to the request in the response (you can see the transactionId in the response header). Example:
Note: This field is not related with the data to be retrieved, must be used by the client app in order to identify the request/response (if that is useful), the same value can be sended in multiple request (it’s not validated that the same value was sended before) | N | |
client_id | int | The id of the client associated to the request, Example:
| Y |
Consuming Service
Example Request
Consuming service
(GET) URL:HOST:PORT/zynchro.api.system-config/v1/profiles?transaction_id=123456&client_id=38
Request Params:
- transaction_id=123456
- client_id=38
Response
Response 200 OK
If the params present in the request are valid, then you will receive a response 200 "ok" message code look at the next example:
Copy code{ "header": { "resultCode": "ok", "messageCode": "ok", "messageDescription": "request ok", "transactionId": "123456" }, "data": [ { "id": 1, "name": "Full Access", "isDashboard": true, "isMap": true, "isList": 2, "isSnapshotMosaic": true, "isPlayerHealth": true, "isOperationalHealth": true, "isLocationCompliance": true, "isBandWidth": true, "isVDAMonitoring": true, "isVDAHealth": true, "isDashboardAnalytics": true, "isPlaybacks": true, "isEvents": true, "isPageViews": true, "isSessions": true, "isDownloadFTP": true, "isManageLocations": true, "isUpdateLocation": true, "isGroupsLocation": true, "isPlayersLocation": true, "isSmartGroups": true, "isTags": true, "isMediaLibrary": true, "isFilesLibrary": true, "isMediaFeed": true, "isPresentations": true, "isAuthorizeContent": true, "isPublishLocation": true, "isPublishLocationGroup": true, "isPublishSmartGroups": true, "isPublishUpdatePresentation": true, "isPublishUpdatePlaylist": true, "isPublishFirmware": true, "isPublishLog": true, "isWall": true, "isContentLog": true, "cmCampaigns": 2, "cmCanApprove": true, "cmRundown": true, "cmDayparting": true, "cmBanners": true, "cmProManufacturer": true, "cmProBrands": true, "cmProCategories": true, "cmProRevenueClass": true, "cmProFillers": true, "cmProInserts": true, "cmProPresentations": true, "cmProSettings": true, "cmProReports": true, "cmProInventory": true, "cmInventory": 3, "cmProDisclaimer": true, "cmReports": 1, "isTVControl": true, "isDownloadControl": true, "isRemoteSetup": true, "isBDeploy": true, "isPlayerSetup": true, "isSmartActions": true, "isStocks": true, "isLicenses": true, "isUsers": true, "isSetupUser": true, "isPlayListStandard": true, "isDayparting": true, "isAdminClients": true, "clients": null }, { "id": 2, "name": "No Access", "isDashboard": false, "isMap": false, "isList": 0, "isSnapshotMosaic": false, "isPlayerHealth": false, "isOperationalHealth": false, "isLocationCompliance": false, "isBandWidth": false, "isVDAMonitoring": false, "isVDAHealth": false, "isDashboardAnalytics": false, "isPlaybacks": false, "isEvents": false, "isPageViews": false, "isSessions": false, "isDownloadFTP": false, "isManageLocations": false, "isUpdateLocation": false, "isGroupsLocation": false, "isPlayersLocation": false, "isSmartGroups": false, "isTags": false, "isMediaLibrary": false, "isFilesLibrary": false, "isMediaFeed": false, "isPresentations": false, "isAuthorizeContent": false, "isPublishLocation": false, "isPublishLocationGroup": false, "isPublishSmartGroups": false, "isPublishUpdatePresentation": false, "isPublishUpdatePlaylist": false, "isPublishFirmware": false, "isPublishLog": false, "isWall": false, "isContentLog": false, "cmCampaigns": 0, "cmCanApprove": false, "cmRundown": false, "cmDayparting": false, "cmBanners": false, "cmProManufacturer": false, "cmProBrands": false, "cmProCategories": false, "cmProRevenueClass": false, "cmProFillers": false, "cmProInserts": false, "cmProPresentations": false, "cmProSettings": false, "cmProReports": false, "cmProInventory": false, "cmInventory": 0, "cmProDisclaimer": false, "cmReports": 0, "isTVControl": false, "isDownloadControl": false, "isRemoteSetup": false, "isBDeploy": false, "isPlayerSetup": false, "isSmartActions": false, "isStocks": false, "isLicenses": false, "isUsers": false, "isSetupUser": false, "isPlayListStandard": false, "isDayparting": false, "isAdminClients": false, "clients": null }, ] }
Description of the response data
Field | SubField | Type | Description |
---|---|---|---|
header | | Object | Specific data related to the response |
| resultCode | text | The result code of the response, can be: · error -> if errors were found · ok -> if NO errors were found |
| messageCode | text | The message code related to the result code of the response, can be: Example: |
| messageDescription | text | The description of the message code Example: · request ok · Please check your params fields |
| transactionId | text | The transactionId specified in the request, if no transactionId was sended in the request then the transacionId in the response will be null |
errors | | Array | This field is present if there are errors in the request |
| fieldName | text | The field with errors |
| fieldDesc | text | The description of the error |
Data | | Array | The specific response data related to the request |
id | int | The identifier of the profile Example: 1 | |
name | text | The name of the profile | |
isDashboard | boolean | Used to access data in:
| |
isMap | boolean | Used to access data in:
| |
isList | int | Used to access data in:
These are the possible values this field can retrieve:
| |
isSnapshotMosaic | boolean | Used to access data in:
| |
isPlayerHealth | boolean | Used to access data in:
| |
isOperationalHealth | boolean | Used to access data in:
| |
isLocationCompliance | boolean | Used to access data in:
| |
isBandWidth | boolean | Used to access data in:
| |
isVDAMonitoring | boolean | Used to access data in:
| |
isVDAHealth | boolean | Used to access data in:
| |
isDashboardAnalytics | boolean | Used to access data in:
| |
isPlaybacks | boolean | Used to access data in:
| |
isEvents | boolean | Used to access data in:
| |
isPageViews | boolean | Used to access data in:
| |
isSessions | boolean | Used to access data in:
| |
isDownloadFTP | boolean | Used to access data in:
| |
isManageLocations | boolean | Used to access data in:
| |
isUpdateLocation | boolean | Used to access data in:
| |
isGroupsLocation | boolean | Used to access data in:
| |
isPlayersLocation | boolean | Used to access data in:
| |
isSmartGroups | boolean | Used to access data in:
| |
isTags | boolean | Used to access data in:
| |
isMediaLibrary | boolean | Used to access data in:
| |
isFilesLibrary | boolean | Used to access data in:
| |
isMediaFeed | boolean | Used to access data in:
| |
isPresentations | boolean | Used to access data in:
| |
isAuthorizeContent | boolean | Used to access data in:
| |
isPublishLocation | boolean | Used to access data in:
| |
isPublishLocationGroup | boolean | Used to access data in:
| |
isPublishSmartGroups | boolean | Used to access data in:
| |
isPublishUpdatePresentation | boolean | Used to access data in:
| |
isPublishUpdatePlaylist | boolean | Used to access data in:
| |
isPublishFirmware | boolean | Used to access data in:
| |
isPublishLog | boolean | Used to access data in:
| |
isWall | boolean | Used to access data in:
| |
isContentLog | boolean | Used to access data in:
| |
cmCampaigns | int | Used to access data in:
| |
cmCanApprove | boolean | It is used to change a status campaign to approved | |
cmRundown | boolean | Used to access data in:
| |
cmDayparting | boolean | Used to access data in:
| |
cmBanners | boolean | Used to access data in:
| |
cmProManufacturer | boolean | Used to access data in:
| |
cmProBrands | boolean | Used to access data in:
| |
cmProCategories | boolean | Used to access data in:
| |
cmProRevenueClass | boolean | Used to access data in:
| |
cmProFillers | boolean | Used to access data in:
| |
cmProInserts | boolean | Used to access data in:
| |
cmProPresentations | boolean | Used to access data in:
| |
cmProSettings | boolean | Used to access data in:
| |
cmProReports | boolean | Used to access data in:
| |
cmProInventory | boolean | Used to access data in:
| |
cmInventory | int | Used to access data in:
| |
cmProDisclaimer | boolean | Used to access data in:
| |
cmReports | int | Used to access data in:
| |
isTVControl | boolean | Used to access data in:
| |
isDownloadControl | boolean | Used to access data in:
| |
isRemoteSetup | boolean | Used to access data in:
| |
isBDeploy | boolean | Used to access data in:
| |
isPlayerSetup | boolean | Used to access data in:
| |
isSmartActions | boolean | Used to access data in:
| |
isStocks | boolean | Used to access data in:
| |
isLicenses | boolean | Used to access data in:
| |
isUsers | boolean | Used to access data in:
| |
isSetupUser | boolean | Used to access data in:
| |
isPlayListStandard | boolean | Used to access data in:
| |
isDayparting | boolean | Used to access data in:
| |
isAdminClients | boolean | Used to access data in:
|
Response 400
If there are errors with the request, then you will receive a 400 message response BAD_REQUEST with the errors field present, like the following example:
Copy code{ "header": { "resultCode": "error", "messageCode": "BAD_REQUEST", "messageDescription": "Please check your params fields", "transactionId": "12233445666" }, "errors": [ { "fieldName": "client_id", "fieldDesc": "Field is required, and must be of type int " } ] }
Response 401
If you dont send any token, then you will receive a error message of "unauthorized", look at the next example:
Copy code{ "error": "unauthorized", "error_description": "Full authentication is required to access this resource" }
Copy code{ "error": "invalid_token", "error_description": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDM2MTk5NzMsInVzZXJfbmFtZSI6ImFsZWphbmRyby56YW5hYnJpYUBkaWdpd29ya3MuY29tLm14IiwiYXV0aG9yaXRpZXMiOlsiUk9MRV9TWVNURU1BRE1JTiJdLCJqdGkiOiJHTGtQb3hQbVRTZUs2RFhmc1NfNkUxRkMxZmsiLCJjbGllbnRfaWQiOiJ6eW5jaHJvIiwic2NvcGUiOlsicmVhZCIsIndyaXRlIl19.yAFbdU18wMtQXSGUY3_noQn4BQv0RqYjDbw0sr1x6Yk" }
This is the data retrieved when the 401 Unauthorized is retrieved:
Field | SubField | Type | Description |
---|---|---|---|
error | | text | The type of the error, can be:
|
error_description | text | The description of the error, for the "invalid_token", this field retrieves the bearer token you're sending |