Page 1 of 1

REST Api - adding reporter

Posted: 06 Feb 2024, 22:25
by acoder2020
Do I need to know the specific reporter ID when adding that value via REST Api?

The handler appears to be a raw username, but I didn't find an example of how to add the reporter

Code: Select all

{
    "summary": "Sample REST issue",
    "description": "Description for sample REST issue.",
    "additional_information": "More info about the issue",
    "project": {
        "id": 1,
        "name": "mantisbt"
    },
    "category": {
        "id": 5,
        "name": "bugtracker"
    },
    "handler": {
        "name": "vboctor"
    },
    "view_state": {
        "id": 10,
        "name": "public"
    },
    "priority": {
        "name": "normal"
    },
    "severity": {
        "name": "trivial"
    },
    "reproducibility": {
        "name": "always"
    },
    "sticky": false,
    "custom_fields": [
        {
            "field": {
                "id": 4,
                "name": "The City"
            },
            "value": "Seattle"
        }
    ],
    "tags": [
        {
            "name": "mantishub"
        }
    ],
    "files": [
        {
            "name": "test.txt",
            "content": "VGhpcyBpcyBhIFRFU1QuDQpUaGlzIGlzIGEgVEVTVC4NClRoaXMgaXMgYSBURVNULg0KVGhpcyBpcyBhIFRFU1QuDQpUaGlzIGlzIGEgVEVTVC4="
        },
        {
            "name": "test2.txt",
            "content": "VGhpcyBpcyBhIFRFU1QuDQpUaGlzIGlzIGEgVEVTVC4NClRoaXMgaXMgYSBURVNULg0KVGhpcyBpcyBhIFRFU1QuDQpUaGlzIGlzIGEgVEVTVC4="
        }
    ]


}

Re: REST Api - adding reporter

Posted: 06 Feb 2024, 22:40
by atrol
Your REST request is authenticated by a token you provide.
This token was created by a user.
So the reporter of the issue you created will be the user that created the token.
If you want to act as another user, you can do this starting from version 2.26.0 by creating a token for a user, see
https://documenter.getpostman.com/view/ ... 2f88faa75e