---
title: "Save Repository Item"
method: POST
path: "/rest/manager/ota/save"
tags: ["OTA controller APIs", "Repository APIs"]
---

# Save Repository Item

`POST /rest/manager/ota/save`

## Request

- Base URL: `https://masonconsole.com`
- URL: `https://masonconsole.com/rest/manager/ota/save`
- Auth: HTTP bearer

This API endpoint is used to create or update a repository item. It expects an HTTP POST request with a `RepositoryItemBase` object in the request body. The API performs access control checks, executes pre-save operations, and then saves the repository item. If it's a new item, it sets the creation date before saving.

## Request body

- union
  - object
    - `repositoryItemId` string
    - `repositoryItemName` string
    - `repositoryItemDesc` string
    - `domain` string
    - `owner` string
    - `color` string
    - `fontIcon` string
    - `creationDate` string, date-time
    - `moreData` object
    - `privateRepoItem` boolean
    - `@class` string, required
    - `url` string
    - `type` string
    - `thumbnail` string
    - `properties` object
  - object
    - `repositoryItemId` string
    - `repositoryItemName` string
    - `repositoryItemDesc` string
    - `domain` string
    - `owner` string
    - `color` string
    - `fontIcon` string
    - `creationDate` string, date-time
    - `moreData` object
    - `privateRepoItem` boolean
    - `@class` string, required
    - `bodyText` string
    - `image` AssetsItem
      - `repositoryItemId` string
      - `repositoryItemName` string
      - `repositoryItemDesc` string
      - `domain` string
      - `owner` string
      - `color` string
      - `fontIcon` string
      - `creationDate` string, date-time
      - `moreData` object
      - `privateRepoItem` boolean
      - `url` string
      - `type` string
      - `thumbnail` string
      - `properties` object
    - `audio` AssetsItem
      - `repositoryItemId` string
      - `repositoryItemName` string
      - `repositoryItemDesc` string
      - `domain` string
      - `owner` string
      - `color` string
      - `fontIcon` string
      - `creationDate` string, date-time
      - `moreData` object
      - `privateRepoItem` boolean
      - `url` string
      - `type` string
      - `thumbnail` string
      - `properties` object
    - `stretchImage` boolean
    - `horizontal` boolean
    - `audioLoop` boolean
    - `withTimeout` boolean
    - `timeOut` integer
    - `textColor` string
    - `webUrl` string
    - `youtubeLoop` boolean
    - `htmlCode` string
    - `embedUrl` string
    - `embedType` string
    - `youtubeBaseUrl` string
    - `youtubeId` string
    - `advMsgType` string
  - object
    - `repositoryItemId` string
    - `repositoryItemName` string
    - `repositoryItemDesc` string
    - `domain` string
    - `owner` string
    - `color` string
    - `fontIcon` string
    - `creationDate` string, date-time
    - `moreData` object
    - `privateRepoItem` boolean
    - `@class` string, required
    - `filesBundleId` string
    - `destPath` string
    - `files` string[]
    - `bundleUrl` string
    - `properties` object
  - object
    - `repositoryItemId` string
    - `repositoryItemName` string
    - `repositoryItemDesc` string
    - `domain` string
    - `owner` string
    - `color` string
    - `fontIcon` string
    - `creationDate` string, date-time
    - `moreData` object
    - `privateRepoItem` boolean
    - `@class` string, required
    - `command` string
    - `args` string[]
    - `authority` string
    - `waitForExit` boolean
    - `collectOutput` boolean
    - `maxOutSize` integer
    - `successCode` integer
    - `isScript` boolean
    - `props` object
  - object
    - `repositoryItemId` string
    - `repositoryItemName` string
    - `repositoryItemDesc` string
    - `domain` string
    - `owner` string
    - `color` string
    - `fontIcon` string
    - `creationDate` string, date-time
    - `moreData` object
    - `privateRepoItem` boolean
    - `@class` string, required
    - `properties` object
    - `version` string
    - `url` string
    - `hash` string
    - `hashType` string
    - `fileSize` integer
    - `fileName` string
    - `precedingMin` string
    - `precedingMax` string
    - `models` string
    - `versionPattern` string
    - `verPropPath` string
  - object
    - `repositoryItemId` string
    - `repositoryItemName` string
    - `repositoryItemDesc` string
    - `domain` string
    - `owner` string
    - `color` string
    - `fontIcon` string
    - `creationDate` string, date-time
    - `moreData` object
    - `privateRepoItem` boolean
    - `@class` string, required
    - `workflowList` WorkFlowListEntry[]
      - `commandName` string
      - `commandData` union
        - object
          - `@class` string, required
          - `advancedMessagingItem` AdvancedMessagingItem
            - `repositoryItemId` string
            - `repositoryItemName` string
            - `repositoryItemDesc` string
            - `domain` string
            - `owner` string
            - `color` string
            - `fontIcon` string
            - `creationDate` string, date-time
            - `moreData` object
            - `privateRepoItem` boolean
            - `bodyText` string
            - `image` AssetsItem
              - …
            - `audio` AssetsItem
              - …
            - `stretchImage` boolean
            - `horizontal` boolean
            - `audioLoop` boolean
            - `withTimeout` boolean
            - `timeOut` integer
            - `textColor` string
            - `webUrl` string
            - `youtubeLoop` boolean
            - `htmlCode` string
            - `embedUrl` string
            - `embedType` string
            - `youtubeBaseUrl` string
            - `youtubeId` string
            - `advMsgType` string
        - object
          - `@class` string, required
          - `mcmId` string
          - `productId` string
          - `productTitle` string
          - `isApply` boolean
          - `configurationName` string
        - object
          - `@class` string, required
          - `products` string[]
          - `productSetBehavior` string
        - object
          - `@class` string, required
          - `products` string[]
          - `isInstall` boolean
        - object
          - `@class` string, required
          - `message` string
          - `emails` string[]
        - object
          - `@class` string, required
          - `packageName` string
          - `packageID` string
        - object
          - `@class` string, required
          - `packages` string[]
        - object
          - `@class` string, required
          - `path` string
          - `urlPut` string
          - `urlGet` string
          - `collectLogFile` boolean
        - object
          - `@class` string, required
          - `name` string
          - `description` string
          - `type` string
          - `values` object
        - object
          - `@class` string, required
          - `customPlistItem` CustomPlistItem
            - `repositoryItemId` string
            - `repositoryItemName` string
            - `repositoryItemDesc` string
            - `domain` string
            - `owner` string
            - `color` string
            - `fontIcon` string
            - `creationDate` string, date-time
            - `moreData` object
            - `privateRepoItem` boolean
            - `values` object
        - object
          - `@class` string, required
          - `depProfileItem` DepProfileItem
            - `repositoryItemId` string
            - `repositoryItemName` string
            - `repositoryItemDesc` string
            - `domain` string
            - `owner` string
            - `color` string
            - `fontIcon` string
            - `creationDate` string, date-time
            - `moreData` object
            - `privateRepoItem` boolean
            - `values` object
            - `serverid` string
        - object
          - `@class` string, required
          - `packageName` string
          - `enablePackage` boolean
          - `packageID` string
        - object
          - `@class` string, required
          - `enablePackage` boolean
          - `packages` string[]
        - object
          - `@class` string, required
          - `start` string
          - `end` string
        - object
          - `@class` string, required
          - `hide` boolean
        - object
          - `@class` string, required
        - object
          - `@class` string, required
          - `props` object
          - `metaData` object
        - object
          - `@class` string, required
          - `lock_message` string
          - `lock` boolean
        - object
          - `@class` string, required
          - `user` string
          - `action` string
        - object
          - `@class` string, required
        - object
          - `@class` string, required
          - `title` string
          - `message` string
        - object
          - `@class` string, required
          - `remoteExecItem` RemoteExecItem
            - `repositoryItemId` string
            - `repositoryItemName` string
            - `repositoryItemDesc` string
            - `domain` string
            - `owner` string
            - `color` string
            - `fontIcon` string
            - `creationDate` string, date-time
            - `moreData` object
            - `privateRepoItem` boolean
            - `command` string
            - `args` string[]
            - `authority` string
            - `waitForExit` boolean
            - `collectOutput` boolean
            - `maxOutSize` integer
            - `successCode` integer
            - `isScript` boolean
            - `props` object
        - object
          - `@class` string, required
          - `remoteSettingsBundles` RemoteSettingsBundle[]
            - `settingsBundleId` string
            - `settingsBundleName` string
            - `description` string
            - `domain` string
            - `owner` string
            - `settingsType` string
            - `color` string
            - `fontIcon` string
            - `privateRepoItem` boolean
            - `moreData` object
            - `remoteSettingsItems` RemoteSettingsItem[]
              - …
            - `creationDate` string, date-time
        - object
          - `@class` string, required
          - `removeType` string
          - `accountType` string
          - `accounts` string[]
        - object
          - `@class` string, required
        - object
          - `@class` string, required
        - object
          - `@class` string, required
          - `inputSource` string
          - `volume` integer
          - `brightness` integer
        - object
          - `@class` string, required
          - `repositoryFileMetaData` RepositoryFileMetaData
            - `repositoryFileMetaDataID` string
            - `fileID` string
            - `fileName` string
            - `fileLocation` string
            - `ownerUser` string
            - `ownerDomain` string
            - `lastEditorUser` string
            - `privateFile` boolean
            - `fileDesc` string
            - `fileAction` string
            - `arguments` string
            - `properties` object
            - `color` string
            - `fontIcon` string
            - `creationDate` string, date-time
            - `lastUpdate` string, date-time
        - object
          - `@class` string, required
          - `otaItem` OTAItem
            - `repositoryItemId` string
            - `repositoryItemName` string
            - `repositoryItemDesc` string
            - `domain` string
            - `owner` string
            - `color` string
            - `fontIcon` string
            - `creationDate` string, date-time
            - `moreData` object
            - `privateRepoItem` boolean
            - `properties` object
            - `version` string
            - `url` string
            - `hash` string
            - `hashType` string
            - `fileSize` integer
            - `fileName` string
            - `precedingMin` string
            - `precedingMax` string
            - `models` string
            - `versionPattern` string
            - `verPropPath` string
        - object
          - `@class` string, required
          - `policy` Policy
            - `policyId` string
            - `policyName` string
            - `description` string
            - `policyType` string
            - `triggerId` string
            - `fontIcon` string
            - `color` string
            - `properties` object
            - `creationDate` string, date-time
            - `privateRepoItem` boolean
            - `policySubCatagories` object
            - `policyTrigger` PolicyTrigger
            - `domain` string
            - `owner` string
          - `trigger` Trigger
            - `triggerId` string
            - `triggerName` string
            - `description` string
            - `domain` string
            - `owner` string
            - `triggerData` TriggerData
              - …
            - `creationDate` string, date-time
            - `privateRepoItem` boolean
            - `color` string
            - `fontIcon` string
        - object
          - `@class` string, required
          - `prefsMap` object
        - object
          - `@class` string, required
          - `password` string
        - object
          - `@class` string, required
        - object
          - `@class` string, required
        - object
          - `@class` string, required
          - `smartRecoveryItem` SmartRecoveryItem
            - `repositoryItemId` string
            - `repositoryItemName` string
            - `repositoryItemDesc` string
            - `domain` string
            - `owner` string
            - `color` string
            - `fontIcon` string
            - `creationDate` string, date-time
            - `moreData` object
            - `privateRepoItem` boolean
            - `model` string
            - `smartRecoveryAction` SmartRecoveryActionBase
              - …
        - object
          - `@class` string, required
          - `packageName` string
          - `packageID` string
        - object
          - `@class` string, required
          - `packageName` string
          - `packageID` string
        - object
          - `@class` string, required
        - object
          - `@class` string, required
        - object
          - `@class` string, required
          - `packageName` string
          - `packageID` string
        - object
          - `@class` string, required
          - `packages` string[]
        - object
          - `@class` string, required
          - `deviceIDs` string[]
          - `deviceFilters` string[]
          - `macAddressToWake` string[]
          - `broadcastAddress` string
          - `port` integer
        - object
          - `@class` string, required
          - `wbList` WifiWBListEntry[]
            - `networkSSID` string
            - `allow` boolean
            - `networkPSK` string
        - object
          - `@class` string, required
          - `networkSSID` string
          - `networkPass` string
          - `securityProtocol` string
        - object
          - `@class` string, required
          - `wipe_message` string
        - object
          - `@class` string, required
          - `workFlowItem` WorkFlowItem
            - `repositoryItemId` string
            - `repositoryItemName` string
            - `repositoryItemDesc` string
            - `domain` string
            - `owner` string
            - `color` string
            - `fontIcon` string
            - `creationDate` string, date-time
            - `moreData` object
            - `privateRepoItem` boolean
            - `workflowList` WorkFlowListEntry[]
        - object
          - `@class` string, required
          - `waitSeconds` integer
        - object
          - `@class` string, required
          - `filesBundleRepoItem` FilesBundleRepoItem
            - `repositoryItemId` string
            - `repositoryItemName` string
            - `repositoryItemDesc` string
            - `domain` string
            - `owner` string
            - `color` string
            - `fontIcon` string
            - `creationDate` string, date-time
            - `moreData` object
            - `privateRepoItem` boolean
            - `filesBundleId` string
            - `destPath` string
            - `files` string[]
            - `bundleUrl` string
            - `properties` object
        - object
          - `@class` string, required
          - `message` string
          - `duration` 'SHORT' | 'LONG'
        - object
          - `@class` string, required
        - object
          - `@class` string, required
          - `intentAction` string: The action of the intent to be sent. This action shall be filtered and handled by the receiver app.
          - `packageName` string: The package name to which the intent will be sent. Omitting this will send a public broadcast.
          - `componentName` string: The component name to which the intent will be sent. Omitting this will send a broadcast to the entire app.
          - `declaredPermission` string: The declared permission for the intent action. The receiving app must declare this permission and be signed with the same key as the MDM agent app.
          - `intentExtras` object: Extra fields to be included with the intent.
          - `waitForResponse` boolean: Whether the MDM agent needs to listen for a broadcast intent as a response. If true, a 'commandId' will be added to the broadcast intent as an extra. The response intent should be sent by the receiver with the action 'com.viso.mdm.COMMAND_BROADCAST_RECEIVER' and it must include the 'commandId' as an extra. If permission is enforced in the response, the response intent must be sent with the permission 'com.viso.mdm.COMMAND_BROADCAST_PERMISSION'.
        - object
          - `@class` string, required
          - `downloadUrl` string
          - `uploadUrl` string
          - `uploadTest` boolean
          - `downloadTest` boolean
          - `pingTest` boolean
      - `wait` boolean
      - `stopOnFailure` boolean
      - `desc` string
      - `color` string
      - `owner` string
      - `privateRepoItem` boolean
      - `missingRepo` boolean

## Response `200`

Successful response

- SaveRepItemResponse
  - `data` SaveRepItemData: The data returned in the response.
    - `repositoryItemId` string
  - `result` string: The result of the login operation. Should be either 'SUCCESS' or 'FAILURE'.
  - `message` string: The message associated with the login response (applicable in case of 'FAILURE').
  - `@class` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal server error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/bymason/apis/mason-device-console-api-docs.md) - [All operations](https://skmtc.dev/bymason/apis/mason-device-console-api-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/bymason/apis/mason-device-console-api-docs/revisions/d9cdcc14b7d1?raw)
