Create portmap

post/v1/sources/{sourceId}/portmaps
Page View

Source endpoints allow you to manage sources and their related portmaps in a specified environment. Portmaps include a port, virtual host (vhost), source, and list of host IPs.

You must be a member of the environment and be assigned to an engineer role to manage sources. Learn about roles.

Create portmap

Create a portmap for the specified MLLP source within your Redox organization.

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/platform/v1/sources/{sourceId}/portmaps' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'accept: application/json' \
5
--header 'content-type: application/json' \
6
--data '{
7
"vhost": 0,
8
"port": 0,
9
"hostips": [
10
"string"
11
]
12
}'

Path Parameters

  • sourceId
    required, string

    Displays the unique identifier of a source within a given environment.

Request Body Schema

    Contains the fields that can be provided when creating a new portmap.

  • vhost
    required, number

    Displays the ID of the Redox vhost that the port is mapped for.

  • port
    required, number

    Displays the port number that is being mapped. Must be between 9960 and 9999 (inclusive).

  • hostips
    required, Array of string

    Displays the list of host IPs for the portmap.

    Format: cidr

Response fields and example

Example payload generated from schema
1
{
2
"meta": {
3
"version": "1.0.0"
4
},
5
"payload": {
6
"portmap": {
7
"id": 0,
8
"vhost": 0,
9
"port": 0,
10
"hostips": [
11
"string"
12
]
13
}
14
}
15
}
  • meta
    object
    • version
      string

      Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences.

  • payload
    object

    Contains the payload with details about the requested portmap(s).

    • portmap
      object

      Contains a portmap and its related details.

      • id
        number

        Displays the unique identifier of the portmap.

      • vhost
        number

        Displays the ID of the Redox vhost that the port is mapped for.

      • port
        number

        Displays the port number that is being mapped. Must be between 9960 and 9999 (inclusive).

      • hostips
        Array of string

        Displays the list of host IPs for the portmap.

        Format: cidr