POST https://xmp-open.mobvista.com/v2/media/material/list
Common request parameters: please refer to Open API Protocol
Fields other than is_deleted, page, page_size must be passed at least one
Parameter | Type | Required | Instruction |
---|---|---|---|
start_date | string | N | start date(creative create time) YYYY-MM-DD The start date cannot be later than the end date, and the maximum span cannot exceed 30 days |
end_date | string | N | end date(creative create time) YYYY-MM-DD Must be uploaded along with start date |
user_material_id | array | N | creative local id |
md5_file_id | array | N | creative md5 |
is_deleted | int | N | Whether to delete, if not, return all creatives. 0 means not deleted, 1 means deleted. |
folder_id | array | N | folder id |
page | int | N | Current page number, the default is 1 |
page_size | int | N | page size, the default is 200, 1~1000 is available |
{
"client_id": "xxx",
"timestamp": 1608776690,
"sign": "05d481dc241a7a1daa5b2a7fa2b51dc5",
"start_date":"2021-09-01",
"end_date":"2021-09-30",
"user_material_id":["81547","81546"],
"md5_file_id":["9ce6c0666045c02b839dce4d36951375","9ce6c0666045c02b839dce4d36951378"],
"is_deleted":0, # Other than "is_deleted、page、page_size",at least one of the other fields must be passed
"folder_id": [1111,22222],
"page":2,
"page_size":200
}
Parameter | Type | Instruction |
---|---|---|
code | int | error code |
msg | string | message |
data | array | returned interface content |
data.material_name | string | creative name |
data.material_id | int | creative id |
data.user_material_id | int | creative local id |
data.md5_file_id | string | creative md5 |
data.material_type | string | creative type(image,video,other) |
data.tag | array | tag |
data.designer | array | designer |
data.customer | array | creative people |
data.width | int | width |
data.height | int | height |
data.shape | string | shape(horizontal, vertical, square) |
data.format | string | format |
data.duration | float | duration, in seconds (returns 0 if it is an image) |
data.bit_rate | float | video bit rate, the unit is bps (returns 0 if it is an image) |
data.url | string | thumbnail url |
data.file_url | string | file url |
data.size | float | File size, in bytes |
data.is_deleted | int | 0 for not deleted, 1 for deleted |
data.folder_id | int | folder id, operation authority corresponds to the company administrator |
data.folder_name | string | folder name |
data.audit_status | int | audition status, 0 for pending approval, 1 for approved, -1 for disapproved,return -2 when the folder is not audited |
data.created_time | datetime | creative create time |
data.updated_time | datetime | creative update time |
{
"code": 0,
"msg": "success",
"data": [
{
"user_material_id": 1,
"material_name": "测试(2).mp4",
"material_id": 1,
"md5_file_id": "e6148d3406faa0f2cedf8eb623e09892",
"material_type": "video",
"tag": [
{
"level": 2,
"parent_id": 1,
"id": 1,
"name": "奇魔猪1"
},
{
"level": 2,
"parent_id": 1,
"id": 1,
"name": "mp_222"
}
],
"designer": [
{
"id": 1,
"name": "1"
}
],
"customer": [
{
"id": 27,
"name": "1"
}
],
"width": 1280,
"height": 720,
"shape": "横版",
"format": "mp4",
"duration": 18.92,
"bit_rate": 8184636,
"url": "https://xmp-material-cns.mobvista.com/video_cover_multi/e6148d3406faa0f2cedf8eb623e09892/23a685c3e86f6c1d13dc121f47cfd0ff.jpg",
"file_url": "https://xmp-material-cns.mobvista.com/video/e6/e6148d3406faa0f2cedf8eb623e09892.mp4",
"size": "18.46 MB",
"is_deleted": 0,
"folder_id": 1,
"folder_name": "上传测试",
"audit_status": 1,
"created_time": "2023-12-29 16:52:36",
"updated_time": "2023-12-29 16:52:36"
}
]
}
POST https://xmp-open.nativex.com/v1/media/material/upload
Common request parameters: please refer to Open API Protocol
First-level Parameter | Second-level Parameter | Type | Required | Instruction |
data | – | – | – | data contains all objects to be uploaded |
– | folder_id | int | Y | folder id |
– | user_material_name | string | Y | Creative name, limited to 200 characters. Creative names in the same folder cannot be repeated. |
– | material_url | string | Y | Creative URL Support uploading OSS/S3 address |
– | material_ext | string | Y | Creative extension. Image:jpg、jpeg、png、bmp; Video:mp4、mov、avi、mpeg; Playable:html、htm |
– | material_type | int | Y | creative type 1 for image, 2 for video, 10 for playable |
– | media | string | N | Channel Required when the material type = 10, you can pass: mintegral, applovin, unity, ironsource, only one can be passed |
– | tag_name | string | N | tag name, default is null. Multiple values can be passed in. When the incoming value does not exist under the company dimension, a new label will be created at the same time. Currently xmp only supports first-level tags |
– | customer_id | int | N | creative people, default is null. Pass any user ID under the company (enable status) |
– | designer_id | int | N | desinger, default is null. Multiple user IDs under the design department (enable status) must be passed. |
– | audit_status | int | N | Audit status, the default is approved, 0: pending review, 1: approved, -1: not approved. Only valid when the asset library is enabled for review |
{
"client_id": "xxxx",
"timestamp": 1608776690,
"sign": "05d481dc241a7a1daa5b2a7fa2b51dc5",
"data": [
{
"material_type": 1,
"material_url": "https://xxx.com/image/5d/sc_upload.png",
"user_material_name": "sc_upload.png",
"material_ext": "png",
"tag_name": [
"tag1","tag2"
],
"folder_id": 12345,
"designer_id": [
111,222
],
"customer_id": [
333
]
}
]
}
First-level Parameter | Second-level Parameter | Type | Instruction |
code | – | int | error code |
msg | – | string | message |
data | – | array | returned interface content |
– | folder_id | int | folder ID |
– | user_material_id | int | The creative ID inside xmp, which is unique. The field is 0 when upload fails. |
– | user_material_name | string | XMP creative name |
– | status | int | status, 0 for failed, 1 for successful |
– | error_msg | string | error message |
{
"code": 0,
"msg": "success",
"data": [
{
"folder_id": 12345,
"user_material_id": 123445,
"user_material_name": "sc_upload.png",
"status": 1,
"error_msg": ""
}
]
}
POST https://xmp-open.nativex.com/v1/media/folder/list
Common request parameters: please refer to Open API Protocol
Parameter | Type | Required | Instruction |
folder_type | int | Y | folder type 1 for my library, 2 for team library |
parent_folder_id | int | N | parent folder ID |
{
"client_id": "xxxx",
"timestamp": 1608776690,
"sign": "05d481dc241a7a1daa5b2a7fa2b51dc5",
"parent_folder_id": [1234569799,1234569798],
"folder_type": 1
}
First-level Parameter | Second-level Parameter | Third-level Parameter | Type | Instruction |
code | – | – | int | error code |
msg | – | – | string | message |
data | – | – | array | returned interface content |
– | folder_id | – | int | folder ID |
– | folder_name | – | string | folder name |
– | folder_type | – | int | folder type 1 for my library, 2 for team library |
– | parent_folder_id | – | int | parent folder id |
– | parent_folder_name | – | string | parent folder name |
– | is_audit | – | int | whether to enable auditing 0 for no, 1 for yes |
– | auth_type | – | int | authourity type 1为自己可见,2为指定用户/团队可见,4为本公司可见 |
– | auth_config | – | array | This configuration is only available when authorization scope = 2 |
– | – | team_id | int | team ID |
– | – | user_id | int | user ID |
{
"code": 0,
"msg": "success",
"data": [
{
"folder_id": 1234569796,
"folder_name": "test",
"folder_type": 1,
"parent_folder_id": 1234569799,
"parent_folder_name": "test",
"is_audit": 0,
"auth_type": 4,
"auth_config": []
},
{
"folder_id": 1234569797,
"folder_name": "test",
"folder_type": 1,
"parent_folder_id": 1234569798,
"parent_folder_name": "test",
"is_audit": 0,
"auth_type": 2,
"auth_config": [
{
"team_id": 234,
"user_id": 1234
}
]
}
]
}
POST https://xmp-open.nativex.com/v1/media/folder/add
Common request parameters: please refer to Open API Protocol
First-level Parameter | Second-level Parameter | Third-level Parameter | Type | Required | Instruction |
data | – | – | array | – | data contains all objects to be uploaded |
– | parent_folder_id | – | int | Y | parent folder ID When parent folder ID=0, it means to create a new first-level folder under the creative library |
– | folder_name | – | string | Y | Folder name, 200 characters limit |
– | folder_type | – | int | N | Folder type 1 for my library, 2 for team library |
– | is_audit | – | int | N | Whether to enable auditing, when the parent folder id=0, select and upload. 0 for no, 1 for yes, default no |
– | auth_type | – | int | N | Authority type. Required when parent folder id=0. 1 is visible only to yourself, 2 is visible to designated users/teams, 4 is visible to the company. |
– | auth_config | – | array | N | Requires when auth_type=2 |
– | – | team_id | int | N | team ID |
– | – | user_id | int | N | User ID. When the department ID and user ID are uploaded at the same time, the user ID shall prevail. |
{
"client_id": "xxxx",
"timestamp": 1608776690,
"sign": "05d481dc241a7a1daa5b2a7fa2b51dc5",
"data": [
{
"parent_folder_id": 123,
"folder_type": 2,
"folder_name": "test",
"is_audit": 1,
"auth_type": 2,
"auth_config": [
{
"user_id": 22
},
{
"team_id": 11
}
]
}
]
}
First-level Parameter | Second-level Parameter | Type | Instruction |
code | – | int | error code |
msg | – | string | message |
data | – | array | returned interface content |
– | parent_folder_id | int | parent folder ID |
– | folder_id | int | folder ID |
– | folder_name | string | folder name |
– | status | int | status 0 for unsuccessfully, 1 for successfully |
– | error_msg | string | error message |
{
"code": 0,
"msg": "success",
"data": [
{
"parent_folder_id": 123,
"folder_id": 1234556,
"folder_name": "test",
"status": 1,
"error_msg": ""
}
]
}