{
  "swagger" : "2.0",
  "info" : {
    "version" : "2022-11-21T09:31:41Z",
    "title" : "directory-api"
  },
  "host" : "external.us-east-1.api.dextr.cloud",
  "basePath" : "/flex",
  "schemes" : [ "https" ],
  "paths" : {
    "/api/batch/{batchId}" : {
      "get" : {
        "parameters" : [ {
          "name" : "batchId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        } ],
        "responses" : {
            "200": {
            "description" : "Item Object"
            },
            "404" : {
            "description": "Batch not found"
          },
          "401" : {
            "description": "Unauthorized"
          },
            "500" : {
            "description": "Something went wrong"
          }
         },
        "security" : [ {
          "publicAPIAuthorizer" : [ ]
        } ]
      },
      "options" : {
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "name" : "batchId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "headers" : {
              "Access-Control-Allow-Origin" : {
                "type" : "string"
              },
              "Access-Control-Allow-Methods" : {
                "type" : "string"
              },
              "Access-Control-Allow-Headers" : {
                "type" : "string"
              }
            }
          },
          "404" : {
            "description": "Batch not found"
          },
           "500" : {
            "description": "Something went wrong"
          }

        }
      }
    },
    "/api/directory" : {
      "get" : {
        "responses" : {
           "200": {
            "description" : "Items List"
            },
            "500" : {
            "description": "Something went wrong"
          },
          "401" : {
            "description": "Unauthorized"
          }
         },
        "security" : [ {
          "publicAPIAuthorizer" : [ ]
        } ]
      },
      "post" : {
        "parameters" : [ {
            "in": "body",
            "name": "directory",
            "description": "the directory to create",
            "schema":
              {
                "type": "object",
                "required": ["Name, Workphone"],
                "properties":
                 {
                   "Name":
                      {"type": "string" },
                    "Email":
                      {"type": "string" },
                    "WorkPhone":
                      {"type": "string"},
                    "HomePhone":
                      {"type": "string"},
                    "CellPhone":
                      {"type": "string"},
                    "IsGlobal":
                      {"type": "boolean"}

                 }
         }
        }],
        "responses" : {
          "200": {
            "description" : "Entry Created"
            },
            "401" : {
            "description": "Unauthorized"
          },
            "500" : {
            "description": "Something went wrong"
          },
          "400" : {
            "description": "Invalid request"
          }
         },
        "security" : [ {
          "publicAPIAuthorizer" : [ ]
        } ]
      },
      "options" : {
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "responses" : {
          "200" : {
            "description" : "200 response",
            "headers" : {
              "Access-Control-Allow-Origin" : {
                "type" : "string"
              },
              "Access-Control-Allow-Methods" : {
                "type" : "string"
              },
              "Access-Control-Allow-Headers" : {
                "type" : "string"
              }
            }
          }
        }
      }
    },
    "/api/batch" : {
      "get" : {
        "responses" : {
           "200": {
            "description" : "Items List"
            },
            "500" : {
            "description": "Something went wrong"
          },
          "401" : {
            "description": "Unauthorized"
          }
         },
        "security" : [ {
          "publicAPIAuthorizer" : [ ]
        } ]
      },
      "options" : {
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "responses" : {
          "200" : {
            "description" : "200 response",
            "headers" : {
              "Access-Control-Allow-Origin" : {
                "type" : "string"
              },
              "Access-Control-Allow-Methods" : {
                "type" : "string"
              },
              "Access-Control-Allow-Headers" : {
                "type" : "string"
              }
            }
          }
        }
      }
    },
    "/api/directory/batch" : {
      "post" : {
        "parameters" :  [{
            "in": "body",
            "name": "directory",
            "description": "the directory to create",
            "schema":
              {
                "type": "array",
                "required": ["Name, Workphone"],
                "items": {
                "properties":
                  {
                    "Name":
                        {"type": "string" },
                      "Email":
                        {"type": "string" },
                      "Workphone":
                        {"type": "string"},
                      "Homehone":
                        {"type": "string"},
                      "CellPhone":
                        {"type": "string"},
                      "IsGlobal":
                        {"type": "boolean"}

                    }
                  }
         }
        }],
        "responses" : {
          "200": {
            "description" : "Batch Object"
            },
            "500" : {
            "description": "Something went wrong"
          },
          "401" : {
            "description": "Unauthorized"
          }
         },
        "security" : [ {
          "publicAPIAuthorizer" : [ ]
        } ]
      },
      "options" : {
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "responses" : {
          "200" : {
            "description" : "200 response",
            "headers" : {
              "Access-Control-Allow-Origin" : {
                "type" : "string"
              },
              "Access-Control-Allow-Methods" : {
                "type" : "string"
              },
              "Access-Control-Allow-Headers" : {
                "type" : "string"
              }
            }
          }
        }
      }
    },
    "/api/directory/{id}" : {
      "get" : {
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "type" : "string"
        } ],
        "responses" : {
          "200": {
            "description" : "Item Object"
            },
            "404" : {
            "description": "Item not found"
          },
          "401" : {
            "description": "Unauthorized"
          },
            "500" : {
            "description": "Something went wrong"
          }
         },
        "security" : [ {
          "publicAPIAuthorizer" : [ ]
        } ]
      },
      "delete" : {
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "type" : "string"
        } ],
        "responses" : {
           "200": {
            "description" : "Entry deleted"
            },
            "404" : {
            "description": "Item not found or has been already deleted"
          },
            "500" : {
            "description": "Something went wrong"
          }
         },
        "security" : [ {
          "publicAPIAuthorizer" : [ ]
        } ]
      },
      "options" : {
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "type" : "string"
        } ],
        "responses" : {
          "200" : {
            "description" : "200 response",
            "headers" : {
              "Access-Control-Allow-Origin" : {
                "type" : "string"
              },
              "Access-Control-Allow-Methods" : {
                "type" : "string"
              },
              "Access-Control-Allow-Headers" : {
                "type" : "string"
              }
            }
          }
        }
      }
    }
  },
  "securityDefinitions" : {
    "publicAPIAuthorizer" : {
      "type" : "apiKey",
      "name" : "Authorization",
      "in" : "header",
      "x-amazon-apigateway-authtype" : "custom"
    }
  }
}
