Get All Plans by User's Companies
8 min
the endpoint retrieves all test plans associated with a specific project that belong to the companies that the authenticated user is associated with the user must provide the project identifier in the path it returns a list of test plans in the form of plandto objects endpoint information url \<custom env url>/testinium restapi/api/projects/{projectid}/plans/byusercompanies method get authentication bearer token is required path variables parameter type required description projectid long yes the id of the project for which to retrieve plans response body upon a successful request, the api returns a list of active test plans in json format \[ { "id" 261, "project id" 580, "company id" 1, "plan name" "android", "group plan" false, "description" "", "enabled" true, "plan parallel test limit" 36, "scenarios" \[3076, 3077, 3078, 3079, 3080, 3056, 3087, 3086, 3100], "period" { "period type" "manual", "days of week" "2,3,4,5,6,7,1", "repeat period" 60 }, "alerts" \[], "alerts enabled" false, "failed test retry count" 3, "screen shot type" "yes", "video enabled" false, "environments" \[ { "id" 9 }, { "id" 13 } ], "clear app data" false, "fetch app files" \[], "selected android mobile app" { "id" 54, "mobile app name" "pegasus pilot release 2 39 0 38 2 ee15733f 2799725523214323595 apk", "mobile app hash" "57e487d42eaa459b1713df8c1dd691a8", "operating system" "android", "mobile app metadata" "{\\"packagename\\" \\"com pozitron pegasus pilotrelease\\",\\"label\\" \\"pgs pilot\\",\\"icon\\" \\"res/u3 png\\",\\"versionname\\" \\"2 39 0 38\\",\\"versioncode\\" 119,\\"minsdkversion\\" \\"23\\",\\"targetsdkversion\\" \\"33\\"}", "created at" "2024 10 18 09 34 30" }, "selected ios mobile app" { "id" 53, "mobile app name" "gratis b250541b 2 8988176051238453961 ipa", "mobile app hash" "556372e35d7f2b6fa4b7ceb4c0af8b58", "operating system" "ios", "mobile app metadata" "{\\"bundlename\\" \\"gratis\\",\\"bundledisplayname\\" \\"gratis\\",\\"bundleversion\\" \\"3 2 12\\",\\"bundleminosversion\\" \\"12 0\\",\\"bundledevelopmentregion\\" \\"tr\\",\\"bundleexecutable\\" \\"gratis\\",\\"bundleiconfiles\\" \\"\\",\\"bundleinfodictversion\\" \\"6 0\\",\\"bundlepackagetype\\" \\"appl\\",\\"bundlemainstoryboardfile\\" \\"main\\"}", "created at" "2024 10 18 09 34 30" } }, { "id" 262, "project id" 580, "company id" 1, "plan name" "ios", "group plan" false, "description" "", "enabled" true, "plan parallel test limit" 36, "scenarios" \[], "period" { "period type" "manual", "days of week" "2,3,4,5,6,7,1", "repeat period" 60 }, "alerts" \[], "alerts enabled" false, "failed test retry count" 0, "screen shot type" "yes", "video enabled" false, "environments" \[ { "id" 11 } ], "clear app data" false, "fetch app files" \[], "selected android mobile app" { "id" 54, "mobile app name" "pegasus pilot release 2 39 0 38 2 ee15733f 2799725523214323595 apk", "mobile app hash" "57e487d42eaa459b1713df8c1dd691a8", "operating system" "android", "mobile app metadata" "{\\"packagename\\" \\"com pozitron pegasus pilotrelease\\",\\"label\\" \\"pgs pilot\\",\\"icon\\" \\"res/u3 png\\",\\"versionname\\" \\"2 39 0 38\\",\\"versioncode\\" 119,\\"minsdkversion\\" \\"23\\",\\"targetsdkversion\\" \\"33\\"}", "created at" "2024 10 18 09 34 30" }, "selected ios mobile app" { "id" 53, "mobile app name" "gratis b250541b 2 8988176051238453961 ipa", "mobile app hash" "556372e35d7f2b6fa4b7ceb4c0af8b58", "operating system" "ios", "mobile app metadata" "{\\"bundlename\\" \\"gratis\\",\\"bundledisplayname\\" \\"gratis\\",\\"bundleversion\\" \\"3 2 12\\",\\"bundleminosversion\\" \\"12 0\\",\\"bundledevelopmentregion\\" \\"tr\\",\\"bundleexecutable\\" \\"gratis\\",\\"bundleiconfiles\\" \\"\\",\\"bundleinfodictversion\\" \\"6 0\\",\\"bundlepackagetype\\" \\"appl\\",\\"bundlemainstoryboardfile\\" \\"main\\"}", "created at" "2024 10 18 09 34 30" } }, { "id" 263, "project id" 580, "company id" 1, "plan name" "androidios", "group plan" false, "description" "", "enabled" true, "plan parallel test limit" 36, "scenarios" \[], "period" { "period type" "manual", "days of week" "2,3,4,5,6,7,1", "repeat period" 60 }, "alerts" \[], "alerts enabled" false, "failed test retry count" 0, "screen shot type" "yes", "video enabled" false, "environments" \[ { "id" 13 }, { "id" 11 } ], "clear app data" false, "fetch app files" \[], "selected android mobile app" { "id" 52, "mobile app name" "flo v4 1 35 apkpure com 8805574610750679613 apk", "mobile app hash" " " } } ] field type description id long the unique id of the test plan plan name string the name of the test plan group plan boolean indicates if the plan is a group plan description string the description of the test plan enabled boolean whether the test plan is active or not plan parallel test limit integer the maximum number of parallel tests allowed scenarios array list of scenarios associated with the plan period object information about the test period period type string the type of period (e g , manual) days of week string days of the week when the plan can run repeat period integer the repeat period in minutes alerts array list of alerts configured for the plan alerts enabled boolean whether alerts are enabled for the plan failed test retry count integer the number of retries allowed for failed tests error codes possible error codes and their explanations during the operation http code error message description 401 unauthorized authorization failed the user is not logged in 403 forbidden the user does not have permission to access plans for the specified project 404 project not found the specified project was not found 500 internal server error an unexpected error occurred on the server side example request curl location '\<custom env url>/testinium restapi/api/projects/{projectid}/plans/byusercompanies' \\ \ header 'authorization bearer \<your access token>'