• Resolved fajra

    (@fajra)


    I am using job board theme. in my theme i installed rest api plugin.
    By using url i want to add a job,
    for example
    https://domain.com/api/get_nonce/?controller=user&method=create_job_post
    but i can’t add job to theme.

    i am added a new controller ” job” to do data manipulation methods for jobs such as post a job to json api plugin and added some functions to plugin.
    bt always showing a error such as,
    {“status”:”error”,”error”:”You need to login with a user that has ‘edit_jobs’ capacity.”}

    can you help me.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Ali Qureshi

    (@parorrey)

    Hi,

    That is your own code and nobody possibly know what’s going on there.

    Please note that JSON API plugin does not allow post creation in RESTful way. create_post endpoint only allows post creation if user is admin and logged in with session. it is not RESTful.

    Thread Starter fajra

    (@fajra)

    i have one doubt, is it possible to add action like add job to theme by using rest api plugin with the help of url.

    Plugin Author Ali Qureshi

    (@parorrey)

    Not until you make enough changes in code. JSON API create_post does not do that.

    JSON API User Plus plugin supports add, update, delete of post and cpt via rest endpoint. https://www.parorrey.com/solutions/json-api-user-plus/

    Thread Starter fajra

    (@fajra)

    Thank you

    Thread Starter fajra

    (@fajra)

    how to add new controller and a new method, such as controller POSTS and method create_post to json api plugin

    Plugin Author Ali Qureshi

    (@parorrey)

    Please check the JSON API plugin. and its controller directory.

    Thread Starter fajra

    (@fajra)

    I am added controller jobs and method create_job by replacing posts.php to job.php and added all function that had post method to jobs method.
    But an error is showing
    {“status”:”error”,”error”:”You need to login with a user that has ‘edit_jobs’ capacity.”}
    i am trying to add job like post.
    it is an urgent requirement, so please help me…

    Plugin Author Ali Qureshi

    (@parorrey)

    It wont work by just copying and renaming. First of all, it wont allow to create custom post type via REST call. Try to use create_post using REST and you will know it does not work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘job board’ is closed to new replies.