Skip to content

Use of API Token #103

Closed Answered by grigoriev
schlami asked this question in Q&A
Jul 23, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi @schlami ,

it's possible with the just released PDF-exporter v5.5.4.

Example how to convert LiveDoc to PDF:

function fetchRestAPI(resource, options) {
    const polarionRestApiToken = top.getRestApiToken();
    if (options === undefined) {
        options = {};
    }
    if (options.headers === undefined) {
        options.headers = new Headers();
    }
    if (options.headers instanceof Headers) {
        options.headers.set("X-Polarion-REST-Token", polarionRestApiToken);
    } else {
        options.headers["X-Polarion-REST-Token"] = polarionRestApiToken;
    }
    return fetch(resource, options);
}

function createAndDownloadBlobFile(blob, fileName) {
    const url = window.URL.crea…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@grigoriev
Comment options

@schlami
Comment options

Answer selected by grigoriev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request configuration
2 participants