Website
The Website object
The Website object looks like this in JSON:
{
"object": "website",
"id": 2179,
"owner_id": 2,
"owner_type": "person",
"website": "http:\/\/coolschool.populiweb.com",
"primary": true,
"old": false,
"public": true,
"synced_from": null,
"added_at": null,
"added_by_id": null,
"sandbox": true
}
| Attribute | Required | Data Type |
|---|---|---|
| id | Yes | int |
| owner_id | Yes | int |
| owner_type | Yes | enum (person, organization) |
| website | Yes | text (2100) |
| primary | Yes | bool |
| old | Yes | bool |
| public | Yes | bool |
| synced_from | Yes | int |
| added_at | No | datetime |
| added_by_id | No | int |
| sandbox | No | bool |
index (organization)
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/organizations/(organization)/websites" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/organizations/(organization)/websites',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/organizations/(organization)/websites',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/organizations/(organization)/websites"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/organizations/(organization)/websites');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "list",
"count": 1,
"results": 1,
"results_per_page": null,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [
{
"object": "website",
"id": 3002,
"owner_id": 1,
"owner_type": "organization",
"website": "http:\/\/coolschool.populiweb.com",
"primary": true,
"old": false,
"public": true,
"synced_from": null,
"added_at": null,
"added_by_id": null
}
],
"sandbox": true
}
Retrieves all Website objects tied to a specific Organization.
HTTP Request
GET /organizations/(organization)/websites
Parameters
None
Permissions
One of the following roles is required to call this method:
- Academic Auditor
- Financial Auditor
- Admissions Auditor
- Staff
index (person)
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/people/(person)/websites" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/people/(person)/websites',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/people/(person)/websites',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/people/(person)/websites"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/people/(person)/websites');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "list",
"count": 1,
"results": 1,
"results_per_page": null,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [
{
"object": "website",
"id": 3001,
"owner_id": 12,
"owner_type": "person",
"website": "http:\/\/coolschool.populiweb.com",
"primary": true,
"old": false,
"public": true,
"synced_from": null,
"added_at": null,
"added_by_id": null
}
],
"sandbox": true
}
Retrieves all Website objects tied to a specific Person.
HTTP Request
GET /people/(person)/websites
Parameters
None
Permissions
One of the following roles is required to call this method:
- Staff