Description
This endpoint must be used for creating a new profile
This endpoint must be consumed in POST request
Security
This endpoint is secured, you must send a Bearer Token, to be able to invoke the endpoint, for getting the token, you should invoke first the /oauth/token service of the security microservice, if you don't know what service is, please talk with your sysadmin for further information
Request
As part of the request headers, a Basic Auth must be sent:
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' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ••••••' \ --data '{ "header": { "transactionId": "123455566677788" }, "data": { "profile": { "id": 0, "name": "Profile Name Test 222 6/13", "isDashboard": true, "isMap": false, "isList": 2, "isSnapshotMosaic": true, "isPlayerHealth": false, "isOperationalHealth": true, "isLocationCompliance": false, "isBandWidth": true, "isVDAMonitoring": false, "isVDAHealth": true, "isDashboardAnalytics": false, "isPlaybacks": true, "isEvents": false, "isPageViews": true, "isSessions": false, "isDownloadFTP": true, "isManageLocations": false, "isUpdateLocation": true, "isGroupsLocation": false, "isPlayersLocation": true, "isSmartGroups": false, "isTags": true, "isMediaLibrary": false, "isFilesLibrary": true, "isMediaFeed": false, "isPresentations": true, "isAuthorizeContent": false, "isPublishLocation": true, "isPublishLocationGroup": false, "isPublishSmartGroups": true, "isPublishUpdatePresentation": false, "isPublishUpdatePlaylist": true, "isPublishFirmware": false, "isPublishLog": true, "isWall": false, "isContentLog": true, "cmCampaigns": 2, "cmCanApprove": false, "cmRundown": true, "cmDayparting": false, "cmBanners": true, "cmProManufacturer": false, "cmProBrands": true, "cmProCategories": false, "cmProRevenueClass": true, "cmProFillers": false, "cmProInserts": true, "cmProPresentations": false, "cmProSettings": true, "cmProReports": false, "cmProInventory": true, "cmInventory": 3, "cmProDisclaimer": false, "cmReports": 2, "isTVControl": true, "isDownloadControl": false, "isRemoteSetup": true, "isBDeploy": false, "isPlayerSetup": true, "isSmartActions": false, "isStocks": true, "isLicenses": false, "isUsers": true, "isSetupUser": false, "isPlayListStandard": true, "isDayparting": false, "isAdminClients": true }, "clientsIds": [ 23,24,26,27,28,29,30,31,32,33,34,35,36, 38, 33 ] } }'
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("application/json"); RequestBody body = RequestBody.create(mediaType, "{\r\n \"header\": {\r\n \"transactionId\": \"123455566677788\"\r\n },\r\n \"data\": {\r\n \"profile\": {\r\n \"id\": 0,\r\n \"name\": \"Profile Name Test 222 6/13\",\r\n \"isDashboard\": true,\r\n \"isMap\": false,\r\n \"isList\": 2,\r\n \"isSnapshotMosaic\": true,\r\n \"isPlayerHealth\": false,\r\n \"isOperationalHealth\": true,\r\n \"isLocationCompliance\": false,\r\n \"isBandWidth\": true,\r\n \"isVDAMonitoring\": false,\r\n \"isVDAHealth\": true,\r\n \"isDashboardAnalytics\": false,\r\n \"isPlaybacks\": true,\r\n \"isEvents\": false,\r\n \"isPageViews\": true,\r\n \"isSessions\": false,\r\n \"isDownloadFTP\": true,\r\n \"isManageLocations\": false,\r\n \"isUpdateLocation\": true,\r\n \"isGroupsLocation\": false,\r\n \"isPlayersLocation\": true,\r\n \"isSmartGroups\": false,\r\n \"isTags\": true,\r\n \"isMediaLibrary\": false,\r\n \"isFilesLibrary\": true,\r\n \"isMediaFeed\": false,\r\n \"isPresentations\": true,\r\n \"isAuthorizeContent\": false,\r\n \"isPublishLocation\": true,\r\n \"isPublishLocationGroup\": false,\r\n \"isPublishSmartGroups\": true,\r\n \"isPublishUpdatePresentation\": false,\r\n \"isPublishUpdatePlaylist\": true,\r\n \"isPublishFirmware\": false,\r\n \"isPublishLog\": true,\r\n \"isWall\": false,\r\n \"isContentLog\": true,\r\n \"cmCampaigns\": 2,\r\n \"cmCanApprove\": false,\r\n \"cmRundown\": true,\r\n \"cmDayparting\": false,\r\n \"cmBanners\": true,\r\n \"cmProManufacturer\": false,\r\n \"cmProBrands\": true,\r\n \"cmProCategories\": false,\r\n \"cmProRevenueClass\": true,\r\n \"cmProFillers\": false,\r\n \"cmProInserts\": true,\r\n \"cmProPresentations\": false,\r\n \"cmProSettings\": true,\r\n \"cmProReports\": false,\r\n \"cmProInventory\": true,\r\n \"cmInventory\": 3,\r\n \"cmProDisclaimer\": false,\r\n \"cmReports\": 2,\r\n \"isTVControl\": true,\r\n \"isDownloadControl\": false,\r\n \"isRemoteSetup\": true,\r\n \"isBDeploy\": false,\r\n \"isPlayerSetup\": true,\r\n \"isSmartActions\": false,\r\n \"isStocks\": true,\r\n \"isLicenses\": false,\r\n \"isUsers\": true,\r\n \"isSetupUser\": false,\r\n \"isPlayListStandard\": true,\r\n \"isDayparting\": false,\r\n \"isAdminClients\": true\r\n }, \r\n \"clientsIds\": [\r\n 23,24,26,27,28,29,30,31,32,33,34,35,36, 38, 33\r\n ]\r\n }\r\n}"); Request request = new Request.Builder() .url("host:port/zynchro.api.system-config/v1/profiles") .method("POST", body) .addHeader("Content-Type", "application/json") .addHeader("Authorization", "Bearer ••••••") .build(); Response response = client.newCall(request).execute();
Next are listed the params required in the request body
Field | SubField | Type | Description | IsRequired |
---|---|---|---|---|
header | object | Y | ||
transactionId | 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 to the creation of a new campaign, 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 | |
Data | | Object | The specific body data related to the request | Y |
profile | Object | The profile object (is showed in the next table) | Y | |
clientsIds | Array | An array of ints values, each value must be a valid client id | Y |
Profile Object
Field | SubField | Type | Description | |
---|---|---|---|---|
profile | All the boolean values are not required because by default the value is false it is not sended | Y | ||
id | int | The identifier of the profile (is not required but if it is sended must be 0) | N | |
name | text | The name of the profile | Y | |
isDashboard | boolean | Used to access data in:
| N | |
isMap | boolean | Used to access data in:
| N | |
isList | int | Used to access data in:
These are the possible values this field can retrieve:
| Y | |
isSnapshotMosaic | boolean | Used to access data in:
| N | |
isPlayerHealth | boolean | Used to access data in:
| N | |
isOperationalHealth | boolean | Used to access data in:
| N | |
isLocationCompliance | boolean | Used to access data in:
| N | |
isBandWidth | boolean | Used to access data in:
| N | |
isVDAMonitoring | boolean | Used to access data in:
| N | |
isVDAHealth | boolean | Used to access data in:
| N | |
isDashboardAnalytics | boolean | Used to access data in:
| N | |
isPlaybacks | boolean | Used to access data in:
| N | |
isEvents | boolean | Used to access data in:
| N | |
isPageViews | boolean | Used to access data in:
| N | |
isSessions | boolean | Used to access data in:
| N | |
isDownloadFTP | boolean | Used to access data in:
| N | |
isManageLocations | boolean | Used to access data in:
| N | |
isUpdateLocation | boolean | Used to access data in:
| N | |
isGroupsLocation | boolean | Used to access data in:
| N | |
isPlayersLocation | boolean | Used to access data in:
| N | |
isSmartGroups | boolean | Used to access data in:
| N | |
isTags | boolean | Used to access data in:
| N | |
isMediaLibrary | boolean | Used to access data in:
| N | |
isFilesLibrary | boolean | Used to access data in:
| N | |
isMediaFeed | boolean | Used to access data in:
| N | |
isPresentations | boolean | Used to access data in:
| N | |
isAuthorizeContent | boolean | Used to access data in:
| N | |
isPublishLocation | boolean | Used to access data in:
| N | |
isPublishLocationGroup | boolean | Used to access data in:
| N | |
isPublishSmartGroups | boolean | Used to access data in:
| N | |
isPublishUpdatePresentation | boolean | Used to access data in:
| N | |
isPublishUpdatePlaylist | boolean | Used to access data in:
| N | |
isPublishFirmware | boolean | Used to access data in:
| N | |
isPublishLog | boolean | Used to access data in:
| N | |
isWall | boolean | Used to access data in:
| N | |
isContentLog | boolean | Used to access data in:
| N | |
cmCampaigns | int | Used to access data in:
| Y | |
cmCanApprove | boolean | It is used to change a status campaign to approved | N | |
cmRundown | boolean | Used to access data in:
| N | |
cmDayparting | boolean | Used to access data in:
| N | |
cmBanners | boolean | Used to access data in:
| N | |
cmProManufacturer | boolean | Used to access data in:
| N | |
cmProBrands | boolean | Used to access data in:
| N | |
cmProCategories | boolean | Used to access data in:
| N | |
cmProRevenueClass | boolean | Used to access data in:
| N | |
cmProFillers | boolean | Used to access data in:
| N | |
cmProInserts | boolean | Used to access data in:
| N | |
cmProPresentations | boolean | Used to access data in:
| N | |
cmProSettings | boolean | Used to access data in:
| N | |
cmProReports | boolean | Used to access data in:
| N | |
cmProInventory | boolean | Used to access data in:
| N | |
cmInventory | int | Used to access data in:
| Y | |
cmProDisclaimer | boolean | Used to access data in:
| N | |
cmReports | int | Used to access data in:
| Y | |
isTVControl | boolean | Used to access data in:
| N | |
isDownloadControl | boolean | Used to access data in:
| N | |
isRemoteSetup | boolean | Used to access data in:
| N | |
isBDeploy | boolean | Used to access data in:
| N | |
isPlayerSetup | boolean | Used to access data in:
| N | |
isSmartActions | boolean | Used to access data in:
| N | |
isStocks | boolean | Used to access data in:
| N | |
isLicenses | boolean | Used to access data in:
| N | |
isUsers | boolean | Used to access data in:
| N | |
isSetupUser | boolean | Used to access data in:
| N | |
isPlayListStandard | boolean | Used to access data in:
| N | |
isDayparting | boolean | Used to access data in:
| N | |
isAdminClients | boolean | Used to access data in:
| N | |
clients | Object | Includes the list of the clients thst have this profile //this field is unavalible no | Y |
Consuming Service
Example Request
Consuming service
(POST) URL:HOST:PORT/zynchro.api.system-config/v1/profiles?transaction_id=12233445666
Request Body (JSON RAW):
Copy code{ "header": { "transactionId": "123455566677788" }, "data": { "profile": { "id": 0, "name": "Profile Name Test 333", "isDashboard": true, "isMap": false, "isList": 2, "isSnapshotMosaic": true, "isPlayerHealth": false, "isOperationalHealth": true, "isLocationCompliance": false, "isBandWidth": true, "isVDAMonitoring": false, "isVDAHealth": true, "isDashboardAnalytics": false, "isPlaybacks": true, "isEvents": false, "isPageViews": true, "isSessions": false, "isDownloadFTP": true, "isManageLocations": false, "isUpdateLocation": true, "isGroupsLocation": false, "isPlayersLocation": true, "isSmartGroups": false, "isTags": true, "isMediaLibrary": false, "isFilesLibrary": true, "isMediaFeed": false, "isPresentations": true, "isAuthorizeContent": false, "isPublishLocation": true, "isPublishLocationGroup": false, "isPublishSmartGroups": true, "isPublishUpdatePresentation": false, "isPublishUpdatePlaylist": true, "isPublishFirmware": false, "isPublishLog": true, "isWall": false, "isContentLog": true, "cmCampaigns": 2, "cmCanApprove": false, "cmRundown": true, "cmDayparting": false, "cmBanners": true, "cmProManufacturer": false, "cmProBrands": true, "cmProCategories": false, "cmProRevenueClass": true, "cmProFillers": false, "cmProInserts": true, "cmProPresentations": false, "cmProSettings": true, "cmProReports": false, "cmProInventory": true, "cmInventory": 3, "cmProDisclaimer": false, "cmReports": 2, "isTVControl": true, "isDownloadControl": false, "isRemoteSetup": true, "isBDeploy": false, "isPlayerSetup": true, "isSmartActions": false, "isStocks": true, "isLicenses": false, "isUsers": true, "isSetupUser": false, "isPlayListStandard": true, "isDayparting": false, "isAdminClients": true }, "clientsIds": [ 23,24,26,27,28,29,30,31,32,33,34,35,36, 38, 33 ] } }
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": "123455566677788" }, "data": { "success": true, "profile": { "id": 40, "name": "Profile Name Test 333", "isDashboard": true, "isMap": false, "isList": 2, "isSnapshotMosaic": true, "isPlayerHealth": false, "isOperationalHealth": true, "isLocationCompliance": false, "isBandWidth": true, "isVDAMonitoring": false, "isVDAHealth": true, "isDashboardAnalytics": false, "isPlaybacks": true, "isEvents": false, "isPageViews": true, "isSessions": false, "isDownloadFTP": true, "isManageLocations": false, "isUpdateLocation": true, "isGroupsLocation": false, "isPlayersLocation": true, "isSmartGroups": false, "isTags": true, "isMediaLibrary": false, "isFilesLibrary": true, "isMediaFeed": false, "isPresentations": true, "isAuthorizeContent": false, "isPublishLocation": true, "isPublishLocationGroup": false, "isPublishSmartGroups": true, "isPublishUpdatePresentation": false, "isPublishUpdatePlaylist": true, "isPublishFirmware": false, "isPublishLog": true, "isWall": false, "isContentLog": true, "cmCampaigns": 2, "cmCanApprove": false, "cmRundown": true, "cmDayparting": false, "cmBanners": true, "cmProManufacturer": false, "cmProBrands": true, "cmProCategories": false, "cmProRevenueClass": true, "cmProFillers": false, "cmProInserts": true, "cmProPresentations": false, "cmProSettings": true, "cmProReports": false, "cmProInventory": true, "cmInventory": 3, "cmProDisclaimer": false, "cmReports": 2, "isTVControl": true, "isDownloadControl": false, "isRemoteSetup": true, "isBDeploy": false, "isPlayerSetup": true, "isSmartActions": false, "isStocks": true, "isLicenses": false, "isUsers": true, "isSetupUser": false, "isPlayListStandard": true, "isDayparting": false, "isAdminClients": true, "clients": null }, "message": "" } }
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 |
profile | Object | The specific data of the profile |
Profile Object
Field | SubField | Type | Description |
---|---|---|---|
profile | |||
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:
| |
clients | Object | Includes the list of the clients thst have this profile //this field is unavalible no |
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": "123455566677788" }, "errors": [ { "fieldName": "name", "fieldDesc": "Field is required, and must be of type String " }, { "fieldName": "cmReports", "fieldDesc": "Field is required, and must be of type int and > 0 " }, { "fieldName": "cmInventory", "fieldDesc": "Field is required, and must be of type int and > 0 " }, { "fieldName": "isList", "fieldDesc": "Field is required, and must be of type int and > 0 " }, { "fieldName": "cmCampaigns", "fieldDesc": "Field is required, and must be of type int and > 0 " } ] }
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" }
If you send a Token, but the Token you are sending is expired, then you will receive a response message with an "invalid_token" error, look at the next example:
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 |