Using API to add IPs to your IP allowlist - Cloud

Talend Cloud APIs User Guide

Version
Cloud
Language
English
Product
Talend Cloud
Module
Talend API Designer
Talend API Tester
Talend Data Preparation
Talend Data Stewardship
Talend Management Console
Content
Design and Development > Designing APIs
Design and Development > Testing APIs
Last publication date
2024-03-15

Use the POST method on the /security/ip-allowlist/ips endpoint to add IPs to your IP allowlist.

In this example, Talend API Tester is used to issue API queries. For further information about Talend API Tester, see Talend Cloud API Tester User Guide.

Before you begin

Prerequisites: your IP allowlist must already exist. If not, create it as presented in the previous section. All the available endpoints are explained in the following section.

Procedure

  1. Open Talend API Tester in your browser and select POST from the Method list.
  2. In the field next to the Method drop-down list, enter the IP allowlist endpoint to be used: https://api.<env>.cloud.talend.com/security/ip-allowlist/ips
    For example, your environment could be:
    • ap
    • eu
    • us
    • us-west
    • au
  3. In the HEADERS area, click Add header and in the name field that is displayed, enter Authorization and in the value field, enterBearer and your personal access token or service account access token. Enter a whitespace to separate Bearer and your personal access token.
  4. In the Body area, enter the following IPs:

    Example

    [
      {
        "description": "Data Prep user1",
        "ip": "230.65.223.167"
      },
      {
    	"description": "Data Prep user2",
        "ip": "230.65.223.169"
      }
    ]
    In Talend Cloud API Tester, the POST method is selected, the endpoint specified and the body lists the IPs.
  5. Click Send to issue your request.

Results

The status code 201 is returned and the IPs are added to your IP allowlist successfully.
Talend Management Console lists the IPs in the "IP allowlist" tab.
Alternatively, you can execute a curl command in your command-line tool to perform the same operation.
curl -X POST "https://api.<env>.cloud.talend.com/security/ip-allowlist/ips" -H "accept: */*" -H "Authorization: Bearer <your_access_token>" -H "Content-Type: application/json" -d "[ { \"description\": \"Data Prep user1\", \"ip\": \"230.65.223.167\" }, {\t\"description\": \"Data Prep user2\", \"ip\": \"230.65.223.169\" }]"