REST Api - adding reporter

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
acoder2020
Posts: 65
Joined: 11 Jan 2024, 19:32

REST Api - adding reporter

Post 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="
        }
    ]


}
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: REST Api - adding reporter

Post 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
Please use Search before posting and read the Manual
Post Reply