Update a Data Model

To update a Data Model, you need to know your workspace identifier and the Data Model identifier. The sample code uses a dataModelId of 55 and a workspaceId of 123456. Use the actual ID values of your workspace and Data Model.

Update Data Model

curl 'https://ar.blazemeter.com/api/v1/workspaces/123456/assets/55' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "packageId": "string",
    "name": "string",
    "displayName": "string",
    "type": "string",
    "metadata": {},
    "data": 
	  { "type":"datamodel", 
        "attributes": { 
          "id": "datamodel/emailaddress", 
          "title": "email contact", 
          "description": "random string at domain dot com", 
          "type":"object", 
          "kind":"tdm", 
          "repeat":1, 
          "properties": { 
            "name":{ "type":"string"}, 
            "age":{"type":"integer"},  
            "email":{"type":"string"} }, 
          "requirements": { 
            "name":"randText(5, 10)", 
            "email":"$name + '@google.com'" } 
        }
	}},
    "dependencies": {}
}'

The following parameters are the base parameters required to update a Data Model.

Update a Data Model Response Attributes

Attributes

  • dataModelId integer

    required

    The Data Model identifier

Response200 OK

{
  "api_version": 1,
  "request_id": "string",
  "result": {
    "id": "datamodel/emailaddress", 
          "title": "email contact", 
          "description": "random string at domain dot com", 
          "type":"object", 
          "kind":"tdm", 
          "repeat":1, 
          "properties": { 
            "name":{ "type":"string"}, 
            "age":{"type":"integer"},  
            "email":{"type":"string"} }, 
            "requirements": { 
              "name":"randText(5, 10)", 
              "email":"$name + '@google.com'" 
          }	
    }
}