error 404 by using xray rest test repository api while creating a folder

Bruno Bernadet February 10, 2022

hello i try to use xray api under postmann
I use an api token for authentification. My user has the right to create under Jira and the project SCRUM exist with xray enable

i've got this message as result :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<status>
    <status-code>404</status-code>
</status>
i try to search on the forum but i dont find a suitable answer. What can i check to find the issue ?
thanks

 

1 answer

0 votes
Bruno Bernadet February 15, 2022

i seek on the community group and i find that some errors could occur because of the authentification. i try to fix it on postmann but i dont find the correct way. i use api token and i see that a lot of users use mail: api encoded on base64 on the header . i a  a noob with postman so i dont see how in the api how to settle this 

so -what i have to choose in authorization : Api key or bearer token?

- have i to modify the body of the pre request script ?

    method: 'POST',
    header: {
        'content-type''application/json',
        client_id: pm.environment.get("client_id"),
        client_secret: pm.environment.get("client_secret"
    },
    body: {
        mode: 'raw',
        raw: JSON.stringify({ client_id: pm.environment.get("client_id"), client_secret: pm.environment.get("client_secret") })
    }
}, function (errres) {
    pm.environment.set("AUTH_TOKEN"res.json());
});

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events