Manage reports for embedded editor

These endpoints allow you to create, delete and manage access to reports. They can be used together with embedded editor when report data is stored on PantherPDF database. You can programatically create new report for each new user that signs to your app.

Report data is not documented because it is considered an implementation detail and can change without any notice.


Get list of reports

Returns list of all reports.

GET /v1/reports HTTP/1.1

If successful, returns status code 200 OK and array with objects with the following attributes:

Attribute Type Description
id string Report ID.
name string Report name.
time string Date and time when report was last changed (ISO 8601).
secret string undefined

Example request:

curl --header "Authorization: Bearer <your-token>" \ --url "https://api.pantherpdf.com/v1/reports"

Example response:

[ { "id": "018cb9ec-6d6e-7708-8e8b-da56bb451728", "name": "Invoice", "time": "NS5nfD6OQxyFtrV55iOuWfeMCASZYrFNYq0Jtq0Jtq0" }, { "id": "018ccad9-4f0b-7a44-b7ef-fb951d19597e", "name": "Bill of materials", "time": "NS5nfD6OQxyFtrV55iOuWfeMCASZYrFNYq0Jtq0Jtq0" }, { "id": "018ccad9-7f39-7aa6-b356-6de3cd519625", "name": "Order confirmation", "time": "NS5nfD6OQxyFtrV55iOuWfeMCASZYrFNYq0Jtq0Jtq0", "secret": "3GNwXRftVtCzDu86oVSjSUC6v2eyQBL4D3orkTy4pz7FBvChzI" } ]

New report

Creates a new report and returns it's ID and secret. You can optionally specify copyReportId and API will create a copy of it. Name will be overwritten.

POST /v1/reports HTTP/1.1

Payload attributes:

Attribute Type Required Description
name string Yes Name of the new report
copyReportId string No ID of a report to copy
generateSecret boolean No Should generate reportSecret? Default false.

If successful, returns status code 200 OK and the following response attributes:

Attribute Type Description
reportId string Newly created report ID.
reportSecret string Newly created report secret. Present only when generateSecret is true.

Example request:

curl --request POST \ --header "Authorization: Bearer <your-token>" \ --header "Content-Type: application/json" \ --data '{ "name": "Invoice ACME Corp.", "copyReportId": "018cb9ec-06c5-7b34-ba58-5f490e88cad0", "generateSecret": true }' \ --url "https://api.pantherpdf.com/v1/reports"

Example response:

{ "reportId": "018cb9ec-6d6e-7708-8e8b-da56bb451728", "reportSecret": "NS5nfD6OQxyFtrV55iOuWfeMCASZYrFNYq0Jtq0Jtq0" }

Delete a report

Creates a new report and returns it ID and report secret.

DELETE /v1/reports/:reportId HTTP/1.1

Path attributes:

Attribute Type Required Description
reportId string Yes ID of a report to delete.

Example request:

curl --request DELETE \ --header "PRIVATE-TOKEN: <your_access_token>" \ --url "https://gitlab.example.com/api/v4/endpoint?parameters"

If successful, returns 204 No Content and no payload.


Update report's secret

Creates a new secret and returns it. Old report secret is invalidated.

POST /v1/reports/:reportId/secret HTTP/1.1

Path attributes:

Attribute Type Required Description
reportId string Yes ID of a report to update secret.

If successful, returns status code 200 OK and the following response attributes:

Attribute Type Description
reportId string ID of a report that was changed.
reportSecret string Newly created report secret.

Example request:

curl --request POST \ --header "Authorization: Bearer <your-token>" \ --url "https://api.pantherpdf.com/v1/reports/018cb9ec-6d6e-7708-8e8b-da56bb451728/secret"

Example response:

{ "reportId": "018cb9ec-6d6e-7708-8e8b-da56bb451728", "reportSecret": "ynx7xnKf3GDSO7smVPka0ukKkvwDAXgwtlnGCsC1ixR" }

Delete report's secret

Invalidate report secret. No new secret is set.

DELETE /v1/reports/:reportId/secret HTTP/1.1

Path attributes:

Attribute Type Required Description
reportId string Yes ID of a report to remove secret.

If successful, returns 204 No Content and no payload.

Example request:

curl --request DELETE \ --header "Authorization: Bearer <your-token>" \ --url "https://api.pantherpdf.com/v1/reports/018cb9ec-6d6e-7708-8e8b-da56bb451728/secret"