openapi: 3.0.2 info: title: BPS APIs description: BPS Customer Rest APIs. version: '2.0' x-definition-name: /bps/v2/customers termsOfService: '' contact: name: BPS url: '' email: _18f152@McAfee.com servers: - url: 'https://api.mvision.mcafee.com' paths: /bps/v2/customers: post: tags: - Customers summary: Create customer. description: > Create customer with the specified properties.\ **Note: CultureCode should be mentioned in proper case like en-US, ja-JP etc.,** operationId: bps.createCustomer x-scopes: - bps.tnt.c x-integration: type: http_proxy uris: dev: 'https://bpsapi-bps2.dev.mvision.mcafee.com/v2/customers' preprod: 'https://bpsapi.preprod.mvision.mcafee.com/v2/customers' prod: 'https://bpsapis.mcafee.com/v2/customers' responses: default: statusCode: '201' requestBody: description: A JSON object describing the customer to add. required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/customerRequest' responses: '201': description: Successful response with a JSON document describing the customer. content: application/vnd.api+json: schema: $ref: '#/components/schemas/getCustomerResponse' '400': $ref: '#/components/responses/resp400' '401': $ref: '#/components/responses/resp401' '404': $ref: '#/components/responses/resp404' '500': $ref: '#/components/responses/resp500' security: - OktaCustomAuthorizer: [] get: summary: Return details of all customers for a partner description: Return details of all customers for a partner operationId: bps.getCustomers tags: - Customers x-scopes: - bps.tnt.r x-integration: type: http_proxy uris: dev: 'https://bpsapi-bps2.dev.mvision.mcafee.com/v2/customers' preprod: 'https://bpsapi.preprod.mvision.mcafee.com/v2/customers' prod: 'https://bpsapis.mcafee.com/v2/customers' responses: default: statusCode: '200' parameters: - $ref: '#/components/parameters/customerFilter' - $ref: '#/components/parameters/customerSort' - $ref: '#/components/parameters/pageOffsetParam' - $ref: '#/components/parameters/pageLimitParam' responses: '200': description: >- Successful response with a JSON document listing the details of customers of the partner. content: application/vnd.api+json: schema: $ref: '#/components/schemas/getCustomerListResponse' '400': $ref: '#/components/responses/resp400' '401': $ref: '#/components/responses/resp401' '404': $ref: '#/components/responses/resp404' '500': $ref: '#/components/responses/resp500' security: - OktaCustomAuthorizer: [] '/bps/v2/customers/{id}': get: summary: 'Return the details of a particular customer specified in {id}.' description: 'Return the details of a particular customer specified in {id}.' operationId: bps.getCustomer tags: - Customers x-scopes: - bps.tnt.r x-integration: type: http_proxy requestParameters: integration.request.path.id: method.request.path.id uris: dev: 'https://bpsapi-bps2.dev.mvision.mcafee.com/v2/customers/{id}' preprod: 'https://bpsapi.preprod.mvision.mcafee.com/v2/customers/{id}' prod: 'https://bpsapis.mcafee.com/v2/customers/{id}' responses: default: statusCode: '200' parameters: - name: id in: path description: A GUID-format unique ID to identify a customer. required: true schema: type: string responses: '200': description: >- Successful response with a JSON document describing the customer details. content: application/vnd.api+json: schema: $ref: '#/components/schemas/getCustomerResponse' '400': $ref: '#/components/responses/resp400' '401': $ref: '#/components/responses/resp401' '404': $ref: '#/components/responses/resp404' '500': $ref: '#/components/responses/resp500' security: - OktaCustomAuthorizer: [] patch: summary: >- Update the details of a particular customer specified in {id} if it exists. description: >- Update the details of a particular tenant specified in {id} if it exists.\ **Note: CultureCode should be in proper case like en-US, ja-JP etc.,** operationId: bps.updateCustomer tags: - Customers x-scopes: - bps.tnt.u x-integration: type: http_proxy requestParameters: integration.request.path.id: method.request.path.id uris: dev: 'https://bpsapi-bps2.dev.mvision.mcafee.com/v2/customers/{id}' preprod: 'https://bpsapi.preprod.mvision.mcafee.com/v2/customers/{id}' prod: 'https://bpsapis.mcafee.com/v2/customers/{id}' responses: default: statusCode: '200' requestBody: description: A JSON object describing the customer to update. required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/customerRequest' parameters: - name: id in: path description: A GUID-format unique tenant ID to identify a customer. required: true schema: type: string responses: '200': description: Successful response with a JSON document describing the customer. content: application/vnd.api+json: schema: $ref: '#/components/schemas/getCustomerResponse' '400': $ref: '#/components/responses/resp400' '401': $ref: '#/components/responses/resp401' '404': $ref: '#/components/responses/resp404' '500': $ref: '#/components/responses/resp500' security: - OktaCustomAuthorizer: [] components: parameters: customerFilter: name: filter in: query description: >- The filter query parameter can be used to return items based on a specified criteria. There are 2 forms in which this can be used. * Using a JSON filter expression, which can be used on this page with the **Try it out** feature * Such as: * **{ "attributeName": value }** * It also allows for complex expressions such as: * **{ "OR": {"attribute1": value1}, {"attribute2": value2}}** * Valid operators include: * EQ, NEQ, GT, GE, LT, LE * AND, OR, NOT * Using a basic expression, which can **not** be used on this page using the **Try it out** feature * Such as: * filter**[attributeName]=value** * multiple filter parameter can be chained together and are treated as ANDs, for example: * filter[attributeName]=value**&**filter[attribute2]=value2 * Valid operators include: * filter[attributeName][EQ]=value * filter[attributeName][NEQ]=value * filter[attributeName][GT]=value * filter[attributeName][GE]=value * filter[attributeName][LT]=value * filter[attributeName][LE]=value Filterable attributes: firstName, lastName, companyName, accountNumber, customerReferenceNumber and tenantId required: false explode: true schema: type: string properties: AND: type: object NOT: type: object OR: type: object examples: FilterNone: $ref: '#/components/examples/FilterNone' FilterById: $ref: '#/components/examples/FilterById' FilterByIdUsingEQ: $ref: '#/components/examples/FilterByIdUsingEQ' FilterByIdMultipleValues: $ref: '#/components/examples/FilterByIdMultipleValues' FilterUsingAnd: $ref: '#/components/examples/FilterUsingAnd' FilterUsingOr: $ref: '#/components/examples/FilterUsingOr' customerSort: name: sort in: query description: >- The sort query parameter orders the returned as per the sort order of the specified attribute name. Multiple attribute name may be provided command delimited. Also, the sort order is with the use of a hyphen prefix.Example ?sort=-a,b sort results descending a, ascending b required: false style: form explode: false schema: type: array items: type: string enum: - firstName - '-firstName' - lastName - '-lastName' - companyName - '-companyName' pageLimitParam: name: 'page[size]' in: query description: >- An integer specifying the maximum number of items to return in the response. required: false schema: type: integer format: int32 default: 10 pageOffsetParam: name: 'page[number]' in: query description: >- An integer specifying about the page number to return the result in the response. required: false schema: type: integer format: int32 default: 0 schemas: error: properties: message: type: string getCustomerResponse: title: GetCustomerResponse type: object properties: links: properties: self: type: string data: type: object required: - id - type - attributes properties: id: type: string type: type: string enum: - customers attributes: type: object required: - firstName - lastName - companyName - email - phoneNumber - customerReferenceNumber - cultureCode - manageSecurity - tenantId - billingAddress properties: firstName: type: string description: Customer First Name. lastName: type: string description: Customer Last Name. companyName: type: string description: Customer Company Name. email: type: string description: Customer Owner User EmailAddress. phoneNumber: type: string description: Customer Phone Number. accountNumber: type: string description: Account Number. customerReferenceNumber: type: string description: Customer Reference Number. cultureCode: type: string description: Customer Culture Code. manageSecurity: type: boolean description: Is the customer customer managed by partner or not. tenantId: type: string description: Customer tenantId. billingAddress: type: object description: Billing address of the customer properties: addressLine1: type: string description: Address Line1 addressLine2: type: string description: Address Line2 city: type: string description: City state: type: string description: State postalCode: type: string description: Postal Code countryCode: type: string description: Country Code relationships: properties: partner: properties: links: properties: self: type: string related: type: string links: properties: self: type: string getCustomerListResponse: title: GetCustomerListResponse type: object required: - data properties: links: properties: self: type: string first: type: string last: type: string meta: type: object properties: totalResources: type: integer format: int32 data: type: array items: type: object required: - id - type - attributes properties: id: type: string type: type: string enum: - customers attributes: type: object required: - firstName - lastName - companyName - email - phoneNumber - customerReferenceNumber - cultureCode - tenantId - billingAddress properties: firstName: type: string description: Customer First Name. lastName: type: string description: Customer Last Name. companyName: type: string description: Customer Company Name. email: type: string description: Customer Owner User EmailAddress. phoneNumber: type: string description: Customer Phone Number. accountNumber: type: string description: Account Number. customerReferenceNumber: type: string description: Customer Reference Number. cultureCode: type: string description: Customer Culture Code. manageSecurity: type: boolean description: Is the customer customer managed by partner or not. tenantId: type: string description: Customer tenantId. billingAddress: type: object description: Billing address of the customer properties: addressLine1: type: string description: Address Line1 addressLine2: type: string description: Address Line2 city: type: string description: City state: type: string description: State postalCode: type: string description: Postal Code countryCode: type: string description: Country Code relationships: properties: partner: properties: links: properties: self: type: string related: type: string links: properties: self: type: string customerRequest: type: object required: - data properties: data: type: object required: - type - attributes properties: id: type: string type: type: string enum: - customers attributes: type: object required: - firstName - lastName - companyName - email - phoneNumber - customerReferenceNumber - cultureCode - billingAddress - manageSecurity properties: firstName: type: string description: Customer First Name. lastName: type: string description: Customer Last Name. companyName: type: string description: Customer Company Name. email: type: string description: Customer Owner User EmailAddress. phoneNumber: type: string description: Customer Phone Number. customerReferenceNumber: type: string description: Customer Reference Number. cultureCode: type: string description: Customer Culture Code. manageSecurity: type: boolean description: Is the customer customer managed by partner or not. billingAddress: type: object description: Billing address of the customer properties: addressLine1: type: string description: Address Line1 addressLine2: type: string description: Address Line2 city: type: string description: City state: type: string description: State postalCode: type: string description: Postal Code countryCode: type: string description: Country Code responses: resp400: description: Bad request. The request parameters or format might be invalid. content: application/json: schema: $ref: '#/components/schemas/error' resp401: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/error' resp404: description: Not found content: application/json: schema: $ref: '#/components/schemas/error' resp500: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/error' examples: FilterNone: summary: No filter FilterById: summary: 'Filter By ID, please check schema for value type' value: '{"id": value}' FilterByIdUsingEQ: summary: 'Filter By ID using EQ, please check schema for value type' value: '{"EQ":{"id" : value}}' FilterByIdMultipleValues: summary: 'Filter By ID using multiple values, please check schema for value type' value: '{"id": [value1, value2, value3]}' FilterUsingAnd: summary: Filter Using AND value: '{"AND":{"GE":{"attribute1":"value1"},"LE":{"attribute2":"value2"}}}' FilterUsingOr: summary: Filter Using OR value: '{"OR":{"attribute1": "value1"}, {"attribute2":"value2"}}' securitySchemes: OktaCustomAuthorizer: type: apiKey name: Authorization in: header x-amazon-apigateway-authtype: custom x-amazon-apigateway-authorizer: authorizerResultTtlInSeconds: 300 authorizerUri: >- arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:307653271100:function:mvision-api-prod-apigateway-AuthorizerFunction/invocations type: request identitySource: method.request.header.Authorization api_key: type: apiKey name: x-api-key in: header