How to define a menu with and without url arguments in hook_menu? $items['jobs/%'] = array(
    'page callback' =&gt; 'custom_changes_jobs_interface_create_update',
    'access callback' =&gt; TRUE,
    'page arguments' =&gt; array(1),
  );


I need to use jobs for POST request and jobs/% for put and delete request where the argument would be string but if its not passed I want to make sure it works.
You have two options:

1) Define both paths, jobs and jobs/%.

2) Define only the first path

$menu['jobs'] = array(
  'page callback' =&gt; 'my_page_callback',
  ...


Then make the argument optional:

function my_page_callback($job_id = FALSE) {
  ...   


This callback will be called for both paths.