openapi: 3.1.0 info: title: PDCP agents API version: '1.0' summary: ProjectDiscovery Cloud Platform description: For more details, checkout https://docs.projectdiscovery.io/api-reference/editor/scan servers: - url: https://api.projectdiscovery.io description: Production - url: https://api.dev.projectdiscovery.io description: Development - url: http://localhost:8085 description: Localhost security: - X-API-Key: [] tags: - name: agents paths: /v1/agents/in: post: summary: Register Agents tags: - agents operationId: post-v1-agents-in parameters: - schema: type: string in: query name: os description: Operating system - schema: type: string in: query name: arch description: Architecture - schema: type: string in: query name: id description: Agent ID - schema: type: string in: query name: name description: Agent name - schema: type: string in: query name: tags description: Comma-separated tags - schema: type: string in: query name: networks description: Comma-separated networks - schema: type: string in: query name: network_subnets description: Comma-separated network subnets - schema: type: string enum: - agent - tunnel in: query name: type description: Agent type (agent or tunnel) - schema: type: string in: header name: x-api-key description: API key security: - X-API-Key: [] responses: '200': description: OK content: application/json: schema: type: object properties: message: type: string '404': description: Not Found content: application/json: schema: type: object properties: error: type: string /v1/agents/out: post: summary: Deregister Agent tags: - agents operationId: post-v1-agents-out parameters: - schema: type: string in: query name: id description: Agent ID - schema: type: string in: header name: x-api-key description: API key security: - X-API-Key: [] responses: '200': description: OK content: application/json: schema: type: object properties: message: type: string '404': description: Not Found content: application/json: schema: type: object properties: error: type: string /v1/agents: get: summary: Get Agents tags: - agents operationId: get-v1-agents parameters: - schema: type: string in: header name: x-api-key description: API key security: - X-API-Key: [] responses: '200': description: OK content: application/json: schema: type: object properties: agents: $ref: '#/components/schemas/Agents' message: type: string '400': $ref: '#/components/responses/ErrorResponse' '401': $ref: '#/components/responses/ErrorResponse' '404': $ref: '#/components/responses/ErrorResponse' '500': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' patch: summary: Bulk Update Agents tags: - agents operationId: patch-v1-agents parameters: - schema: type: string in: header name: x-api-key description: API key requestBody: required: true content: application/json: schema: type: array items: type: object required: - id properties: id: type: string description: Agent ID name: type: string description: Agent name tags: type: array items: type: string description: Tags networks: type: array items: type: string description: Networks network_subnets: type: array items: type: string description: Network subnets security: - X-API-Key: [] responses: '200': description: OK content: application/json: schema: type: object properties: message: type: string '400': description: Bad Request content: application/json: schema: type: object properties: error: type: string '404': description: Not Found content: application/json: schema: type: object properties: error: type: string /v1/agents/{id}: parameters: - schema: type: string name: id in: path required: true get: summary: Get Agent by ID tags: - agents operationId: get-v1-agents-id parameters: - schema: type: string in: header name: x-api-key description: API key security: - X-API-Key: [] responses: '200': description: OK content: application/json: schema: type: object properties: agent: $ref: '#/components/schemas/AgentItem' '404': description: Not Found content: application/json: schema: type: object properties: error: type: string post: summary: Update Agent tags: - agents operationId: post-v1-agents-id parameters: - schema: type: string in: header name: x-api-key description: API key requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: Agent name tags: type: array items: type: string description: Tags networks: type: array items: type: string description: Networks network_subnets: type: array items: type: string description: Network subnets security: - X-API-Key: [] responses: '200': description: OK content: application/json: schema: type: object properties: message: type: string '400': description: Bad Request content: application/json: schema: type: object properties: error: type: string '404': description: Not Found content: application/json: schema: type: object properties: error: type: string components: responses: ErrorResponse: description: Example response content: application/json: schema: type: object required: - message properties: message: type: string kind: type: string code: type: string error: type: string error_id: type: string param: type: string status: type: integer schemas: AgentItem: title: AgentItem type: object required: - name - os - arch - tunnel_ip - tunnel_port - client_ip - username - token - id - status - type properties: name: type: string os: type: string arch: type: string tunnel_ip: type: string tunnel_port: type: string client_ip: type: string username: type: string token: type: string id: type: string last_update: type: string status: type: string tags: type: array items: type: string networks: type: array items: type: string network_subnets: type: array items: type: string type: type: string Agents: title: Agents type: array items: $ref: '#/components/schemas/AgentItem' securitySchemes: X-API-Key: name: X-API-Key type: apiKey in: header x-internal: false