Announcement

Collapse
No announcement yet.

Create a new function for api

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Create a new function for api

    Hi, I need to know how can I create a new function for api
    for Example: http://localhost/api/v1/AccountOpening/{id} -> here id by default
    i need to create a new function to take the name of account opening rather than id to by like that http://localhost/api/v1/AccountOpening/{account-name}

    So, which file should i use it to add a new function

    and is there anyway to see all routes in espocrm or not
    Thanks in advanced

  • #2
    Hello

    All existing routes you could find in file data/cache/application/routes.php

    application/Espo/Modules/Crm/Resources/routes.json - an example of implementation

    You could add your routes custom/Espo/Custom/Resources/routes.json (don't forget to Clear Cache)
    custom/Espo/Custom/Controllers/{EntityName}.php - there have to be added a logical part (read other action for examples)

    Comment


    • #3
      Thanks for you help

      Comment

      Working...
      X