• Resolved Salomon

    (@scajina)


    I’m having trouble utilizing the REST Api feature of the plugin.

    Plugin version: Version 3.3.100

    WordPress Version: 6.5.5

    PHP Version: 8.0

    Whenever I try to access a specific endpoint I always get

    {
    "code": "rest_forbidden",
    "message": "Sorry, you are not allowed to do that.",
    "data": {
    "status": 403
    }
    }

    For example if I try the base url I do see the endpoints listed, but I can’t seem to access them despite being logged in and being an admin.

    {
    "namespace": "zephyr_project_manager/v1",
    "routes": {
    "/zephyr_project_manager/v1": {
    "namespace": "zephyr_project_manager/v1",
    "methods": [
    "GET"
    ],
    "endpoints": [
    {
    "methods": [
    "GET"
    ],
    "args": {
    "namespace": {
    "default": "zephyr_project_manager/v1",
    "required": false
    },
    "context": {
    "default": "view",
    "required": false
    }
    }
    }
    ],
    "_links": {
    "self": [
    {
    "href": "{Removed}/wp-json/zephyr_project_manager/v1"
    }
    ]
    }
    },
    "/zephyr_project_manager/v1/tasks": {
    "namespace": "zephyr_project_manager/v1",
    "methods": [
    "GET",
    "POST"
    ],
    "endpoints": [
    {
    "methods": [
    "GET",
    "POST"
    ],
    "args": []
    }
    ],
    "_links": {
    "self": [
    {
    "href": "{Removed}/wp-json/zephyr_project_manager/v1/tasks"
    }
    ]
    }
    },
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Salomon

    (@scajina)

    I figured out that there was an authentication checkbox in the settings. I disabled that and was able to view the API result. I’m not sure how the authentication piece works if the box is checked?

    Now that I can see the API, I’m trying to figure out how to view subtasks. It seems I’m only able to view the parent task of the subtasks.

    https://imgur.com/a/2jIwt64

    Plugin Author Dylan James

    (@dylanjkotze)

    Hi @scajina ,

    Thanks for getting in touch.

    You can fetch subtasks via the /wp-json/zephyr_project_manager/v1/tasks/subtasks endpoint, passing in the ‘id’ of the parent task.

    Regarding the authorization with the box unchecked, this is done via the WP Application Passwords feature. You can find the integration guide for it here: https://make.www.ads-software.com/core/2020/11/05/application-passwords-integration-guide/

    Essentially, you need to pass in the username and application password with the request.

    Please let me know if this helps and if I can assist further. I’d be happy to help.

    Kindest regards,

    Dylan

    Thread Starter Salomon

    (@scajina)

    Thanks sir for the support that resolved the issue for me. I appreciate helping me understand better the process. I was able to go back and enable authentication and test with Postman sending the application password and also pass the parent ID and get the subtasks correctly.

    Last thing is, is there a future enhancement possible to show the assignees in a First Name Last Name format? Selecting them from a username format is challenging to decipher some of our users haha.

    Plugin Author Dylan James

    (@dylanjkotze)

    Hi Salomon,

    Glad to hear that and I am happy to help ??

    The plugin currently uses the Display Name of the user. There isn’t an option at the moment to set it to display First Name + Last Name, but this is a feature I will add in the next update.

    However, you can set the display name to the First Name + Last Name from the users page if that might be helpful in the meantime.

    If you need this feature immediately, please send me a message via email and I’ll add this and send you the updated version.

    I hope this helps.

    Best regards,

    Dylan

    Thread Starter Salomon

    (@scajina)

    It does, thanks for the support Dylan!

    Plugin Author Dylan James

    (@dylanjkotze)

    Awesome, that’s great to hear ??

    All the best of luck with your projects!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.