Skip to main content
PATCH
/
v2
/
teams
/
{teamId}
/
endpoint
/
{endpointName}
Update export endpoint for a team
curl --request PATCH \
  --url https://rest.forestreet.com/v2/teams/{teamId}/endpoint/{endpointName} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "<string>",
  "description": "<string>",
  "headers": {},
  "version": 2
}
'
import requests

url = "https://rest.forestreet.com/v2/teams/{teamId}/endpoint/{endpointName}"

payload = {
"url": "<string>",
"description": "<string>",
"headers": {},
"version": 2
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', description: '<string>', headers: {}, version: 2})
};

fetch('https://rest.forestreet.com/v2/teams/{teamId}/endpoint/{endpointName}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://rest.forestreet.com/v2/teams/{teamId}/endpoint/{endpointName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'description' => '<string>',
'headers' => [

],
'version' => 2
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://rest.forestreet.com/v2/teams/{teamId}/endpoint/{endpointName}"

payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"headers\": {},\n \"version\": 2\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://rest.forestreet.com/v2/teams/{teamId}/endpoint/{endpointName}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"headers\": {},\n \"version\": 2\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://rest.forestreet.com/v2/teams/{teamId}/endpoint/{endpointName}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"headers\": {},\n \"version\": 2\n}"

response = http.request(request)
puts response.read_body
{
  "metadata": {
    "endpoint": {
      "name": "<string>",
      "description": "<string>",
      "url": "<string>",
      "headers": {},
      "version": 2
    }
  },
  "updated": [
    "<string>"
  ]
}
{
"success": false,
"errorCode": "INVALID_INPUT",
"message": "Validation of path parameters failed."
}
{
"success": false,
"errorCode": "FORBIDDEN",
"message": "Forbidden - User does not have access to the team"
}
{
"success": false,
"errorCode": "NOT_FOUND",
"message": "Endpoint not found - Cannot update non-existing endpoint"
}

Authorizations

x-api-key
string
header
required

Pass a static API key for every request, provided by your customer support.

Path Parameters

teamId
number | null
Required range: x >= 0
endpointName
string
required
Maximum string length: 255

Body

application/json
url
string
Required string length: 4 - 1024
description
string | null
Maximum string length: 1024
headers
object | null
version
integer

Compatible version Export Via API mechanism.

Required range: x >= 1

Response

Successful update of endpoint.

metadata
object
required
updated
string[]
required

List of fields that were updated in the endpoint metadata.