Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpsGenieImportUtil utilizes deprecated V1 APIs #3

Open
craigbye opened this issue Jul 31, 2017 · 2 comments
Open

OpsGenieImportUtil utilizes deprecated V1 APIs #3

craigbye opened this issue Jul 31, 2017 · 2 comments
Assignees

Comments

@craigbye
Copy link

I have tried to utilize the Import utility with a test OpsGenie account.

The OpsGenieImportUtil makes calls to deprecated V1 APIs and thus you can't restore your configurations from the OpsGenieExportUtil.

Jul 31, 2017 11:42:04 AM com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient doGetRequest INFO: Executing OpsGenie request to [https://api.sandbox.opsgenie.com/v1/json/user] with Parameters:{apiKey=<snip>} 11:42:05.179 [main] ERROR com.opsgenie.tools.backup.importers.BaseImporter - Error at listing users com.ifountain.opsgenie.client.OpsGenieClientException: DeprecatedApiException[API v1 is deprecated. Please refer https://docs.opsgenie.com/docs/dashboard/rest-api for details of the new version] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.handleResponse(AbstractOpsGenieHttpClient.java:142) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.doGetRequest(AbstractOpsGenieHttpClient.java:129) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.InnerUserOpsGenieClient.listUsers(InnerUserOpsGenieClient.java:99) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.UserImporter.retrieveEntities(UserImporter.java:111) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.BaseImporter.restore(BaseImporter.java:58) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.UserImporter.restore(UserImporter.java:23) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ConfigurationImporter.restore(ConfigurationImporter.java:121) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ImportMain.main(ImportMain.java:75) [OpsGenieImportUtil.jar:0.5.0] 11:42:05.185 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring users operation is finished 11:42:05.185 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring teams operation is started Jul 31, 2017 11:42:05 AM com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient doGetRequest INFO: Executing OpsGenie request to [https://api.sandbox.opsgenie.com/v1/json/team] with Parameters:{apiKey=<snip>} 11:42:05.296 [main] ERROR com.opsgenie.tools.backup.importers.BaseImporter - Error at listing teams com.ifountain.opsgenie.client.OpsGenieClientException: DeprecatedApiException[API v1 is deprecated. Please refer https://docs.opsgenie.com/docs/dashboard/rest-api for details of the new version] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.handleResponse(AbstractOpsGenieHttpClient.java:142) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.doGetRequest(AbstractOpsGenieHttpClient.java:129) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.InnerTeamOpsGenieClient.listTeams(InnerTeamOpsGenieClient.java:66) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.TeamImporter.retrieveEntities(TeamImporter.java:73) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.BaseImporter.restore(BaseImporter.java:58) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.TeamImporter.restore(TeamImporter.java:20) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ConfigurationImporter.restore(ConfigurationImporter.java:121) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ImportMain.main(ImportMain.java:75) [OpsGenieImportUtil.jar:0.5.0] 11:42:05.297 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring teams operation is finished 11:42:05.297 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring groups operation is started Jul 31, 2017 11:42:05 AM com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient doGetRequest INFO: Executing OpsGenie request to [https://api.sandbox.opsgenie.com/v1/json/group] with Parameters:{apiKey=<snip>} 11:42:05.337 [main] ERROR com.opsgenie.tools.backup.importers.BaseImporter - Error at listing groups com.ifountain.opsgenie.client.OpsGenieClientException: DeprecatedApiException[API v1 is deprecated. Please refer https://docs.opsgenie.com/docs/dashboard/rest-api for details of the new version] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.handleResponse(AbstractOpsGenieHttpClient.java:142) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.doGetRequest(AbstractOpsGenieHttpClient.java:129) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.InnerGroupOpsGenieClient.listGroups(InnerGroupOpsGenieClient.java:59) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.GroupImporter.retrieveEntities(GroupImporter.java:69) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.BaseImporter.restore(BaseImporter.java:58) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.GroupImporter.restore(GroupImporter.java:19) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ConfigurationImporter.restore(ConfigurationImporter.java:121) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ImportMain.main(ImportMain.java:75) [OpsGenieImportUtil.jar:0.5.0] 11:42:05.338 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring groups operation is finished 11:42:05.338 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring schedules operation is started Jul 31, 2017 11:42:05 AM com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient doGetRequest INFO: Executing OpsGenie request to [https://api.sandbox.opsgenie.com/v1/json/schedule] with Parameters:{apiKey=<snip>} 11:42:05.521 [main] ERROR com.opsgenie.tools.backup.importers.BaseImporter - Error at listing schedules com.ifountain.opsgenie.client.OpsGenieClientException: DeprecatedApiException[API v1 is deprecated. Please refer https://docs.opsgenie.com/docs/dashboard/rest-api for details of the new version] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.handleResponse(AbstractOpsGenieHttpClient.java:142) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.doGetRequest(AbstractOpsGenieHttpClient.java:129) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.InnerScheduleOpsGenieClient.listSchedules(InnerScheduleOpsGenieClient.java:92) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.ScheduleTemplateImporter.retrieveEntities(ScheduleTemplateImporter.java:59) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.BaseImporter.restore(BaseImporter.java:58) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.ScheduleTemplateImporter.restore(ScheduleTemplateImporter.java:15) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ConfigurationImporter.restore(ConfigurationImporter.java:121) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ImportMain.main(ImportMain.java:75) [OpsGenieImportUtil.jar:0.5.0] 11:42:05.522 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring schedules operation is finished 11:42:05.522 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring escalations operation is started Jul 31, 2017 11:42:05 AM com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient doGetRequest INFO: Executing OpsGenie request to [https://api.sandbox.opsgenie.com/v1/json/escalation] with Parameters:{apiKey=<snip>} 11:42:05.636 [main] ERROR com.opsgenie.tools.backup.importers.BaseImporter - Error at listing escalations com.ifountain.opsgenie.client.OpsGenieClientException: DeprecatedApiException[API v1 is deprecated. Please refer https://docs.opsgenie.com/docs/dashboard/rest-api for details of the new version] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.handleResponse(AbstractOpsGenieHttpClient.java:142) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.doGetRequest(AbstractOpsGenieHttpClient.java:129) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.InnerEscalationOpsGenieClient.listEscalations(InnerEscalationOpsGenieClient.java:57) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.EscalationImporter.retrieveEntities(EscalationImporter.java:77) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.BaseImporter.restore(BaseImporter.java:58) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.EscalationImporter.restore(EscalationImporter.java:20) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ConfigurationImporter.restore(ConfigurationImporter.java:121) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ImportMain.main(ImportMain.java:75) [OpsGenieImportUtil.jar:0.5.0] 11:42:05.636 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring escalations operation is finished 11:42:05.636 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring schedules operation is started Jul 31, 2017 11:42:05 AM com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient doGetRequest INFO: Executing OpsGenie request to [https://api.sandbox.opsgenie.com/v1/json/schedule] with Parameters:{apiKey=<snip>} 11:42:05.766 [main] ERROR com.opsgenie.tools.backup.importers.BaseImporter - Error at listing schedules com.ifountain.opsgenie.client.OpsGenieClientException: DeprecatedApiException[API v1 is deprecated. Please refer https://docs.opsgenie.com/docs/dashboard/rest-api for details of the new version] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.handleResponse(AbstractOpsGenieHttpClient.java:142) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.doGetRequest(AbstractOpsGenieHttpClient.java:129) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.InnerScheduleOpsGenieClient.listSchedules(InnerScheduleOpsGenieClient.java:92) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.ScheduleImporter.retrieveEntities(ScheduleImporter.java:92) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.BaseImporter.restore(BaseImporter.java:58) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.ScheduleImporter.restore(ScheduleImporter.java:21) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ConfigurationImporter.restore(ConfigurationImporter.java:121) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ImportMain.main(ImportMain.java:75) [OpsGenieImportUtil.jar:0.5.0] 11:42:05.767 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring schedules operation is finished 11:42:05.767 [main] INFO com.opsgenie.tools.backup.importers.UserNotificationImporter - Restoring notifications operation is started Jul 31, 2017 11:42:05 AM com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient doGetRequest INFO: Executing OpsGenie request to [https://api.sandbox.opsgenie.com/v1/json/user] with Parameters:{apiKey=<snip>} 11:42:05.798 [main] ERROR com.opsgenie.tools.backup.ConfigurationImporter - Error at restoring. com.opsgenie.tools.backup.RestoreException: Error at listing users for notification rules at com.opsgenie.tools.backup.importers.UserNotificationImporter.retrieveUserList(UserNotificationImporter.java:129) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.UserNotificationImporter.restore(UserNotificationImporter.java:83) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ConfigurationImporter.restore(ConfigurationImporter.java:121) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ImportMain.main(ImportMain.java:75) [OpsGenieImportUtil.jar:0.5.0] Caused by: com.ifountain.opsgenie.client.OpsGenieClientException: DeprecatedApiException[API v1 is deprecated. Please refer https://docs.opsgenie.com/docs/dashboard/rest-api for details of the new at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.handleResponse(AbstractOpsGenieHttpClient.java:142) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.doGetRequest(AbstractOpsGenieHttpClient.java:129) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.InnerUserOpsGenieClient.listUsers(InnerUserOpsGenieClient.java:99) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.UserNotificationImporter.retrieveUserList(UserNotificationImporter.java:127) ~[OpsGenieImportUtil.jar:0.5.0] ... 3 more 11:42:05.798 [main] INFO com.opsgenie.tools.backup.importers.TeamRoutingRuleImporter - Restoring teamRoutingRules operation is started Jul 31, 2017 11:42:05 AM com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient doGetRequest INFO: Executing OpsGenie request to [https://api.sandbox.opsgenie.com/v1/json/team] with Parameters:{apiKey=<snip>} 11:42:05.829 [main] ERROR com.opsgenie.tools.backup.ConfigurationImporter - Error at restoring. com.opsgenie.tools.backup.RestoreException: Error at listing teams for team routing rules at com.opsgenie.tools.backup.importers.TeamRoutingRuleImporter.retrieveTeamList(TeamRoutingRuleImporter.java:119) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.TeamRoutingRuleImporter.restore(TeamRoutingRuleImporter.java:70) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ConfigurationImporter.restore(ConfigurationImporter.java:121) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ImportMain.main(ImportMain.java:75) [OpsGenieImportUtil.jar:0.5.0] Caused by: com.ifountain.opsgenie.client.OpsGenieClientException: DeprecatedApiException[API v1 is deprecated. Please refer https://docs.opsgenie.com/docs/dashboard/rest-api for details of the new at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.handleResponse(AbstractOpsGenieHttpClient.java:142) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.doGetRequest(AbstractOpsGenieHttpClient.java:129) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.InnerTeamOpsGenieClient.listTeams(InnerTeamOpsGenieClient.java:66) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.TeamRoutingRuleImporter.retrieveTeamList(TeamRoutingRuleImporter.java:117) ~[OpsGenieImportUtil.jar:0.5.0] ... 3 more 11:42:05.830 [main] INFO com.opsgenie.tools.backup.importers.BaseImporter - Restoring forwardings operation is started 11:42:05.830 [main] ERROR com.opsgenie.tools.backup.importers.BaseImporter - Error : forwardings does not exist. Restoring forwardings skipeed 11:42:05.830 [main] INFO com.opsgenie.tools.backup.importers.ScheduleOverrideImporter - Restoring scheduleOverrides operation is started Jul 31, 2017 11:42:05 AM com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient doGetRequest INFO: Executing OpsGenie request to [https://api.sandbox.opsgenie.com/v1/json/schedule] with Parameters:{apiKey=<snip>} 11:42:05.861 [main] ERROR com.opsgenie.tools.backup.ConfigurationImporter - Error at restoring. com.opsgenie.tools.backup.RestoreException: Error at listing schedules for schedule overrides at com.opsgenie.tools.backup.importers.ScheduleOverrideImporter.retrieveScheduleList(ScheduleOverrideImporter.java:119) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.ScheduleOverrideImporter.restore(ScheduleOverrideImporter.java:70) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ConfigurationImporter.restore(ConfigurationImporter.java:121) [OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.ImportMain.main(ImportMain.java:75) [OpsGenieImportUtil.jar:0.5.0] Caused by: com.ifountain.opsgenie.client.OpsGenieClientException: DeprecatedApiException[API v1 is deprecated. Please refer https://docs.opsgenie.com/docs/dashboard/rest-api for details of the new at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.handleResponse(AbstractOpsGenieHttpClient.java:142) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.AbstractOpsGenieHttpClient.doGetRequest(AbstractOpsGenieHttpClient.java:129) ~[OpsGenieImportUtil.jar:0.5.0] at com.ifountain.opsgenie.client.InnerScheduleOpsGenieClient.listSchedules(InnerScheduleOpsGenieClient.java:92) ~[OpsGenieImportUtil.jar:0.5.0] at com.opsgenie.tools.backup.importers.ScheduleOverrideImporter.retrieveScheduleList(ScheduleOverrideImporter.java:117) ~[OpsGenieImportUtil.jar:0.5.0] ... 3 more 11:42:05.861 [main] INFO com.opsgenie.tools.backup.importers.IntegrationImporter - Restoring integrations operation is started

@mbaris
Copy link
Contributor

mbaris commented Aug 4, 2017

We are working on a new version that works with our new api. Should be available in 1-2 weeks

@craigbye
Copy link
Author

craigbye commented Aug 4, 2017

It would also be useful to update the README with instructions on how to test the restoration process. I have been working with OpsGenie support to do this, but its not a trivial process.

Also useful would be an indication of which integrations or components of OpsGenie are not supported in the backup/restoration process.

mbaris added a commit that referenced this issue Sep 10, 2017
disable secret key logging
minor refactors
@alpgurtan alpgurtan assigned alpgurtan and mbaris and unassigned alpgurtan Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants