{"id":36283,"date":"2024-08-21T13:59:37","date_gmt":"2024-08-21T12:59:37","guid":{"rendered":"https:\/\/developers.ila.cegid.com\/valuekeep\/\/"},"modified":"2024-12-26T18:24:19","modified_gmt":"2024-12-26T17:24:19","slug":"webapi-creating-a-maintenance-plan","status":"publish","type":"valuekeep","link":"https:\/\/developers.ila.cegid.com\/en\/valuekeep\/development-en\/transversal-en\/article\/webapi-creating-a-maintenance-plan","title":{"rendered":"How to create or delete a maintenance plan?"},"content":{"rendered":"<section class=\"av_textblock_section \"  itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/CreativeWork\" ><div class='avia_textblock  '   itemprop=\"text\" ><h2>Create Maintenance Plan<\/h2>\n<p>This method allows to create a maintenance plan in a simplified manner.<\/p>\n<div><\/div>\n<div>\u00a0The method to be used when creating a maintenance plan is:\u00a0 <b>POST<br \/>\nurl\/api\/mytenant\/myorganization\/maintenancecore\/maintenanceplans<\/b><\/div>\n<div><\/div>\n<div>Json example for creating a maintenance plan:<\/div>\n<div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"maintenancePlanKey\":\u00a0\"PM_0001\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"description\":\u00a0\"Verifica\u00e7\u00e3o\u00a0tubos\u00a0de\u00a0\u00e1gua\u00a0\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"remarks\":\u00a0null,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"maintenancePlanType\":\u00a0\"CR\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"maintenancePlanTasks\":\u00a0[\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"task\":\u00a0\"T_000001\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"duration\":\u00a0\"01:00:00\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0],\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"workshop\":\u00a0\"MN\"\r\n\u00a0\u00a0\u00a0\u00a0}<\/pre>\n<\/div>\n<div><span style=\"font-size: 12pt;\">This method allows to create a maintenance plan according to the <\/span><span style=\"font-size: 12pt;\">parameters filled in:<\/span><\/div>\n<div>\n<ol>\n<li><b>maintenancePlanKey<\/b>: The maintenance plan key. This field is mandatory.<\/li>\n<li><b>description<\/b>: Short description of the maintenance plan. This field is mandatory.<\/li>\n<li><b>remarks<\/b>: Remarks.<\/li>\n<li><b>maintenancePlanType<\/b>: The key of the maintenance plan type. This field is mandatory.<\/li>\n<li><b>maintenancePlanTasks<\/b>. The task key for the maintenance plan and its duration. This field must have at least one task.<\/li>\n<li><b>workshop<\/b>: The key of the workshop.<\/li>\n<\/ol>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0cm; line-height: normal;\"><span style=\"font-size: 11.5pt;\">When this method is executed successfully, it returns HttpStatusCode.201Created.<\/span><\/p>\n<\/div>\n<div><\/div>\n<\/div><\/section>\n<section class=\"av_textblock_section \"  itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/CreativeWork\" ><div class='avia_textblock  '   itemprop=\"text\" ><h2>Delete Maintenance Plan<\/h2>\n<p>This method allows you to delete a maintenance plan.<\/p>\n<div><\/div>\n<div>\u00a0The method to be used when deleting a maintenance plan is:<\/div>\n<div><\/div>\n<p><b>DELETE\u00a0 url\/api\/mytenant\/myorganization\/maintenancecore\/maintenanceplans\/{{maintenanceplanKey}}<\/b><\/p>\n<div><\/div>\n<div>\u00a0The parameters being replaced on the method are:<\/div>\n<ol>\n<li class=\"sty__9li8t7__cls\"><b>maintenanceplanKey<\/b>: key of the maintenance plan you wish to delete.<\/li>\n<\/ol>\n<div>\u00a0When this method is executed successfully, it returns HttpStatusCode.204.<\/div>\n<\/div><\/section>\n","protected":false},"excerpt":{"rendered":"","protected":false},"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","tags":[919],"videos_tax":[],"post-type":[],"categoria-valuekeep":[947],"class_list":["post-36283","valuekeep","type-valuekeep","status-publish","format-standard","hentry","tag-maintenance-plans","categoria-valuekeep-transversal-en"],"_links":{"self":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/valuekeep\/36283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/valuekeep"}],"about":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/types\/valuekeep"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/comments?post=36283"}],"version-history":[{"count":0,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/valuekeep\/36283\/revisions"}],"wp:attachment":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/media?parent=36283"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/tags?post=36283"},{"taxonomy":"videos_tax","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/videos_tax?post=36283"},{"taxonomy":"post-type","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/post-type?post=36283"},{"taxonomy":"categoria-valuekeep","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/categoria-valuekeep?post=36283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}