PHPackages                             proximify/uniweb-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. proximify/uniweb-api

ActiveLibrary[API Development](/categories/api)

proximify/uniweb-api
====================

Reference API client for the UNIWeb application.

v1.1.10(1y ago)0571[1 issues](https://github.com/Proximify/uniweb-api/issues)MITHTMLPHP &gt;=7.1.0

Since Oct 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Proximify/uniweb-api)[ Packagist](https://packagist.org/packages/proximify/uniweb-api)[ RSS](/packages/proximify-uniweb-api/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (1)Versions (10)Used By (0)

 [![uniweb API logo](docs/assets/uniweb_logo.svg)](docs/assets/uniweb_logo.svg)

UNIWeb API Client
=================

[](#uniweb-api-client)

Overview
--------

[](#overview)

The UNIWeb API allows institutions to seamlessly integrate UNIWeb with their existing systems. This repository provides both the API documentation and a reference PHP client implementation.

Note

All the examples are located in the `queries` folder.

### Key Features

[](#key-features)

- **Secure Access Control**: Manage API access permissions at the institutional level
- **Read/Write Operations**: Full support for reading and updating institutional data
- **JSON Format**: Clean, well-structured JSON responses for easy integration
- **Flexible Filtering**: Query specific data subsets to optimize response times
- **Reference Implementation**: PHP client library with example use cases

Implementation Options
----------------------

[](#implementation-options)

### 1. Simple Integration

[](#1-simple-integration)

Before implementing the API, consider if you just need to embed UNIWeb content. You can use the embed parameter:

```

```

### 2. Using Postman or Direct HTTP Requests

[](#2-using-postman-or-direct-http-requests)

The simplest way to test and use the API is through direct HTTP requests. Here are some common examples:

```
# Get user profile information
GET {{BASE_API_URL}}/resource.php?action=read
    &resources[]=profile/affiliations
    &resources[]=profile/membership_information
    &id=833

# Get members by unit and title
GET {{BASE_API_URL}}/resource.php?action=read
    &resources[]=profile/affiliations
    &resources[]=profile/membership_information
    &filter[unit]=University of XYZ
    &filter[title]=Professor

# Get all members
GET {{BASE_API_URL}}/resource.php?action=getMembers&onlyPublic=0

# Get profile picture
GET {{BASE_API_URL}}/picture.php?action=display
    &contentType=members
    &id=833
    &quality=large
```

### 3. Using the PHP Client

[](#3-using-the-php-client)

Begin by installing [PHP Composer](https://getcomposer.org/download/) if you don't already have it.

#### Option 1: Create a New Project (Recommended for Testing)

[](#option-1-create-a-new-project-recommended-for-testing)

```
# Creates a new project with example code and CLI testing tools
composer create-project proximify/uniweb-api

# Optional: specify custom installation name or path
composer create-project proximify/uniweb-api my-test
```

#### Option 2: Add as a Dependency

[](#option-2-add-as-a-dependency)

```
# Add to an existing project
composer require proximify/uniweb-api
```

Setup Guide
-----------

[](#setup-guide)

### 1. Get Your API Credentials

[](#1-get-your-api-credentials)

1. Log into your UNIWeb instance
2. Navigate to Administration → API section
3. Click "Create a client"
4. Enter a client name and save
5. Click "View" on your new client to reveal the secret key

Tip

Review the Profile and CV data schemas located at Administration → Schemas

### 2. Configure Credentials

[](#2-configure-credentials)

Create `settings/credentials.json`:

```
{
  "clientName": "your_client_name",
  "clientSecret": "your_client_secret",
  "homepage": "your_uniweb_instance_url"
}
```

⚠️ **Security Note**: Add `settings/credentials.json` to your `.gitignore` file

### 3. Run Example Queries

[](#3-run-example-queries)

#### Using the Web Interface

[](#using-the-web-interface)

1. Navigate to the project directory
2. Start PHP's built-in server: ```
    cd www
    php -S localhost:8000
    ```
3. Open `http://localhost:8000` in your browser
4. Select and run example queries through the web interface

#### Using the CLI

[](#using-the-cli)

```
# Run a specific example query
composer query example3
```

PHP Client Usage
----------------

[](#php-client-usage)

```
$credentials = [
    "clientName" => "your_client_name",
    "clientSecret" => "your_client_secret",
    "homepage" => "your_uniweb_instance_url"
];

$client = new UniwebClient($credentials);
```

Documentation
-------------

[](#documentation)

For detailed API documentation, see [Complete UNIWeb API Documentation](docs/uniweb-api.md).

Sample Use Cases
----------------

[](#sample-use-cases)

The `queries` folder contains example code for common API operations:

- Fetching user profiles
- Updating research activities
- Retrieving publication data
- And more...

Resource Paths
--------------

[](#resource-paths)

Resources are identified by paths following this structure:

```
page/section/subsection/...

```

Example paths:

- `profile/affiliations`
- `cv/education/degrees`
- `profile/membership_information`

### Content Types

[](#content-types)

- `members`: Individual user data
- `units`: Organizational unit data
- `groups`: Group-related data

Common Operations
-----------------

[](#common-operations)

### Reading Data

[](#reading-data)

Send as GET or POST parameters.

```
{
  "action": "read",
  "content": "members",
  "filter": {
    "unit": "Civil Engineering"
  },
  "resources": ["profile/biography"]
}
```

### Filtering Options

[](#filtering-options)

- `unit`: Filter by department/unit
- `title`: Filter by title (e.g., "Professor")
- `loginName`: Filter by username/email
- `modified_since`: Filter by modification date
- `onlyPublic`: Include/exclude private data

### Language Support

[](#language-support)

Add `language` parameter:

- `en`: English responses
- `fr`: French responses

Error Handling
--------------

[](#error-handling)

Errors are returned in JSON format:

```
{
  "error": {
    "message": "Error description",
    "type": "ErrorType",
    "code": 98,
    "error_subcode": 223
  }
}
```

Common error codes:

- 98: OAuth token validation error
- 401: Unauthorized
- 403: Insufficient permissions
- 404: Resource not found

API Capabilities
----------------

[](#api-capabilities)

The UNIWeb API provides:

- Secure authentication
- User data management
- Research activity tracking
- Publication management
- Institutional data access
- Custom data filtering

Support
-------

[](#support)

For technical questions or issues:

1. Check the [API Documentation](docs/uniweb-api.md)
2. Create an issue in this repository
3. Contact UNIWeb support through your institutional channels

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~186 days

Recently: every ~371 days

Total

9

Last Release

604d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1322822?v=4)[Proximify](/maintainers/proximify)[@Proximify](https://github.com/Proximify)

---

Top Contributors

[![macrini](https://avatars.githubusercontent.com/u/1253463?v=4)](https://github.com/macrini "macrini (31 commits)")

### Embed Badge

![Health badge](/badges/proximify-uniweb-api/health.svg)

```
[![Health](https://phpackages.com/badges/proximify-uniweb-api/health.svg)](https://phpackages.com/packages/proximify-uniweb-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
