shireesha-p
5/1/2017 - 4:28 AM

swagger file for nbndm

swagger file for nbndm

{  
   "swagger":"2.0",
   "info":{  
      "description":"Order Management",
      "version":"1.0",
      "title":"NBN Domain Manager Order Management",
      "contact":{  
         "name":"# NBN+ Fulfilment Teams",
         "email":"D1115947@team.telstra.com"
      }
   },
   "host":"api.in.telstra.com.au",
   "schemes":[  
      "http"
   ],
   "basePath":"/application/nbnco",
   "tags":[  
      {  
         "name":"query-order-details-controller",
         "description":"Query Order Details Controller"
      },
      {  
         "name":"cancel-order-controller",
         "description":"Cancel Order Controller"
      },
      {  
         "name":"submit-order-details-controller",
         "description":"Submit Order Details Controller"
      }
   ],
   "paths":{  
      "/v2/orders":{  
         "post":{  
            "tags":[  
               "submit-order-details-controller"
            ],
            "summary":"postNbnOrderV2",
            "operationId":"postNbnOrderV2",
            "consumes":[  
               "application/json"
            ],
            "produces":[  
               "application/json"
            ],
            "parameters":[  
               {  
                  "name":"Authorization",
                  "in":"header",
                  "description":"A header in the format 'Bearer {access_token}' - get the token by using the OAuth API with the scope 'DOMAINMANAGERS'",
                  "type":"string",
                  "required":true
               },
               {  
                  "name":"request",
                  "in":"body",
                  "description":"Request body",
                  "required":true,
                  "schema":{  
                     "$ref":"#/definitions/body"
                  }
               }
            ],
            "responses":{  
               "202":{  
                  "description":"Accepted",
                  "examples":{  
                     "application/json":{  
                        "code":202,
                        "time":"2016-04-22T05:03:20.299+0000",
                        "correlationId":"58fb5c78-77ed-4f58-97e3-6e0ae3ce498e",
                        "path":"/application/nbnco/v2/orders",
                        "method":"POST",
                        "data":{  
                           "activityName":"NBN",
                           "serviceName":"FixedAccess",
                           "status":"INITIATED",
                           "nbnCoStatus":"OrderInitiated"
                        },
                        "request":{  

                        }
                     }
                  },
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "401":{  
                  "description":"Unauthorized",
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "403":{  
                  "description":"Forbidden",
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "404":{  
                  "description":"Not Found",
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "422":{  
                  "description":"Missing or Invalid input",
                  "examples":{  
                     "application/json":{  
                        "status":422,
                        "code":422,
                        "responseCode":"NBN-VALIDATION-ERROR",
                        "message":"validation failed for some of the inputs fields",
                        "time":"2017-09-15T17:00:55.181+1000",
                        "correlationId":"49de8aec-67e5-4949-a870-9d28e9d438c0",
                        "path":"/application/nbnco/v2/orders",
                        "method":"POST",
                        "data":{  

                        },
                        "request":{  
                           "params":{  

                           },
                           "method":"POST",
                           "path":"/application/nbnco/v2/orders",
                           "data":{  
                              "orderReferenceId":"abc123",
                              "locationId":"LOC000065454781",
                              "uploadSpeed":"TC1",
                              "networkTerminationId":"678",
                              "serviceabilityClass":"jkdhjnckjdj",
                              "accessTechnology":"FTTB",
                              "cvcId":"7",
                              "cvlanId":"50",
                              "bandwidthProfile":"D25_U10_Mbps_TC4_P",
                              "portId":"1",
                              "priorityAssist":false,
                              "informedConsent":true,
                              "installationWorkforce":"RSP",
                              "euEngagement":"Appointment",
                              "batteryBackupService":"true",
                              "serviceRestorationSLA":"Standard",
                              "orderSLA":"Standard",
                              "lineActive":true,
                              "appointmentId":"null",
                              "transitionOrder":{  
                                 "fnn":"fnn",
                                 "ull":"gghgjgjhg"
                              },
                              "transferOrder":{  
                                 "type":null,
                                 "customerAuthorityDate":"24-05-2018",
                                 "localNumberPorting":true
                              },
                              "serviceResourceId":"1234567",
                              "action":"Create",
                              "features":{  
                                 "orderSLA":"Standard",
                                 "serviceRestorationSLA":"Standard",
                                 "priorityAssist":true,
                                 "batteryBackupService":false,
                                 "centralSplitter":false,
                                 "dslStabilityProfile":{  
                                    "profile":"Stable"
                                 },
                                 "insertDSLLineRate":true
                              }
                           },
                           "correlationId":"49de8aec-67e5-4949-a870-9d28e9d438c0",
                           "respondTo":"controller-invoker.v1.Process"
                        },
                        "errors":[  
                           {  
                              "message":"data.transferOrder.type is an invalid format",
                              "code":"NBN-VALIDATION-ERROR"
                           }
                        ]
                     }
                  },
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "503":{  
                  "description":"Service Unavailable",
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               }
            },
            "security":[  
               {  
                  "okapi_oauth":[  
                     "DOMAINMANAGERS"
                  ]
               }
            ]
         }
      },
      "/v1/orders/{type}/{Id}":{  
         "get":{  
            "tags":[  
               "query-order-details-controller"
            ],
            "summary":"doGet",
            "operationId":"doGetUsingGET",
            "consumes":[  
               "application/json"
            ],
            "produces":[  
               "application/json"
            ],
            "parameters":[  
               {  
                  "name":"Authorization",
                  "in":"header",
                  "description":"A header in the format 'Bearer {access_token}' - get the token by using the OAuth API with the scope 'DOMAINMANAGERS'",
                  "type":"string",
                  "required":true
               },
               {  
                  "name":"code",
                  "in":"query",
                  "required":false,
                  "type":"integer",
                  "format":"int32"
               },
               {  
                  "name":"message",
                  "in":"query",
                  "required":false,
                  "type":"string"
               },
               {  
                  "name":"receivedRoutingKey",
                  "in":"query",
                  "required":false,
                  "type":"string"
               },
               {  
                  "name":"Id",
                  "in":"path",
                  "description":"Id",
                  "required":true,
                  "type":"string"
               },
               {  
                  "name":"type",
                  "in":"path",
                  "description":"type",
                  "required":true,
                  "type":"string"
               }
            ],
            "responses":{  
               "200":{  
                  "description":"OK",
                  "examples":{  
                     "application/json":{  
                        "status":200,
                        "code":200,
                        "time":"2017-02-27T09:43:42.284+1100",
                        "correlationId":"ea3c970a-4157-4491-b909-7a6bd1e8ff27",
                        "path":"/application/nbnco/v1/orders/reference/123456",
                        "method":"GET",
                        "data":{  
                           "nbnOrderId":"ORD000444555600",
                           "orderRequestedDate":"2011-05-09T09:00:00Z",
                           "referenceId":"123456789101112",
                           "orderCompleteDate":"2011-06-23T12:00:00Z",
                           "orderStatus":"Complete",
                           "productTemplateId":"TPL123456123456",
                           "productTemplateVersion":"1.0",
                           "cvcId":"CVC012345678903",
                           "cvLanId":201,
                           "copperPairId":"CPI000000000001",
                           "uniPortType":"Default-Mapped",
                           "features":{  
                              "nbnPriorityAssist":"No",
                              "serviceRestorationSla":{  
                                 "profile":"Standard"
                              },
                              "dslStabilityProfile":{  
                                 "profile":"Standard"
                              }
                           }
                        },
                        "request":{  
                           "params":{  

                           },
                           "method":"GET",
                           "path":"/application/nbnco/v1/orders/reference/123456"
                        }
                     }
                  },
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "401":{  
                  "description":"Unauthorized",
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "403":{  
                  "description":"Forbidden",
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "404":{  
                  "description":"Not Found",
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "503":{  
                  "description":"Service Unavailable"
               }
            },
            "security":[  
               {  
                  "okapi_oauth":[  
                     "DOMAINMANAGERS"
                  ]
               }
            ]
         }
      },
      "/v1/orders/{serviceResourceId}/{productInstanceId}":{  
         "delete":{  
            "tags":[  
               "cancel-order-controller"
            ],
            "summary":"doDelete",
            "operationId":"doDeleteUsingDELETE",
            "consumes":[  
               "application/json"
            ],
            "produces":[  
               "application/json"
            ],
            "parameters":[  
               {  
                  "name":"Authorization",
                  "in":"header",
                  "description":"A header in the format 'Bearer {access_token}' - get the token by using the OAuth API with the scope 'DOMAINMANAGERS'",
                  "type":"string",
                  "required":true
               },
               {  
                  "name":"serviceResourceId",
                  "in":"path",
                  "description":"Service resource Id",
                  "required":true,
                  "type":"string"
               },
               {  
                  "name":"productInstanceId",
                  "in":"path",
                  "description":"NBN order Id",
                  "required":true,
                  "type":"string"
               }
            ],
            "responses":{  
               "202":{  
                  "description":"Accepted",
                  "examples":{  
                     "application/json":{  
                        "status":202,
                        "code":202,
                        "responseCode":"ADM-SUCCESS",
                        "time":"2017-05-19T18:54:46.834+0530",
                        "correlationId":"5a9b4f86-dd10-4218-848b-15ff05adca9f",
                        "path":"/application/nbnco/v1/orders/123456/1234",
                        "method":"DELETE",
                        "data":{  

                        },
                        "request":{  
                           "params":{  

                           },
                           "method":"DELETE",
                           "path":"/application/nbnco/v1/orders/123456/1234"
                        }
                     }
                  },
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "401":{  
                  "description":"Unauthorized",
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "403":{  
                  "description":"Forbidden",
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "404":{  
                  "description":"Not Found",
                  "schema":{  
                     "$ref":"#/definitions/MicroserviceResponse"
                  }
               },
               "503":{  
                  "description":"Service Unavailable"
               }
            },
            "security":[  
               {  
                  "okapi_oauth":[  
                     "DOMAINMANAGERS"
                  ]
               }
            ]
         }
      }
   },
   "securityDefinitions":{  
      "okapi_oauth":{  
         "type":"oauth2",
         "authorizationUrl":"/v1/oauth/token",
         "flow":"implicit",
         "scopes":{  
            "DOMAINMANAGERS":"Authorisation to use a Domain Manager"
         }
      }
   },
   "definitions":{  
      "body":{  
         "type":"object",
         "required":[  
            "correlationId",
            "data",
            "respondTo"
         ],
         "properties":{  
            "correlationId":{  
               "type":"integer",
               "format":"int64"
            },
            "data":{  
               "$ref":"#/definitions/data"
            },
            "respondTo":{  
               "type":"string",
               "example":"svc-order-fulfilment-orchestrator.v1.Process"
            }
         }
      },
      "data":{  
         "type":"object",
         "properties":{  
            "serviceResourceId":{  
               "type":"string",
               "example":"serviceResourceId"
            },
            "processId":{  
               "type":"string",
               "example":"processId123"
            },
            "orderReferenceId":{  
               "type":"string",
               "example":"orderReferenceId1234"
            },
            "accessTechnology":{  
               "type":"string",
               "example":"FTTN"
            },
            "locationId":{  
               "type":"string",
               "example":"LOC161123111624"
            },
            "appointmentId":{  
               "type":"string",
               "example":"12345789"
            },
            "transitionOrder":{  
               "type":"object",
               "properties":{  
                  "fnn":{  
                     "type":"string",
                     "example":"fnn"
                  },
                  "ull":{  
                     "type":"string",
                     "example":"ull"
                  }
               }
            },
            "transferOrder":{  
               "type":"object",
               "properties":{  
                  "type":{  
                     "type":"string",
                     "example":"Connect"
                  },
                  "customerAuthorityDate":{  
                     "type":"string",
                     "example":"24-05-1890"
                  },
                  "localNumberPorting":{  
                     "type":"boolean",
                     "example":true
                  }
               }
            },
            "priorityAssist":{  
               "type":"boolean",
               "example":true
            },
            "lineActive":{  
               "type":"boolean",
               "example":true
            },
            "batteryBackupService":{  
               "type":"boolean",
               "example":true
            },
            "informedConsent":{  
               "type":"boolean",
               "example":true
            },
            "serviceRestorationSLA":{  
               "type":"string",
               "example":"Standard"
            },
            "orderSLA":{  
               "type":"string",
               "example":"Standard"
            },
            "installationWorkforce":{  
               "type":"string",
               "example":"installationWorkforce"
            },
            "euEngagement":{  
               "type":"string",
               "example":"Appointment"
            },
            "portId":{  
               "type":"string",
               "example":"0"
            },
            "bandwidthProfile":{  
               "type":"string",
               "example":"DW_U8_9P_UBKJB"
            },
            "networkTerminationId":{  
               "type":"string",
               "example":"34444"
            },
            "serviceabilityClass":{  
               "type":"string",
               "example":"5"
            },
            "cvcId":{  
               "type":"string",
               "example":"4343434343"
            },
            "cvlanId":{  
               "type":"string",
               "example":"4000"
            },
            "features":{  
               "type":"object",
               "properties":{  
                  "orderSLA":{  
                     "type":"string",
                     "example":"Standard"
                  },
                  "serviceRestorationSLA":{  
                     "type":"string",
                     "example":"Standard"
                  },
                  "priorityAssist":{  
                     "type":"boolean",
                     "example":true
                  },
                  "batteryBackupService":{  
                     "type":"boolean",
                     "example":true
                  },
                  "centralSplitter":{  
                     "type":"boolean",
                     "example":true
                  },
                  "insertDSLLineRate":{  
                     "type":"boolean",
                     "example":true
                  },
                  "dslStabilityProfile":{  
                     "type":"object",
                     "properties":{  
                        "profile":{  
                           "type":"string",
                           "example":"Standard"
                        }
                     }
                  }
               }
            }
         }
      },
      "ObjectNode":{  
         "type":"object",
         "properties":{  
            "array":{  
               "type":"boolean"
            },
            "bigDecimal":{  
               "type":"boolean"
            },
            "bigInteger":{  
               "type":"boolean"
            },
            "binary":{  
               "type":"boolean"
            },
            "boolean":{  
               "type":"boolean"
            },
            "containerNode":{  
               "type":"boolean"
            },
            "double":{  
               "type":"boolean"
            },
            "float":{  
               "type":"boolean"
            },
            "floatingPointNumber":{  
               "type":"boolean"
            },
            "int":{  
               "type":"boolean"
            },
            "integralNumber":{  
               "type":"boolean"
            },
            "long":{  
               "type":"boolean"
            },
            "missingNode":{  
               "type":"boolean"
            },
            "nodeType":{  
               "type":"string",
               "enum":[  
                  "ARRAY",
                  "BINARY",
                  "BOOLEAN",
                  "MISSING",
                  "NULL",
                  "NUMBER",
                  "OBJECT",
                  "POJO",
                  "STRING"
               ]
            },
            "null":{  
               "type":"boolean"
            },
            "number":{  
               "type":"boolean"
            },
            "object":{  
               "type":"boolean"
            },
            "pojo":{  
               "type":"boolean"
            },
            "short":{  
               "type":"boolean"
            },
            "textual":{  
               "type":"boolean"
            },
            "valueNode":{  
               "type":"boolean"
            }
         }
      },
      "MicroserviceError":{  
         "type":"object",
         "properties":{  
            "code":{  
               "type":"string"
            },
            "message":{  
               "type":"string"
            }
         }
      },
      "MicroserviceResponse":{  
         "type":"object",
         "required":[  
            "message"
         ],
         "properties":{  
            "code":{  
               "type":"integer",
               "format":"int32"
            },
            "correlationId":{  
               "type":"string"
            },
            "data":{  
               "$ref":"#/definitions/ObjectNode"
            },
            "errors":{  
               "type":"array",
               "items":{  
                  "$ref":"#/definitions/MicroserviceError"
               }
            },
            "header":{  
               "type":"object",
               "additionalProperties":{  
                  "type":"string"
               }
            },
            "message":{  
               "type":"string"
            },
            "method":{  
               "type":"string",
               "enum":[  
                  "GET",
                  "HEAD",
                  "POST",
                  "PUT",
                  "PATCH",
                  "DELETE",
                  "OPTIONS",
                  "TRACE"
               ]
            },
            "params":{  
               "type":"object",
               "additionalProperties":{  
                  "type":"string"
               }
            },
            "path":{  
               "type":"string"
            },
            "request":{  
               "$ref":"#/definitions/ObjectNode"
            },
            "respondTo":{  
               "type":"string"
            },
            "status":{  
               "type":"integer",
               "format":"int32"
            },
            "time":{  
               "type":"string"
            }
         }
      }
   }
}