Documentation ¶
Index ¶
Constants ¶
const ( BasePath = "/v1/reports" BasePathWithID = BasePath + "/:" + apiutil.IDKey )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func New ¶
func New(processor *processing.Processor) *Module
func (*Module) ReportGETHandler ¶
ReportGETHandler swagger:operation GET /api/v1/reports/{id} reportGet
Get one report with the given id.
--- tags: - reports produces: - application/json parameters: - name: id type: string description: ID of the report in: path required: true security: - OAuth2 Bearer: - read:reports responses: '200': description: The requested report. schema: "$ref": "#/definitions/report" '400': description: bad request '401': description: unauthorized '404': description: not found '406': description: not acceptable '500': description: internal server error
func (*Module) ReportPOSTHandler ¶
ReportPOSTHandler swagger:operation POST /api/v1/reports reportCreate
Create a new user report with the given parameters.
--- tags: - reports consumes: - application/json - application/xml - application/x-www-form-urlencoded produces: - application/json security: - OAuth2 Bearer: - write:reports responses: '200': description: The created report. schema: "$ref": "#/definitions/report" '400': description: bad request '401': description: unauthorized '404': description: not found '406': description: not acceptable '500': description: internal server error
func (*Module) ReportsGETHandler ¶
ReportsGETHandler swagger:operation GET /api/v1/reports reports
See reports created by the requesting account.
The reports will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer).
The next and previous queries can be parsed from the returned Link header.
Example:
``` <https://example.org/api/v1/reports?limit=20&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/reports?limit=20&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev" ````
--- tags: - reports produces: - application/json parameters: - name: resolved type: boolean description: >- If set to true, only resolved reports will be returned. If false, only unresolved reports will be returned. If unset, reports will not be filtered on their resolved status. in: query - name: target_account_id type: string description: Return only reports that target the given account id. in: query - name: max_id type: string description: >- Return only reports *OLDER* than the given max ID (for paging downwards). The report with the specified ID will not be included in the response. in: query - name: since_id type: string description: >- Return only reports *NEWER* than the given since ID. The report with the specified ID will not be included in the response. in: query - name: min_id type: string description: >- Return only reports immediately *NEWER* than the given min ID (for paging upwards). The report with the specified ID will not be included in the response. in: query - name: limit type: integer description: Number of reports to return. default: 20 minimum: 1 maximum: 100 in: query security: - OAuth2 Bearer: - read:reports responses: '200': name: reports description: Array of reports. schema: type: array items: "$ref": "#/definitions/report" headers: Link: type: string description: Links to the next and previous queries. '400': description: bad request '401': description: unauthorized '404': description: not found '406': description: not acceptable '500': description: internal server error