Download the PHP package xternalsoft/laravel-patrowl without Composer

On this page you can find all versions of the php package xternalsoft/laravel-patrowl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-patrowl

A clean, fluent, and developer-friendly PHP wrapper for the Patrowl API

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A clean, fluent, and developer-friendly PHP wrapper for the Patrowl API. This package allows you to easily interact with assets, asset groups, tags, risks, controls, organizations and EASM resources (domains, IPs, services, CVEs…) of the Patrowl platform from your Laravel application.

Requirements

Installation

You can install the package via composer:

Publish the config file with:

This is the contents of the published config file:

Usage

Configuration

Add your Patrowl settings to your .env file:

Variable Description
PATROWL_API_TOKEN Required. Your API token. A MissingApiTokenException is thrown when it is missing.
PATROWL_API_BASE_URL API base URL, defaults to the Patrowl cloud.
PATROWL_DEFAULT_ORGANIZATION_ID Organization sent with most requests (org_id / organization). Many endpoints answer 403 without it: set it to one of the IDs returned by LaravelPatrowl::organizations()->all().
PATROWL_PAGINATION_LIMIT Page size used by auto-paginated lists (default 100).

Basic usage

Use the LaravelPatrowl facade:

Outside of Laravel's container (scripts, multiple tokens…), instantiate the connector directly:

Pagination

Every all() method (except organizations()->all()) returns a Saloon Paginator that fetches the next pages automatically. Iterate over items() to get DTOs:

Iterating over the paginator itself (foreach ($paginator as $page)) yields raw Response objects, one per page.

Filters are passed as query parameters (the first argument of all()), using the Patrowl API names.

Error handling

Assets

List and get assets

Create an asset

Creating an asset from a CIDR range (subnet) is not supported yet: the API returns an asset group instead of an asset.

Update and delete an asset

Manage asset tags

Move an asset to another organization

move() creates the asset in the target organization, then deletes the source:

Asset groups

List and get asset groups

Create an asset group

Update and delete an asset group

Manage the assets and tags of a group

Tags

List tags

tags() lists the tags of the organization (TagData) with a preview of their linked assets and asset groups:

Bulk associate / dissociate tags

Risks

Controls

Organizations

EASM (Attack Surface Management)

Every EASM resource exposes the same read API: all() (auto-paginated) and get(). DTOs live in Xternalsoft\LaravelPatrowl\Data\Easm and match the API payloads exactly, including nested objects.

Method Endpoint all() DTO get() DTO
domains() /domains DomainData DomainData
ipv4s() /ipv4s Ipv4Data Ipv4Data
resolutions() /resolutions ResolutionData ResolutionData
asns() /asns AsnData AsnData
services() /services ServiceData ServiceDetailData (with banner)
webServers() /webservers WebServerData WebServerData
certificates() /certificates CertificateData CertificateData
vendors() /vendors VendorData VendorData
products() /products ProductData ProductData
technologies() /technologies TechnologyData TechnologyData
technologyDetections() /technology-detections TechnologyDetectionData TechnologyDetectionData
cves() /cves CveData CveDetailData (per-version CVSS, EPSS, exploits)

CVEs are cursor paginated (handled transparently) and retrieved by identifier:

The default organization ID is sent as org_id when configured. Vendors and products are global catalogs and ignore it.

Testing your code

The connector uses Saloon, so you can fake the API in your own tests:

Examples

Runnable scripts for every resource are available in the examples directory.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Upgrading from v1? See the upgrade guide.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-patrowl with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/contracts Version ^12.0||^13.0
saloonphp/laravel-plugin Version ^4.0||^5.0
saloonphp/pagination-plugin Version ^2.0
saloonphp/saloon Version ^4.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xternalsoft/laravel-patrowl contains the following files

Loading the files please wait ...