ServiceNow Scripted REST APIs: Part 8 - POST

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 5

  • @alessandropennacchia1402
    @alessandropennacchia1402 3 місяці тому

    Hi,
    Thank you for sharing these videos on Scripted REST API in ServiceNow, the entire playlist is brilliant!
    I was creating a similar POST request with an app I developed in ServiceNow and I was wondering if there is a way to handle business rules output in the rest script.
    Essentially, I don't want to allow users to create a record if the mandatory fields in the table are not filled out and, as of now, I just have a business rule set up to perform this check.
    Would you know if there are any best practices to implement input controls for the scripted API in ServiceNow?

    • @RoyaleRetro
      @RoyaleRetro 2 місяці тому

      Why handling business rules in rest script while you can handle rest script in business rules 😆

  • @ArayaPSR
    @ArayaPSR Рік тому

    Thank you for the video! Would this also work if you want to post to an API endpoint outside of Servicenow? Or would that work differently?

    • @secretaryofsimplification
      @secretaryofsimplification  Рік тому

      In this video we are creating the API to accept incoming requests. I think what you are asking about is posting to an external API. In that case, you need to refer to the documentation for that API to understand the requirements for the request. What format(s) is permitted (JSON, XML)? What parameters must be included? Etc. If you want to create a GET/POST/etc. request from ServiceNow to an external API, you need to build the request under System Web Services > Outbound > REST Message. Hope this helps.

  • @pb-fl4te
    @pb-fl4te 2 місяці тому

    This scripted rest API out how to use in flow design and test