Favicon

You are here: Home > API Reference > UEM > Mdm Assets > Add new asset (for edge runners)

POST /organizations/:organizationId/mdm/assets//edge/asset

Required Permission: mdm.global.asset.create

Add new asset (for edge runners)

POST
https://api.applivery.io/v1/organizations/{organizationId}/mdm/assets//edge/asset
curl -X POST "https://api.applivery.io/v1/organizations/{organizationId}/mdm/assets//edge/asset" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "file": {
    "mimetype": "string",
    "bucket": "string",
    "key": "string",
    "location": "string",
    "originalName": "string",
    "size": 0,
    "storageProviderId": "string",
    "checksum": "string"
  },
  "name": "string",
  "description": "string",
  "config": {
    "apk": {}
  },
  "segmentId": 0,
  "exposeToChildren": true
}'
const response = await fetch("https://api.applivery.io/v1/organizations/{organizationId}/mdm/assets//edge/asset", {
  method: "POST",
  headers: {
    Authorization: "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "file": {
      "mimetype": "string",
      "bucket": "string",
      "key": "string",
      "location": "string",
      "originalName": "string",
      "size": 0,
      "storageProviderId": "string",
      "checksum": "string"
    },
    "name": "string",
    "description": "string",
    "config": {
      "apk": {}
    },
    "segmentId": 0,
    "exposeToChildren": true
  }),
});

const data = await response.json();
import requests

response = requests.post(
    "https://api.applivery.io/v1/organizations/{organizationId}/mdm/assets//edge/asset",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json={
      "file": {
        "mimetype": "string",
        "bucket": "string",
        "key": "string",
        "location": "string",
        "originalName": "string",
        "size": 0,
        "storageProviderId": "string",
        "checksum": "string"
      },
      "name": "string",
      "description": "string",
      "config": {
        "apk": {}
      },
      "segmentId": 0,
      "exposeToChildren": true
    },
)

data = response.json()

Request

Send your API key in the request header authorization
Example: Authorization: Bearer <token>

organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$

Body Params application/json
file object required
mimetype string required
≤ 128 characters
bucket string required
≤ 128 characters
key string required
≤ 128 characters
location string required
≤ 256 characters
originalName string required
≤ 128 characters
size integer required
≥ 0 · ≤ 9007199254740991
storageProviderId string required
Match pattern: ^[a-fA-F0-9]{24}$
checksum string required
≤ 256 characters
name string optional
≤ 256 characters
description string optional
≤ 256 characters
config object optional
apk object optional
versionCode string required
≤ 256 characters
versionName string required
≤ 256 characters
packageName string required
≤ 256 characters
minSdkVersion string optional
≤ 256 characters
targetSdkVersion string optional
≤ 256 characters
productName string optional
≤ 256 characters
segmentId integer optional
≥ 0 · ≤ 9007199254740991
exposeToChildren any optional
{
    "file": {
        "mimetype": "string",
        "bucket": "string",
        "key": "string",
        "location": "string",
        "originalName": "string",
        "size": 0,
        "storageProviderId": "string",
        "checksum": "string"
    },
    "name": "string",
    "description": "string",
    "config": {
        "apk": {
            "versionCode": "string",
            "versionName": "string",
            "packageName": "string",
            "minSdkVersion": "string",
            "targetSdkVersion": "string",
            "productName": "string"
        }
    },
    "segmentId": 0,
    "exposeToChildren": true
}

Responses

200 Response application/json
status boolean required
data object required
id string required
Match pattern: ^[a-fA-F0-9]{24}$
organization string required
Match pattern: ^[a-fA-F0-9]{24}$
type string required
app book image script other certificate
name string required
≤ 256 characters
description string required
≤ 256 characters
uploadedByInfo object required
email string required
≤ 256 characters · Match pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ · Format: email
firstName string required
≤ 256 characters
lastName string required
≤ 256 characters
picture string optional
file any required
size integer required
≥ 0 · ≤ 9007199254740991
originalExtension string required
≤ 128 characters
storageProvider object required
id string required
Match pattern: ^[a-fA-F0-9]{24}$
name string required
≤ 256 characters
region string required
≤ 256 characters
config object required
msi object optional
apk object optional
version integer required
≥ 0 · ≤ 9007199254740991
updatedAt string required
createdAt string required
segmentId integer optional
≥ 0 · ≤ 9007199254740991
exposeToChildren any optional
{
    "status": true,
    "data": {
        "id": "string",
        "organization": "string",
        "type": "app",
        "name": "string",
        "description": "string",
        "uploadedByInfo": {
            "email": "[email protected]",
            "firstName": "string",
            "lastName": "string",
            "picture": "string"
        },
        "file": "string",
        "size": 0,
        "originalExtension": "string",
        "storageProvider": {
            "id": "string",
            "name": "string",
            "region": "string"
        },
        "config": {
            "msi": {
                "productCode": "string",
                "productVersion": "string",
                "productName": "string",
                "manufacturer": "string"
            },
            "apk": {
                "versionCode": "string",
                "versionName": "string",
                "packageName": "string",
                "minSDKVersion": "string",
                "targetSdkVersion": "string",
                "productName": "string"
            }
        },
        "version": 0,
        "updatedAt": "string",
        "createdAt": "string",
        "segmentId": 0,
        "exposeToChildren": true
    }
}
400 Response application/json
status boolean optional
false
error object optional
code number optional
5007
message string optional
File extension not allowed
{
    "status": false,
    "error": {
        "code": 5006,
        "message": "No File Found in request"
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}