NAV
shell ruby python csharp php

DigitalResource

The DigitalResource object

The DigitalResource object looks like this in JSON:

{
    "object": "digital_resource",
    "id": 1,
    "resource_id": 6,
    "file_id": null,
    "url": "https:\/\/archive.org\/details\/purgatorio",
    "name": "Read online",
    "order_id": 1,
    "added_at": "2011-02-01T19:06:08+00:00",
    "added_by_id": null,
    "sandbox": true,
    "api_version": null
}
Attribute Required Data Type
id Yes int
resource_id Yes int
file_id No int
url No text (2100)
name No text (255)
order_id Yes int
added_at No datetime
added_by_id No int
sandbox No bool
api_version No --

index (digital resources)

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources',
 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/libraryresources/(libraryresource)/digitalresources"), 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/libraryresources/(libraryresource)/digitalresources');
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": 2,
    "results": 2,
    "results_per_page": null,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "digital_resource",
            "id": 1,
            "resource_id": 6,
            "file_id": null,
            "url": "https:\/\/archive.org\/details\/purgatorio",
            "name": "Read online",
            "order_id": 1,
            "added_at": "2011-02-01T19:06:08+00:00",
            "added_by_id": null
        }
    ],
    "sandbox": true,
    "api_version": "2026-07-13"
}

Retrieves all DigitalResource objects tied to a specific Libraryresource.

HTTP Request

GET /libraryresources/(libraryresource)/digitalresources

Parameters

None

create_digital_resource

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/create" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X POST
-d '{
    "url": "https:\/\/archive.org\/details\/purgatorio",
    "name": "Read online at Archive.org"
}' \ 
require 'httparty'
response = HTTParty.post(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/create',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
 body: {
  :url => 'https://archive.org/details/purgatorio',
  :name => 'Read online at Archive.org'
 }.to_json
)
puts response.body
import requests
response = requests.post(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/create',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
 json={
  'url': 'https://archive.org/details/purgatorio',
  'name': 'Read online at Archive.org'
 }
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/create"), Method.Post);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
  url = "https://archive.org/details/purgatorio",
  name = "Read online at Archive.org"
});
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/libraryresources/(libraryresource)/digitalresources/create');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
  'url' => 'https://archive.org/details/purgatorio',
  'name' => 'Read online at Archive.org'
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "digital_resource",
    "id": 102088,
    "resource_id": 6,
    "file_id": null,
    "url": "https:\/\/archive.org\/details\/purgatorio",
    "name": "Read online at Archive.org",
    "order_id": 3,
    "added_at": "2026-10-20T00:04:14+00:00",
    "added_by_id": 22,
    "sandbox": true,
    "api_version": "2026-07-13"
}

HTTP Request

POST /libraryresources/(libraryresource)/digitalresources/create

Parameters

Name Required Data Type Description
url Yes text (2100)
name Yes text (255) The text displayed for the link.

show (digital resource)

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/(digitalresource)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/(digitalresource)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/(digitalresource)',
 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/libraryresources/(libraryresource)/digitalresources/(digitalresource)"), 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/libraryresources/(libraryresource)/digitalresources/(digitalresource)');
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": "digital_resource",
    "id": 1,
    "resource_id": 6,
    "file_id": null,
    "url": "https:\/\/archive.org\/details\/purgatorio",
    "name": "Read online",
    "order_id": 1,
    "added_at": "2011-02-01T19:06:08+00:00",
    "added_by_id": null,
    "sandbox": true,
    "api_version": "2026-07-13"
}

Retrieves a specific DigitalResource object.

HTTP Request

GET /libraryresources/(libraryresource)/digitalresources/(digitalresource)

Parameters

No additional parameters are needed beyond the ID of the object being requested that appears in the URL.

update_digital_resource

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/(digitalresource)/update" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X PUT
-d '{
    "name": "Read online"
}' \ 
require 'httparty'
response = HTTParty.put(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/(digitalresource)/update',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.put(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/(digitalresource)/update',
 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/libraryresources/(libraryresource)/digitalresources/(digitalresource)/update"), Method.Put);
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/libraryresources/(libraryresource)/digitalresources/(digitalresource)/update');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "digital_resource",
    "id": 1,
    "resource_id": 6,
    "file_id": null,
    "url": "https:\/\/archive.org\/details\/purgatorio",
    "name": "Read online",
    "order_id": 1,
    "added_at": "2011-02-01T19:06:08+00:00",
    "added_by_id": null,
    "sandbox": true,
    "api_version": "2026-07-13"
}

Updates the digital_resource attribute of an existing DigitalResource object.

HTTP Request

PUT /libraryresources/(libraryresource)/digitalresources/(digitalresource)/update

Parameters

Name Required Data Type Description
name No string
url No text (2100)
order_id No int Digital resources are displayed in order_id order.

delete_digital_resource

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/(digitalresource)/delete" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X DELETE
require 'httparty'
response = HTTParty.delete(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/(digitalresource)/delete',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.delete(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/(digitalresource)/delete',
 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/libraryresources/(libraryresource)/digitalresources/(digitalresource)/delete"), Method.Delete);
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/libraryresources/(libraryresource)/digitalresources/(digitalresource)/delete');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "digital_resource",
    "id": 2,
    "deleted": true
}

HTTP Request

DELETE /libraryresources/(libraryresource)/digitalresources/(digitalresource)/delete

Parameters

None

upload file (digital resource)

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/upload" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X POST
-F 'file=@/path/to/file.jpg' \ 
require 'httparty'
response = HTTParty.post(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/upload',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.post(
 'https://yourschool.populiweb.com/api2/libraryresources/(libraryresource)/digitalresources/upload',
 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/libraryresources/(libraryresource)/digitalresources/upload"), Method.Post);
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/libraryresources/(libraryresource)/digitalresources/upload');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

"Example response not available."

HTTP Request

POST /libraryresources/(libraryresource)/digitalresources/upload

Parameters

Name Required Data Type Description
name No string The display name for the file. Defaults to the name of the uploaded file.

This routes requires a file upload with the request. Use a form post parameter called "file". Read about request and response format to see how parameters need to be specified differently when there is a file upload.