openapi: 3.0.0 info: title: Border0 Audit Actions Policies API description: Border0 is an identity-aware Zero Trust network access platform for securing access to servers, databases, Kubernetes clusters, and internal web services. This REST API manages sockets (protected services), policies, connectors, organizations, identity providers, service accounts, sessions, and audit logs. version: '1.0' contact: name: Border0 Support email: support@border0.com url: https://docs.border0.com servers: - url: https://api.border0.com/api/v1 tags: - name: Policies paths: /policies/find: get: security: - Border0_Token: [] summary: find policies by a specific param parameters: - description: Name name: name in: query schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/serializer.Policy' '204': description: No Content content: application/json: schema: $ref: '#/components/schemas/serializer.Policy' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/v1.BaseErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/v1.BaseErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/v1.BaseErrorResponse' operationId: get_policies-find tags: - Policies /policies: get: security: - Border0_Token: [] summary: get policies paginated parameters: - description: Page name: page in: query schema: type: string - description: Page size name: page_size in: query schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/serializer.Policy' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/v1.BaseErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/v1.BaseErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/v1.BaseErrorResponse' operationId: get_policies tags: - Policies post: security: - Border0_Token: [] summary: Create a new policy and attach sockets to them responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/serializer.Policy' '204': description: No Content content: application/json: schema: $ref: '#/components/schemas/serializer.Policy' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/v1.BaseErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/v1.BaseErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/v1.BaseErrorResponse' operationId: post_policies tags: - Policies components: schemas: v1.BaseErrorResponse: type: object properties: error_message: type: string status_code: type: integer datatypes.JSONMap: type: object additionalProperties: true serializer.Policy: type: object properties: created_at: type: string deleted: type: boolean description: type: string id: type: string name: type: string org_id: type: string org_wide: type: boolean policy_data: $ref: '#/components/schemas/datatypes.JSONMap' socket_ids: type: array items: type: string securitySchemes: Border0_Token: type: apiKey name: Authorization in: header