{"type":"api","title":"Create emulated device","meta":{"id":"/apps/pubhub/media/000-v7-apis/5b3454a4300b838cc17f7b2cdc0690fdd15058d5/2b2b6ad2-c7ea-34b5-965b-dc68435b9852","info":{"description":"The Emulation API facilitates the retrieval of user-agent strings for HTTP, pageload, and transaction tests. It also enables the retrieval and addition of emulated devices for pageload and transaction tests.\n\nTo access Emulation API operations, the following permissions are required:\n\n* `Settings Tests Read` for read operations.\n* `Settings Tests Update` for write operations.\n","title":"Emulation API","version":"7.0.34"},"security":[{"BearerAuth":[]}],"tags":[{"name":"Emulation"}],"openapi":"3.0.1","servers":[{"description":"ThousandEyes API production URL","url":"https://api.thousandeyes.com/v7"}],"securitySchemes":{"BearerAuth":{"description":"Bearer authentication token","scheme":"bearer","type":"http"}}},"spec":{"description":"Creates a new device for emulation.","operationId":"createEmulatedDevice","parameters":[{"description":"A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.","in":"query","name":"aid","required":false,"schema":{"example":"1234","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"category":{"description":"The type of device being emulated.","enum":["desktop","laptop","phone","tablet"],"example":"desktop","type":"string","$$ref":"#/components/schemas/EmulatedDeviceCategory"},"width":{"description":"The width of the display of the emulated device.","example":1024,"maximum":9999,"minimum":50,"type":"integer"},"height":{"description":"The height of the display of the emulated device.","example":768,"maximum":9999,"minimum":50,"type":"integer"}},"required":["category","height","width"],"type":"object","$$ref":"#/components/schemas/EmulatedDevice"}}},"required":true},"responses":{"201":{"content":{"application/hal+json":{"schema":{"properties":{"category":{"description":"The type of device being emulated.","enum":["desktop","laptop","phone","tablet"],"example":"desktop","type":"string","$$ref":"#/components/schemas/EmulatedDeviceCategory"},"width":{"description":"The width of the display of the emulated device.","example":1024,"maximum":9999,"minimum":50,"type":"integer"},"height":{"description":"The height of the display of the emulated device.","example":768,"maximum":9999,"minimum":50,"type":"integer"},"name":{"description":"The device name","example":"iPad Pro 12.9-in","type":"string"},"codeName":{"description":"A code corresponding to the device name.","example":"IPAD_PRO_12_9","type":"string"},"id":{"description":"ID of the emulated device.","example":"11","type":"string"},"availableUserAgents":{"description":"A list of user-agent strings for this emulated device.","example":["Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.70 Mobile Safari/537.36","Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.70 Safari/537.36"],"items":{"type":"string"},"type":"array"},"defaultUserAgentTemplate":{"description":"The default user-agent template to use for this device.","example":"Mozilla/5.0 (Android 4.4; Tablet; rv:70.0) Gecko/70.0 Firefox/70.0","type":"string"}},"required":["category","height","width"],"type":"object","$$ref":"#/components/schemas/EmulatedDeviceResponse"}}},"description":"Created"},"401":{"content":{"application/problem+json":{"schema":{"properties":{"error":{"example":"invalid_token","type":"string"},"error_description":{"example":"Invalid access token","type":"string"}},"type":"object","$$ref":"#/components/schemas/UnauthorizedError"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions to query endpoint"},"404":{"content":{"application/problem+json":{"example":{"type":"about:blank","title":"URI Resource Not Found","status":404,"detail":"Details explaining if the 404 error is related to an invalid URI or a wrong ID","instance":"/v7"},"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/problem+json":{"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Exhausted rate limit for the organization"},"500":{"content":{"application/problem+json":{"example":{"type":"about:blank","title":"Internal server error","status":500,"detail":"Optional detail about the internal error message.","instance":"/v7"},"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Internal server error"}},"summary":"Create emulated device","tags":["Emulation"],"__originalOperationId":"createEmulatedDevice","security":[{"BearerAuth":[]}],"method":"post","path":"/emulated-devices"}}