All Connections
A connection stores credentials for a service or system, such as Slack, Shopify, or Zendesk. You can use a connection to authenticate REST API requests in a ZIS flow. For more information, see Understanding connections.
Run in Postman
If you use Postman, you can import the ZIS Connections endpoints as a collection into your Postman app, then try out different requests to learn how the API works. Click the following button to get started:
If you don't use Postman, you can sign up for a free account on the Postman website and download the app. For more information about using Postman with Zendesk APIs, see Exploring Zendesk APIs with Postman.
JSON format
All Connections are represented as JSON objects with the following properties:
Name | Type | Read-only | Mandatory | Description |
---|---|---|---|---|
api_key | array | true | false | Array of API key connections. See API Key Connections |
basic_auth | array | true | false | Array of basic authentication connections. See Basic Authentication Connections |
bearer_token | array | true | false | Array of bearer token connections. See Bearer Token Connections |
meta | object | true | false | Used to paginate results using cursor pagination |
oauth | array | true | false | Array of OAuth connections. See OAuth Connections |
Show Connections
GET /api/services/zis/integrations/{integration}/connections/all
Returns a list of connections of all types for the integration.
Authentication
You can authorize requests using a ZIS OAuth access token. A Zendesk app can also authorize requests to this endpoint using an admin's browser session. See Making API requests from a Zendesk app.
Pagination
- Cursor pagination
See Pagination.
Returns a maximum of 100 records per page.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
page[after] | string | Query | false | Cursor for the next set of results |
page[before] | string | Query | false | Cursor for the previous set of results |
page[size] | integer | Query | false | Number of items to display in a results page. Can't exceed 100 |
integration | string | Path | true | Name of the integration |
Code Samples
cURL
curl https://{subdomain}.zendesk.com/api/services/zis/integrations/{integration}/connections/all \
-H "Authorization: Bearer {access_token}"
Go
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://support.zendesk.com/api/services/zis/integrations/my_integration/connections/all?page[after]=my_first_connection&page[before]=my_tenth_connection&page[size]=10"
method := "GET"
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
client := &http.Client {}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Java
import com.squareup.okhttp.*;
OkHttpClient client = new OkHttpClient();
HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/services/zis/integrations/my_integration/connections/all")
.newBuilder()
.addQueryParameter("page[after]", "my_first_connection")
.addQueryParameter("page[before]", "my_tenth_connection")
.addQueryParameter("page[size]", "10");
Request request = new Request.Builder()
.url(urlBuilder.build())
.method("GET", null)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {
method: 'GET',
url: 'https://support.zendesk.com/api/services/zis/integrations/my_integration/connections/all',
headers: {
'Content-Type': 'application/json',
},
params: {
'page[after]': 'my_first_connection',
'page[before]': 'my_tenth_connection',
'page[size]': '10',
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Python
import requests
url = "https://support.zendesk.com/api/services/zis/integrations/my_integration/connections/all?page[after]=my_first_connection&page[before]=my_tenth_connection&page[size]=10"
headers = {
"Content-Type": "application/json",
}
response = requests.request(
"GET",
url,
headers=headers
)
print(response.text)
Ruby
require "net/http"
uri = URI("https://support.zendesk.com/api/services/zis/integrations/my_integration/connections/all")
uri.query = URI.encode_www_form("page[after]": "my_first_connection", "page[before]": "my_tenth_connection", "page[size]": "10")
request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")
response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|
http.request(request)
end
Example response(s)
200 OK
// Status 200 OK
{
"api_key": [
{
"allowed_domain": "api.example.com",
"api_key": "*****",
"created_at": "1985-04-12T23:20:50.52Z",
"header_name": "x-api-key",
"name": "my_api_key_connection",
"updated_at": "1985-04-12T23:20:50.52Z"
}
],
"basic_auth": [
{
"allowed_domain": "api.example.com",
"created_at": "1985-04-12T23:20:50.52Z",
"name": "my_basic_auth_connection",
"password": "*****",
"updated_at": "1985-04-12T23:20:50.52Z",
"username": "[email protected]"
}
],
"bearer_token": [
{
"allowed_domain": "api.example.com",
"created_at": "1985-04-12T23:20:50.52Z",
"name": "my_bearer_token_connection",
"token": "*****",
"updated_at": "1985-04-12T23:20:50.52Z"
}
],
"meta": {
"after": "my_first_connection",
"before": "my_tenth_connection",
"has_more": true
},
"oauth": [
{
"access_token": "ps55XW1CbNj_hKnzwJU3yc968SL39yh3C3Okn1fpC-ThYWDqY2_M5w==",
"created_by": "test_user",
"name": "my_oauth_connection",
"oauth_access_token_response_body": "{\"access_token\":\"ps55XW1CbNj_hKnzwJU3yc968SL39yh3C3Okn1fpC\"}",
"oauth_url_subdomain": "foobar",
"permission_scope": "read write",
"refresh_token": "cs95Xaw_F5PKcxO4fQ9bZKklHKncdkXIc9qGrvktPt2elg==",
"token_expiry": "2021-10-01T12:44:22Z",
"token_type": "bearer",
"uuid": "ac10a230-0c43-45f8-b221-9e085ce90418"
}
]
}
401 Unauthorized
// Status 401 Unauthorized
{
"errors": [
{
"code": "InvalidCredentials",
"title": "Token length is invalid"
}
]
}
403 Forbidden
// Status 403 Forbidden
{
"errors": [
{
"code": "Forbidden",
"title": "Cannot access this resource. Missing scope write"
}
]
}
429 Too Many Requests
// Status 429 Too Many Requests
{
"errors": [
{
"code": "TooManyRequests",
"title": "Too many requests"
}
]
}