52
Views
3
Comments
Solved
How to use the Users API outside of the platform (e.g. through an Azure pipeline)
Question

I'm trying to call the Users API externally (through an Azure pipeline). I am not able to find the proper URL endpoint. On this page it's not listed: https://success.outsystems.com/documentation/11/reference/outsystems_apis/users_api
In Service Center I also don't see any URLs in the Integrations tab of the Users module. The AI generated response to my question was simply to use http://<environmentname>/Users, but this does not work; I don't get a valid response using http (not allowed on our network) and with https I just get a regular response without any of the specific information requested.

What is the proper URL endpoint to call the Users API? And are any further actions are required to make use of it, e.g. making it exposable somehow in Service Studio? Also, if anyone has any experience with specific syntax for calling the API with cURL through bash or Invoke-WebRequest through PowerShell (or any other method), I would be glad to hear about it as well.

Thanks in advance for any help offered.

2023-05-30 10-05-13
Lourenço Matalonga
Solution

Hi Roderick ,


To use the Users API from OutSystems outside of the platform, such as through an Azure pipeline, and to address the issues you're encountering, follow these steps:

 

1. Verify API Exposure:

   - First, ensure that the Users API or the specific endpoints you wish to use are indeed exposed as REST or SOAP web services in OutSystems. By default, OutSystems has system entities and functions that are accessible within the platform, but for external access, specific APIs need to be exposed intentionally.

 

2. Create or Expose the API:

   - If the Users API isn't exposed by default, you may need to create a custom REST API in Service Studio that wraps the desired functionality. This involves using the Users entity and logic in OutSystems to create endpoints that perform the operations you need (e.g., retrieving user information, creating users, etc.).

   - To expose a REST API, go to the Logic tab in Service Studio, right-click on REST or SOAP, and choose 'Expose REST API'. Define your methods and link them to server actions that interact with the Users entity.

 

3. Find the API URL:

   - Once your API is exposed, you can find the URL endpoint in Service Center under the Integrations tab for your application. The URL typically follows this format: `https://<environment_name>.outsystemscloud.com/<ModuleName>/rest/<APIName>/<Method>`

   - If you’re not seeing URLs, ensure the module is published and that the REST API is properly deployed and not encountering any errors.

 

Hope these steps guide you to the solution.

 

Lourenco Matalonga

UserImage.jpg
Roderick Detmers Blom

Hi Lourenço,

Thanks for your help, I'll take a look into this!

Roderick

2023-05-30 10-05-13
Lourenço Matalonga
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.