openapi: 3.1.0 info: title: Pact Broker API description: >- The Pact Broker is a RESTful application for sharing consumer-driven contracts (pacts) between consumer and provider teams, and for publishing and querying verification results. Authentication, when enabled, is typically HTTP Basic. version: "1.0.0" contact: name: Pact url: https://docs.pact.io/pact_broker servers: - url: https://pact-broker.example.com description: Self-hosted Pact Broker security: - basicAuth: [] tags: - name: Index - name: Pacts - name: Pacticipants - name: Verifications - name: Webhooks paths: /: get: tags: [Index] summary: API index (HAL) operationId: getIndex responses: '200': description: HAL index with links to all resources /pacts/provider/{provider}/consumer/{consumer}/version/{version}: put: tags: [Pacts] summary: Publish a pact for a consumer version operationId: publishPact parameters: - in: path name: provider required: true schema: type: string - in: path name: consumer required: true schema: type: string - in: path name: version required: true schema: type: string requestBody: required: true content: application/json: schema: type: object responses: '200': description: Pact published '201': description: Pact created /pacts/provider/{provider}/consumer/{consumer}/latest: get: tags: [Pacts] summary: Get the latest pact between a consumer and provider operationId: getLatestPact parameters: - in: path name: provider required: true schema: type: string - in: path name: consumer required: true schema: type: string responses: '200': description: Latest pact /pacticipants: get: tags: [Pacticipants] summary: List pacticipants (applications) operationId: listPacticipants responses: '200': description: A list of pacticipants /pacticipants/{name}: get: tags: [Pacticipants] summary: Get a pacticipant by name operationId: getPacticipant parameters: - in: path name: name required: true schema: type: string responses: '200': description: A pacticipant post: tags: [Pacticipants] summary: Create or update a pacticipant operationId: createOrUpdatePacticipant parameters: - in: path name: name required: true schema: type: string requestBody: required: true content: application/json: schema: type: object responses: '200': description: Pacticipant created or updated /pacticipants/{name}/versions/{version}: get: tags: [Pacticipants] summary: Get a specific version of a pacticipant operationId: getPacticipantVersion parameters: - in: path name: name required: true schema: type: string - in: path name: version required: true schema: type: string responses: '200': description: A pacticipant version /verification-results: get: tags: [Verifications] summary: List verification results operationId: listVerificationResults responses: '200': description: A list of verification results post: tags: [Verifications] summary: Publish a verification result operationId: publishVerificationResult requestBody: required: true content: application/json: schema: type: object responses: '201': description: Verification result published /webhooks: get: tags: [Webhooks] summary: List webhooks operationId: listWebhooks responses: '200': description: A list of webhooks post: tags: [Webhooks] summary: Create a webhook operationId: createWebhook requestBody: required: true content: application/json: schema: type: object responses: '201': description: Webhook created components: securitySchemes: basicAuth: type: http scheme: basic description: HTTP Basic authentication (when the broker is configured for it)