Test Data Asset Repository
Create a Package
If you want to organize your assets in packages, you need to create the packages first. Using packages is optional, if no packgeID is specified, the asset will be stored in the default package.
API Explorer: /packages
Create a Package
curl 'https://ar.blazemeter.com/api-doc/v3/api/v1/workspaces/123456/packages
-X POST \
-H 'accept: application/json'
-H 'Content-Type: application/json'
Sample body
{
"name": "myPackage",
"displayName": "My Package",
"version": "1.0.0",
"dependencies": {}
}
Sample 200 response
{
"timestamp": "2022-06-07T14:33:04+00:00",
"request_id": "b156551692708eb934c76dbd7e80304a",
"result": {
"dependencies": {},
"id": "e1d7cf96-3d53-4337-a178-b6ce6aa3ab3a",
"accountId": 1142842,
"workspaceId": 123456,
"name": "myPackage",
"displayName": "My Package",
"version": "1.0.0",
"createdAt": "2022-06-07T14:33:04.808Z",
"createdBy": 1620964,
"updatedAt": "2022-06-07T14:33:04.808Z",
"updatedBy": 1620964
}
}
Store an Asset
When you store an Asset (a Data Model) in the Asset Repository, the packageId is optional. If not specified, the asset will be placed in the default package. To store a Data Model in the Asset Repository, you do:
Store an Asset
curl 'https://ar.blazemeter.com/api-doc/v3/workspaces/123456/assets
-X POST \
-H 'accept: application/json'
-H 'Content-Type: application/json'
Sample body
{
"packageId": "aaea361d-ab56-4853-8d73-6fc9be04360a",
"name": "NewModel",
"displayName": "A New Model",
"type": "data-model",
"metadata": {
"kind": "tdm",
"contentType": "application/json",
"fileName": "data-model.json"
},
"data": {
"contentType": "application/json",
"fileName": "data-model.json",
"content": "{"schema":"http://perforce.com/blazedata/schema", "id":"b57abac9-174b-4312-9511-ee5f202492a1", "title":"ssddfd", "description":"", "kind":"tdm", "type":"object", "entities":{"ssddfd":{"title":"ssddfd", "type":"object", "properties":{}, "requirements":{}, "targets":{"defaultCsv":{"type":"csv", "file":"ssddfd.csv", "isHeadless":false}}}}}"
}
}
Sample 201 response:
{
"timestamp": "2022-06-08T12:56:17+00:00",
"request_id": "cb2e521a2be69b02fe732a148a55b854",
"result": {
"data": {
"contentType": "application/json",
"fileName": "data-model.json",
"content": "{"schema":"http://perforce.com/blazedata/schema", "id":"b57abac9-174b-4312-9511-ee5f202492a1", "title":"ssddfd", "description":"", "kind":"tdm", "type":"object", "entities":{"ssddfd":{"title":"ssddfd", "type":"object", "properties":{}, "requirements":{}, "targets":{"defaultCsv":{"type":"csv", "file":"ssddfd.csv", "isHeadless":false}}}}}"
},
"id": "46282480-0ae3-478d-be02-9a3a1c990424",
"accountId": 514413,
"workspaceId": 517389,
"packageId": "aaea361d-ab56-4853-8d73-6fc9be04360a",
"name": "NewModel",
"displayName": "A New Model",
"type": "data-model",
"metadata": {
"kind": "tdm",
"contentType": "application/json",
"fileName": "data-model.json"
},
"createdAt": "2022-06-08T12:56:17.168Z",
"createdBy": 1620964,
"updatedAt": "2022-06-08T12:56:17.168Z",
"updatedBy": 1620964
}
}