# Ports catalog
# Search all ports
To perform this operation, you must be authenticated by means of one of the following methods:
sessionAuth
# GET /ports
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer | false | Page Default: 1 |
resultsPerPage | query | integer | false | Results per page Default: 25 Maximum: 200 |
dateModifiedFrom | query | string(date-time) | false | Date modified from Example: 2016-01-16 00:00:00 |
dateModifiedTo | query | string(date-time) | false | Date modified to Example: 2016-02-16 23:59:59 |
clientCodes | query | string | false | Client codes in JSON format Example: ["code1","code2"] Maximum: 200 |
# Response example:
200 Response
{
"totalResultsAvailable": 0,
"firstResultPosition": 0,
"resultsPerPage": 0,
"results": [
{
"name": "string",
"countryCode": "US",
"geoRegionCode": "string",
"latitudeDeg": 0,
"latitudeMin": 0,
"latitudeSec": 0,
"latitudeNs": "N",
"longitudeDeg": 0,
"longitudeMin": 0,
"longitudeSec": 0,
"longitudeWe": "W",
"statusCode": "ACTIVE",
"restrictions": "string",
"generalComments": "string",
"clientCode": "string",
"dateCreated": "string",
"creator": "string",
"dateModified": "string",
"modifier": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK (opens new window) | Successful response | Locations |
Code examples:
# You can also use wget
curl -X GET /api/rest/1.0/ports \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('/api/rest/1.0/ports',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/rest/1.0/ports', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# Get details of a port
To perform this operation, you must be authenticated by means of one of the following methods:
sessionAuth
# GET /ports/{clientCode}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
clientCode | path | string | true | Resource client code |
# Response example:
200 Response
{
"name": "string",
"countryCode": "US",
"geoRegionCode": "string",
"latitudeDeg": 0,
"latitudeMin": 0,
"latitudeSec": 0,
"latitudeNs": "N",
"longitudeDeg": 0,
"longitudeMin": 0,
"longitudeSec": 0,
"longitudeWe": "W",
"statusCode": "ACTIVE",
"restrictions": "string",
"generalComments": "string",
"clientCode": "string",
"dateCreated": "string",
"creator": "string",
"dateModified": "string",
"modifier": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK (opens new window) | Successful response | LocationBase |
Code examples:
# You can also use wget
curl -X GET /api/rest/1.0/ports/{clientCode} \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('/api/rest/1.0/ports/{clientCode}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/rest/1.0/ports/{clientCode}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# Create or update a port
To perform this operation, you must be authenticated by means of one of the following methods:
sessionAuth
# PUT /ports/{clientCode}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
clientCode | path | string | true | Resource client code |
body | body | Location | true | none |
# Response example:
200 Response
{
"name": "string",
"countryCode": "US",
"geoRegionCode": "string",
"latitudeDeg": 0,
"latitudeMin": 0,
"latitudeSec": 0,
"latitudeNs": "N",
"longitudeDeg": 0,
"longitudeMin": 0,
"longitudeSec": 0,
"longitudeWe": "W",
"statusCode": "ACTIVE",
"restrictions": "string",
"generalComments": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK (opens new window) | Resource Updated | Location |
201 | Created (opens new window) | Resource Created | Location |
Code examples:
# You can also use wget
curl -X PUT /api/rest/1.0/ports/{clientCode} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
const inputBody = '{
"name": "string",
"countryCode": "US",
"geoRegionCode": "string",
"latitudeDeg": 0,
"latitudeMin": 0,
"latitudeSec": 0,
"latitudeNs": "N",
"longitudeDeg": 0,
"longitudeMin": 0,
"longitudeSec": 0,
"longitudeWe": "W",
"statusCode": "ACTIVE",
"restrictions": "string",
"generalComments": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/rest/1.0/ports/{clientCode}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PUT','/api/rest/1.0/ports/{clientCode}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
{
"name": "string",
"countryCode": "US",
"geoRegionCode": "string",
"latitudeDeg": 0,
"latitudeMin": 0,
"latitudeSec": 0,
"latitudeNs": "N",
"longitudeDeg": 0,
"longitudeMin": 0,
"longitudeSec": 0,
"longitudeWe": "W",
"statusCode": "ACTIVE",
"restrictions": "string",
"generalComments": "string"
}
# Delete or deactivate a port
To perform this operation, you must be authenticated by means of one of the following methods:
sessionAuth
# DELETE /ports/{clientCode}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
clientCode | path | string | true | Resource client code |
# Response example:
200 Response
{
"clientCode": "string",
"statusCode": "ACTIVE"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK (opens new window) | Successful response | ResourceStatus |
Code examples:
# You can also use wget
curl -X DELETE /api/rest/1.0/ports/{clientCode} \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('/api/rest/1.0/ports/{clientCode}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','/api/rest/1.0/ports/{clientCode}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...