---
title: "接続のテスト"
slug: "test-a-connection"
abstract: "Sitecore Personalize Connection REST APIを使って接続をテストする方法を説明しています。"
---
# 接続のテスト

POST /v2/connections/testConnection

接続をテストします。

リクエスト文には以下の必要な属性を記載する必要があります:

-   属性:タイプ
-   connection:対象

curl -X POST '<baseURL>/v2/connections/testConnection' \\
-H 'Authorization: Bearer <accessToken>' \\
-H 'Accept: application/json' \\
--data-raw '
{
 "connection": {
 "clientKey": "pqsDATA3lw12v5a9rrHPW1c4hET73GxQ",
 "href": "<baseURL>/v2/connections/ab5fc100-a0d2-49a0-87d9-1d4219a5d0a2",
 "ref": "ab5fc100-a0d2-49a0-87d9-1d4219a5d0a2",
 "name": "Promo Offer to Email Push and notif and SMS",
 "description": "Omnichannel publishing",
 "modifiedByRef": "343982bb-40e4-4119-bfab-144f65fb496c",
 "modifiedAt": "2026-09-14T20:\`17:59\`.737Z",
 "revision": 1,
 "archived": false,
 "auth": {
 "authType": "NONE"
 },
 "request": {
 "requestType": "POST",
 "connectionUrl": "<baseURL>/workflows/45aea1bb3c2845e8b4043e209c4456c2/triggers/manual/paths/invoke",
 "requestBody": "{\\n \\"guest\_sms\\" : \\"{sms}\\",\\n \\"x-brand-color\\" : \\"black\\"\\n}"
 },
 "inputMappings": ,
 "outputMappings": 
 {
 "label": "response",
 "outputReference": "message",
 "type": "String"
 }
 ,
 "customHeaders": 
 {
 "name": "Accept",
 "value": "application/json"
 },
 {
 "name": "Accept-Encoding",
 "value": "gzip"
 },
 {
 "name": "Content-Type",
 "value": "application/json"
 },
 {
 "name": "X-Brand-Color",
 "value": "{color-name-or-hex}"
 },
 {
 "name": "X-Guest-SMS",
 "value": "{sms}"
 }
 ,
 "urlParameters": ,
 "systemType": "DESTINATION",
 "connectionTimeout": 10000,
 "socketTimeout": 1000,
 "icon": "fad fa-sms"
 }
}'

{
 "statusCode": 202,
 "executionTimeInMilliseconds": 351,
 "request": {
 "headers": {
 "X-Brand-Color": "{color-name-or-hex}",
 "Accept": "application/json",
 "X-Correlation-Id": "0b79f2c2-2001-4131-80d2-df3936e19e78",
 "X-Guest-SMS": "{sms}",
 "Accept-Encoding": "gzip",
 "Content-Type": "application/json"
 }
 },
 "response": {
 "body": {
 "message": "cannot handle current output"
 }
 },
 "mappingResult": {
 "message": "cannot handle current output"
 },
 "connectionUrl": "<baseURL>/workflows/45aea1bb3c2845e8b4043e209c4456c2/triggers/manual/paths/invoke"
}