Back to Collection Items
<?php
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.Http')
$http = new COM("Chilkat.Http");
// Adds the "Authorization: Bearer <access_token>" header.
$http->AuthToken = '<access_token>';
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.StringBuilder')
$sbResponseBody = new COM("Chilkat.StringBuilder");
$success = $http->QuickGetSb('https://api.squadcast.com/v3/squads/:squadID',$sbResponseBody);
if ($success == 0) {
print $http->LastErrorText . "\n";
exit;
}
print 'Response status code = ' . $http->LastStatus . "\n";
print $sbResponseBody->getAsString() . "\n";
?>
Curl Command
curl -X GET
-H "Authorization: Bearer <access_token>"
https://api.squadcast.com/v3/squads/:squadID
Postman Collection Item JSON
{
"name": "Get Squad By ID",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{sq_pb_auth_header}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/squads/:squadID",
"host": [
"{{baseUrl}}"
],
"path": [
"squads",
":squadID"
],
"variable": [
{
"key": "squadID",
"value": "5ed4e5977cc8a1daa90d56eb",
"type": "string"
}
]
},
"description": "This endpoint is used to get the squads details by id.\nRequires `access_token` as a `Bearer {{token}}` in the `Authorization` header with `squad-read` scope."
},
"response": [
{
"name": "200 OK",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/squads/:squadID",
"host": [
"{{baseUrl}}"
],
"path": [
"squads",
":squadID"
],
"variable": [
{
"key": "squadID",
"value": "5ed4e5977cc8a1daa90d56eb"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": null,
"cookie": [
],
"body": "{\n \"data\": {\n \"id\": \"5ed4e5977cc8a1daa90d56eb\",\n \"name\": \"Devops Night Man Squad\",\n \"slug\": \"devops-night-man-squad\",\n \"members\": [\n \"5df9d90aba2cb0c5a4f12d44\"\n ],\n \"organization\": {\n \"id\": \"5ea962e35734157d01594951\",\n \"name\": \"Avengers\",\n \"slug\": \"avengers\"\n }\n }\n}"
},
{
"name": "401 Unauthorized",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/squads/:squadID",
"host": [
"{{baseUrl}}"
],
"path": [
"squads",
":squadID"
],
"variable": [
{
"key": "squadID",
"value": "5ed4e5977cc8a1daa90d56eb"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": null,
"cookie": [
],
"body": "{\n \"meta\": {\n \"status\": 401,\n \"error_message\": \"<string>\"\n }\n}"
},
{
"name": "403 Forbidden",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/squads/:squadID",
"host": [
"{{baseUrl}}"
],
"path": [
"squads",
":squadID"
],
"variable": [
{
"key": "squadID",
"value": "5ed4e5977cc8a1daa90d56eb"
}
]
}
},
"status": "Forbidden",
"code": 403,
"_postman_previewlanguage": "json",
"header": null,
"cookie": [
],
"body": "{\n \"meta\": {\n \"status\": 403,\n \"error_message\": \"<string>\"\n }\n}"
},
{
"name": "404 Not Found",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/squads/:squadID",
"host": [
"{{baseUrl}}"
],
"path": [
"squads",
":squadID"
],
"variable": [
{
"key": "squadID",
"value": "5ed4e5977cc8a1daa90d56eb"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": null,
"cookie": [
],
"body": "{\n \"meta\": {\n \"status\": 404,\n \"error_message\": \"<string>\"\n }\n}"
},
{
"name": "500 Internal Server Error",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/squads/:squadID",
"host": [
"{{baseUrl}}"
],
"path": [
"squads",
":squadID"
],
"variable": [
{
"key": "squadID",
"value": "5ed4e5977cc8a1daa90d56eb"
}
]
}
},
"status": "Internal Server Error",
"code": 500,
"_postman_previewlanguage": "json",
"header": null,
"cookie": [
],
"body": "{\n \"meta\": {\n \"status\": 500,\n \"error_message\": \"<string>\"\n }\n}"
}
]
}