External systems

GET /api/external_systems
get a list of external_systems

Success Response Code: 200

Params

Param name Description
page
optional

page number of external_systems to be returned (default=1)


Value: Must be a Integer
per_page
optional

number of external_systems to be returned per page (default=20, max=500)


Value: Must be a Integer

Response Fields

external_systems array of ExternalSystem entries. See "GET /api/external_systems/:external_system_id" for format Array<ExternalSystem>

Example Curl Commands

curl -X GET -v --basic -u "adminuser@socialcast.com:adminuser" https://demo.socialcast.com/api/external_systems.json

GET /api/external_systems/:external_system_id
get a single external_system for the authenticated reach admin

Success Response Code: 200

Response Fields

id unique ID of a external_system Integer
name name of the external_system String
description description of external_system String
url url to view the external_system permalink page String
system_url system url of the external_system String
state state of the external_system ["active", "inactive"]
not_in_company_stream exclude this system's messages from Company Stream [true, false]
external_system_type system type ["html", "sharepoint", "google_gadget"]
sharepoint_version available only if external_system_type is sharepoint ["2007", "2010"]
avatars urls for various sizes of external_system avatar pictures Hash<String, Url>

Example Curl Commands

curl -X GET -v --basic -u "adminuser@socialcast.com:adminuser" https://demo.socialcast.com/api/external_system/12.json

Examples

GET 
200
{
  "external_system": {
    "id": 3,
    "name": "Øur 'Intranet' 1",
    "username": null,
    "description": null,
    "url": "https://socialcast.socialcast.test/external_systems/3",
    "system_url": "http://intranet1.socialcast.com",
    "state": "active",
    "external_system_type": "html",
    "sharepoint_version": null,
    "not_in_company_stream": false,
    "avatars": {
      "is_system_default": true,
      "square16": "https://socialcast.socialcast.test/images/external_system_square16.png",
      "square30": "https://socialcast.socialcast.test/images/external_system_square30.png",
      "square45": "https://socialcast.socialcast.test/images/external_system_square45.png",
      "square70": "https://socialcast.socialcast.test/images/external_system_square70.png",
      "square140": "https://socialcast.socialcast.test/images/external_system_square140.png"
    },
    "type": "ExternalSystem"
  }
}

POST /api/external_systems
create an external system for the authenticated reach admin

Success Response Code: 201

Params

Param name Description
external_system
optional

Value: Must be a Hash
external_system[name]
required

name of the external_system


Value: Must be a String
external_system[description]
optional

description of external_system


Value: Must be a String
external_system[url]
required

the system url of the external_system


Value: Must be a String
external_system[not_in_company_stream]
optional

exclude this system's messages from Company Stream


Value: Must be one of: <code>true</code>, <code>false</code>.
external_system[external_system_type]
optional

system type (default=html)


Value: Must be one of: <code>html</code>, <code>sharepoint</code>, <code>google_gadget</code>.
external_system[sharepoint_version]
optional

available only if external_system_type is sharepoint


Value: Must be one of: <code>2007</code>, <code>2010</code>.

Response Fields

external_system see "GET /api/external_systems/:external_system_id" for documentation external_system

Example Curl Commands

#Add a external_system named "Socialcast Developers" and url http://w.com
curl -X POST -d "external_system[name]=Socialcast%20Developers&external_system[url]=http%3A%2F%2Fw.com" -v --basic -u "adminuser@socialcast.com:adminuser" http://demo.socialcast.com/api/external_systems.json
#Add a external_system named "Socialcast Developers" and url http://w.com and image from an url
curl -X POST -F "external_system[name]=Socialcast Developers" -F "external_system[url]=http://w.com" -F "external_system[profile_photo_url]=http://www.socialcast.com/sites/default/files/Logos/logo.png" -v --basic -u "adminuser@socialcast.com:adminuser" https://demo.socialcast.com/api/external_systems.json
#Add a external_system named "Socialcast Developers" and url http://w.com and a local image
curl -X POST -F "external_system[name]=Socialcast Developers" -F "external_system[url]=http://w.com" -F "external_system[profile_photo][data]=@./socialcast.png" -v --basic -u "adminuser@socialcast.com:adminuser" https://demo.socialcast.com/api/external_systems.json

PUT /api/external_systems/:external_system_id
update an external system for the authenticated reach admin

Success Response Code: 200

Params

Param name Description
external_system
optional

Value: Must be a Hash
external_system[name]
required

name of the external_system


Value: Must be a String
external_system[description]
optional

description of external_system


Value: Must be a String
external_system[url]
required

the system url of the external_system


Value: Must be a String
external_system[not_in_company_stream]
optional

exclude this system's messages from Company Stream


Value: Must be one of: <code>true</code>, <code>false</code>.
external_system[external_system_type]
optional

system type (default=html)


Value: Must be one of: <code>html</code>, <code>sharepoint</code>, <code>google_gadget</code>.
external_system[sharepoint_version]
optional

available only if external_system_type is sharepoint


Value: Must be one of: <code>2007</code>, <code>2010</code>.

Response Fields

external_system see "GET /api/external_systems/:external_system_id" for documentation external_system

Example Curl Commands

#Update external_system to name "Socialcast Developers" and url http://w.com
curl -X PUT -d "external_system[name]=Socialcast%20Developers&external_system[url]=http%3A%2F%2Fw.com" -v --basic -u "adminuser@socialcast.com:adminuser" http://demo.socialcast.com/api/external_systems/12.json
#Update profile photo with an image from an url
curl -X PUT -F "external_system[profile_photo_url]=http://www.socialcast.com/sites/default/files/Logos/logo.png" -v --basic -u "adminuser@socialcast.com:adminuser" https://demo.socialcast.com/api/external_systems/12.json
#Update profile photo with a local image
curl -X PUT -F "external_system[profile_photo][data]=@./socialcast.png" -v --basic -u "adminuser@socialcast.com:adminuser" https://demo.socialcast.com/api/external_systems/12.json
#Update external_system with 2007 sharepoint
curl -X PUT -d "external_system[external_system_type]=sharepoint&external_system[sharepoint_version]=2007" -v --basic -u "adminuser@socialcast.com:adminuser" https://demo.socialcast.com/api/external_systems/12.json

DELETE /api/external_systems/:external_system_id
deactivate an external_system

Success Response Code: 200

Response Fields

external_system see "GET /api/external_systems/:external_system_id" for documentation external_system

Example Curl Commands

curl -X DELETE -v --basic -u "adminuser@socialcast.com:adminuser" https://demo.socialcast.com/api/external_system/12.json

POST /api/external_systems/authentication
verifies authentication of an external system

Also see preferred endpoint for external systems.

Header: SocialcastApiClient external_system_client_identifier:external_system_client_secret

Success Response Code: 200

Response Fields

external_system see "GET /api/external_systems/:external_system_id" for documentation external_system

Example Curl Commands

curl -X POST -v https://demo.socialcast.com/api/external_systems/authenticate.json -d -h SocialcastApiClient myidentifier:myclientsecret