{"info":{"_postman_id":"bd3700ef-2c2e-0048-7255-33627859c4ac","name":"Mobile Plugin","description":"RESTful API request samples for Mobile plugin of OctoberCMS.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"{{url}}/api/v1/installs","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","tests[\"Inserts or Updates correct data\"] = responseBody.has(\"new-install\") || responseBody.has(\"existing-install\");"]}}],"id":"e7462978-24dd-32a5-706d-542d1476be54","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"instance_id","value":"1234","type":"text"},{"key":"package","value":"com.acme.myapp","type":"text"}]},"url":"{{url}}/api/v1/installs","description":"Installs node:\nThis request should return status code 200 and insert or update the mobile install data to backend mobile list."},"response":[],"_postman_id":"e7462978-24dd-32a5-706d-542d1476be54"},{"name":"{{url}}/api/v1/installs","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Returns the correct error status code of 400\"] = responseCode.code === 400;","tests[\"Returns the correct error message\"] = responseBody.has(\"The selected package is invalid\");"]}}],"id":"b3e30245-34ba-3f36-5f55-8bfd21308438","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"instance_id","value":"1234","type":"text"},{"key":"package","value":"com.acme.wrongpackage","type":"text"}]},"url":"{{url}}/api/v1/installs","description":"Installs node:\nThis request should return status code 400 and show error that the package name is incorrect."},"response":[],"_postman_id":"b3e30245-34ba-3f36-5f55-8bfd21308438"},{"name":"{{url}}/api/v1/installs","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Returns the correct error status code of 400\"] = responseCode.code === 400;","tests[\"Returns the correct error message\"] = responseBody.has(\"The package format is invalid\");"]}}],"id":"9e55537b-b4d0-b675-9c06-80ec14a2e7b2","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"instance_id","value":"1234","type":"text"},{"key":"package","value":"com.acme.invalidpackageformat.","type":"text"}]},"url":"{{url}}/api/v1/installs","description":"Installs node: This request should return status code 400 and show error that the format of the package name is incorrect."},"response":[],"_postman_id":"9e55537b-b4d0-b675-9c06-80ec14a2e7b2"},{"name":"{{url}}/api/v1/installs","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Returns the correct error status code of 400\"] = responseCode.code === 400;","tests[\"Returns the correct error message\"] = responseBody.has(\"The instance id may not be greater than 16 characters\");"]}}],"id":"231e0041-557b-4a64-b3bb-f56f3c3bfad5","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"instance_id","value":"ReallyLongInstanceID","type":"text"},{"key":"package","value":"com.acme.myapp","type":"text"}]},"url":"{{url}}/api/v1/installs","description":"Installs node: This request should return status code 400 and show error that the length of the instance ID is too long."},"response":[],"_postman_id":"231e0041-557b-4a64-b3bb-f56f3c3bfad5"}]}