openapi: 3.0.3 info: description: You can use Admin API to create and manage your Human API users version: 1.0.0 title: admin reports API termsOfService: https://www.humanapi.co/developer-terms contact: email: help@humanapi.co url: https://www.humanapi.co/contact servers: - url: https://admin.humanapi.co description: Production server security: - bearerAuth: [] tags: - name: reports paths: /api/v1/user/reports: get: tags: - reports description: Fetch users available reports operationId: getUserReports parameters: - $ref: '#/components/parameters/humanIdQueryOptional' - $ref: '#/components/parameters/clientUserIdQueryOptional' - name: createdByOrderId in: query description: Optional orderId filter schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/userReports' examples: userReports: $ref: '#/components/examples/userReports' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/notFound' /api/v1/user/reports/{reportId}: get: tags: - reports description: Fetch user report content operationId: getReportById parameters: - name: reportId in: path description: The unique identifier of the report required: true schema: type: string responses: '200': description: OK content: application/pdf: schema: type: string format: binary application/json: schema: type: string format: json text/html: schema: type: string format: html '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/notFound' components: schemas: individualReportInfo: type: object properties: fileExtension: type: string id: type: string uri: type: string createdAt: format: date-time type: string createdByOrderId: type: string nullable: true orderIds: type: array items: type: string providerIds: type: array items: type: string clientProviderIds: type: array items: type: string combinedReportGroup: type: object properties: name: type: string enum: - combined baseReportNames: type: array items: type: string reports: type: array items: $ref: '#/components/schemas/combinedReportInfo' combinedReportInfo: type: object properties: fileExtension: type: string id: type: string uri: type: string createdAt: format: date-time type: string createdByOrderId: type: string nullable: true orderIds: type: array items: type: string providerIds: type: array items: type: string clientProviderIds: type: array items: type: string groupBy: type: string enum: - user_id userReports: type: object additionalProperties: false oneOf: - $ref: '#/components/schemas/individualReportGroup' - $ref: '#/components/schemas/combinedReportGroup' error: type: object required: - statusCode - error - message - x-humanapi-request-id properties: code: type: integer format: int32 error: type: string message: type: string x-humanapi-request-id: type: string individualReportGroup: type: object properties: name: type: string reports: type: array items: $ref: '#/components/schemas/individualReportInfo' parameters: humanIdQueryOptional: name: humanId in: query description: The humanId of the user required: false schema: type: string clientUserIdQueryOptional: name: clientUserId in: query description: The clientUserId that the subscription is listening to required: false schema: type: string responses: notFound: description: The specified resource was not found (e.g. the id does not exist) content: application/json: schema: $ref: '#/components/schemas/error' example: code: 404 error: Not Found message: Not Found x-humanapi-request-id: 05518ca2-1c9a-434e-8512-7284bbc54137 unauthorized: description: The token provided is invalid. It may have expired or may have been revoked. content: application/json: schema: $ref: '#/components/schemas/error' example: code: 401 error: Unauthorized message: Cannot authenticate you with this token x-humanapi-request-id: 05518ca2-1c9a-434e-8512-7284bbc54137 examples: userReports: value: - name: apidata reports: - fileExtension: json id: '0001' uri: createdAt: '2022-08-11T17:23:22.095Z' - name: highlights reports: - fileExtension: pdf id: '0002' uri: createdAt: '2022-08-11T17:23:22.095Z' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT x-readme: explorer-enabled: true proxy-enabled: true