swagger: "2.0" info: version: 0.0.2 title: "cloud" description: "Cloud Gateway Microservice" termsOfService: "http://telnexus.com/terms/" contact: email: "noc@telnexus.com" license: name: "Proprietary - Copyright (c) 2018-2020 by Telnexus LLC." securityDefinitions: ApiKeyAuth: type: "apiKey" in: "header" name: "X-API-Key" security: - ApiKeyAuth: [] schemes: - "http" basePath: "/v1" host: "cloud.infra.tnxs.net:8080" consumes: - "application/json" produces: - "application/json" parameters: apiKeyQuery: description: Service account or developer API key in: query name: apikey type: string hubRequest: description: An array of new Hub records in: body name: hubRequest required: true schema: $ref: "#/definitions/HubRequest" limitQuery: description: "How many objects to return at one time" format: int64 in: query name: limit required: false type: integer accountIdQuery: description: Taxnexus Record Id of an Account in: query name: accountId required: false type: string nameQuery: description: The Name of this Object in: query name: name required: false type: string offsetQuery: description: How many objects to skip? (default 0) format: int64 in: query name: offset required: false type: integer activeQuery: description: Retrieve active records? in: query name: active required: false type: boolean emailQuery: description: Email address? in: query name: email required: false type: string responses: AccessForbidden: description: "Access forbidden, account lacks access" schema: $ref: "#/definitions/Error" NotFound: description: Resource was not found schema: $ref: "#/definitions/Error" ServerError: description: Server Internal Error schema: $ref: "#/definitions/Error" Unauthorized: description: "Access Unauthorized, invalid API-KEY was used" schema: $ref: "#/definitions/Error" UnprocessableEntity: description: "Unprocessable Entity, likely a bad parameter" schema: $ref: "#/definitions/Error" UserResponse: description: Taxnexus Response with User objects schema: $ref: "#/definitions/UserResponse" HubResponse: description: Telnexus Response with Hub objects headers: Access-Control-Allow-Origin: type: string Cache-Control: type: string schema: $ref: "#/definitions/HubResponse" DeleteResponse: description: Taxnexus Response with Message Objects with Delete Status headers: Access-Control-Allow-Origin: type: string schema: $ref: "#/definitions/DeleteResponse" CORSResponse: description: CORS OPTIONS response headers: Access-Control-Allow-Origin: type: string Access-Control-Allow-Headers: type: string Access-Control-Allow-Methods: type: string Access-Control-Expose-Headers: type: string Access-Control-Max-Age: type: string Access-Control-Allow-Credentials: type: string Cache-Control: type: string paths: /hubs: delete: description: Delete Telnexus Hub record operationId: deleteHub parameters: - $ref: "#/parameters/accountIdQuery" responses: "200": $ref: "#/responses/DeleteResponse" "401": $ref: "#/responses/Unauthorized" "403": $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] summary: Delete An Hub tags: - Hub get: description: Return a list of all available Hubs operationId: getHubs parameters: - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/nameQuery" - $ref: "#/parameters/offsetQuery" - $ref: "#/parameters/activeQuery" - $ref: "#/parameters/accountIdQuery" - $ref: "#/parameters/emailQuery" responses: "200": $ref: "#/responses/HubResponse" "401": $ref: "#/responses/Unauthorized" "403": $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] summary: Get a list of accounts tags: - Hub options: description: CORS support operationId: accountOptions responses: "200": $ref: "#/responses/CORSResponse" tags: - cors post: description: Hub record to be added operationId: postHubs parameters: - $ref: "#/parameters/hubRequest" responses: "200": $ref: "#/responses/HubResponse" "401": $ref: "#/responses/Unauthorized" "403": $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] summary: Add a new account to Telnexus tags: - Hub put: description: Update Hubs operationId: putHub parameters: - $ref: "#/parameters/hubRequest" responses: "200": $ref: "#/responses/HubResponse" "401": $ref: "#/responses/Unauthorized" "403": $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" security: - ApiKeyAuth: [] summary: Update a single account tags: - Hub /users: get: summary: "Check API Key" operationId: "getUsers" description: "Checks for a valid API key, and returns full user record" parameters: - $ref: "#/parameters/apiKeyQuery" tags: - "User" responses: "200": $ref: "#/responses/UserResponse" "401": $ref: "#/responses/Unauthorized" "403": $ref: "#/responses/AccessForbidden" "404": $ref: "#/responses/NotFound" "422": $ref: "#/responses/UnprocessableEntity" "500": $ref: "#/responses/ServerError" definitions: DeleteResponse: properties: Data: items: $ref: "#/definitions/Message" type: array Meta: $ref: "#/definitions/ResponseMeta" type: object Hub: type: object properties: ID: type: string description: Record Id AccountID: type: string description: Account BillingContactID: type: string description: Billing Contact ContactID: type: string description: Contact CreatedById: type: string description: Created By CreatedDate: type: string description: Created Date CurrentUsers: type: number description: Current Users Name: type: string description: Hub Name MaxUsers: type: number description: Max Users OrderItem: type: string description: Order Item LastModifiedByID: type: string description: Last Modified By LastModifiedDate: type: string description: Last Modifed Date VendorID: type: string description: Vendor VendorTenantID: type: string description: Vendor Tenant ID Address: properties: City: description: City type: string Country: description: Country full name type: string CountryCode: description: Country Code type: string PostalCode: description: Postal Code type: string State: description: State full name type: string StateCode: description: State Code type: string Street: description: Street number and name type: string type: object Error: properties: Code: format: int32 type: integer Fields: type: string Message: type: string type: object Message: properties: message: type: string ref: type: string type: object ResponseMeta: properties: Contact: description: Microservice Contact Info type: string Copyright: description: Copyright Info type: string License: description: License Information and Restrictions type: string OperationID: description: Operation ID type: string RequestIP: description: Request IP Address type: string RequestType: description: Request Type type: string RequestURL: description: Request URL type: string ServerInfo: description: Data Server Info type: string ServerResponseTime: description: Data Server Response Time (ms) type: string ServerTimestamp: description: Backend Server Timestamp type: string TelnexusAccount: description: Taxnexus Account Number used for recording transactions type: string type: object HubRequest: description: An array of Hub objects properties: Data: items: $ref: "#/definitions/Hub" type: array type: object HubResponse: description: An array of Hub objects properties: Data: items: $ref: "#/definitions/Hub" type: array Meta: $ref: "#/definitions/ResponseMeta" type: object User: properties: AboutMe: description: About Me type: string AccountID: description: Account ID type: string Address: $ref: "#/definitions/Address" Alias: description: Alias type: string APIKey: description: API Key type: string Auth0UserID: description: Auth0 User Id type: string CommunityNickname: description: Nickname type: string CompanyName: description: Company Name type: string ContactID: description: Contact type: string CreatedByID: description: Created User ID type: string CreatedDate: description: Date Created type: string DelegatedApproverID: description: Delegated Approver type: string Department: description: Department type: string Division: description: Division type: string Email: description: Email address type: string EmployeeNumber: description: Employee Number type: string EndOfDay: description: Time day ends type: string Environment: description: Environment type: string Extension: description: Extension type: string FabricAPIKey: description: Fabric API Key type: string Fax: description: Fax type: string FirstName: description: The first name type: string ForecastEnabled: description: Allow Forecasting type: boolean FullPhotoURL: description: Full Photo URL type: string ID: description: Taxnexus ID type: string IsActive: description: Active type: boolean IsPortalEnabled: description: Is the user enabled for Communities? type: boolean IsProphilePhotoActive: description: Has Profile Photo type: boolean IsSystemControlled: type: boolean LastModifiedByID: description: Last Modified User ID type: string LastModifiedDate: description: Last Modified Date type: string LastLogin: description: Last login time type: string LastIP: description: IP address of last login type: string LoginCount: description: Number of times user has logged in type: number format: int64 LastName: description: The Last Name type: string ManagerID: description: Manager type: string MobilePhone: description: Mobile type: string Name: description: Name type: string OutOfOfficeMessage: description: Out of office message type: string Phone: description: Phone type: string PortalRole: description: Portal Role Level type: string ProfileID: description: Profile type: string ReceivesAdminInfoEmails: description: Admin Info Emails type: boolean ReceivesAdminEmails: description: Info Emails type: boolean SenderEmail: description: Email Sender Address type: string SenderName: description: Email Sender Name type: string Signature: description: Email Signature type: string SmallPhotoURL: description: Small Photo URL type: string StartOfDay: description: The time day starts type: string TelnexusAccount: description: Taxnexus Account type: string TenantID: description: Tenant ID associated with this user type: string TimeZone: description: Time Zone type: string Title: description: Title type: string Username: description: Username type: string UserRoleID: description: Role type: string UserType: description: User Type type: string UserRoles: items: $ref: "#/definitions/UserRole" type: array TenantUsers: items: $ref: "#/definitions/TenantUser" type: array type: object UserResponse: description: An array Taxnexus user objects properties: Data: items: $ref: "#/definitions/User" type: array Meta: $ref: "#/definitions/ResponseMeta" type: object UserRole: description: Relationship object that connects user to a role type: object properties: AccountID: description: Account Id type: string Auth0RoleID: description: Linked role ID type: string Auth0UserID: description: Auth0 User ID type: string CompanyName: description: Company Name type: string ContactID: description: Contact ID type: string RoleDescription: description: Role description type: string RoleID: description: The Role ID type: string RoleName: description: Role Name type: string TelnexusAccount: description: Taxnexus Account Number type: string UserEmail: description: User Email Address type: string UserFullName: description: User Full Name type: string UserID: description: The User ID type: string Username: description: Username type: string TenantUser: description: Relationship object that connects users to a tenant type: object properties: AccessLevel: description: The makeTenantUser access level for this User type: string Auth0UserID: description: Auth0 User ID type: string AccountID: description: Account ID type: string ContactID: description: Contact ID type: string CompanyName: description: Account Name type: string TelnexusAccount: description: Taxnexus Account type: string TenantActive: description: Tenant active? type: boolean TenantID: description: The Tenant ID type: string TenantName: description: Tenant Name type: string TenantStatus: description: Tenant Status type: string TenantType: description: Tenant type type: string TenantVersion: description: Tenant Version type: string Username: description: Username type: string UserEmail: description: User Email Address type: string UserFullName: description: User Full Name type: string UserID: description: The User ID type: string