Overview
  • Namespace
  • Class

Namespaces

  • APWG
    • API
      • Alerts
      • Groups
      • Index
      • MalIP
      • Phish
      • ReportPhishing

Classes

  • GroupsClient

Class GroupsClient

Interact with the Groups API

Class GroupsClient

APWG\API\AbstractClient implements APWG\API\ClientInterface
Extended by APWG\API\Groups\GroupsClient
Namespace: APWG\API\Groups
Package: APWG\API\Groups
Copyright: Copyright (c) 2017 The Anti-Phishing Working Group
Author: Andrew Breksa andrew@apwg.org
Located at APWG/API/Groups/GroupsClient.php

Methods summary

public Psr\Http\Message\ResponseInterface
# getSpec( string|null $group_id = NULL )

Returns the YAML Swagger 2 specification for the API

Returns the YAML Swagger 2 specification for the API

Parameters

$group_id

Returns

Psr\Http\Message\ResponseInterface
public string
# getGroupUrl( null|string $group_id = NULL )

Get the URL for a group

Get the URL for a group

Parameters

$group_id

Returns

string
public string
# getGroupId( )

Get the stored group id

Get the stored group id

Returns

string
public
# setGroupId( string $group_id )

Set the stored group id, used as the default when none is provided to the class methods

Set the stored group id, used as the default when none is provided to the class methods

Parameters

$group_id
public Psr\Http\Message\ResponseInterface
# getSchema( array $options = [], string|null $action = NULL, string|null $group_id = NULL )

Returns the JSON schema for a specific action, defaults to the full group threat model schema (GET)

Returns the JSON schema for a specific action, defaults to the full group threat model schema (GET)

Parameters

$options
$action
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# getParamSchema( array $options = [], null $group_id = NULL )

Return a JSON schema for the group's GET:/groups/ endpoint parameters, useful for validating Alert queries

Return a JSON schema for the group's GET:/groups/ endpoint parameters, useful for validating Alert queries

Parameters

$options
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# activity( array $options = [], null|string $group_id = NULL )

Search the activity listing for the group's entities

Search the activity listing for the group's entities

Parameters

$options
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# assetHead( integer $entity_id, null|string $group_id = NULL )

Get header information for a specific entity

Get header information for a specific entity

Parameters

$entity_id
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# assetActivity( integer $entity_id, array $options = [], null|string $group_id = NULL )

Search the activity listing for a specific entity

Search the activity listing for a specific entity

Parameters

$entity_id
$options
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# patch( integer $entity_id, array $data = [], array $options = [], null|string $group_id = NULL )

Edit a group entity

Edit a group entity

Parameters

$entity_id
$data
$options
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# get( integer $entity_id, array $options = [], null|string $group_id = NULL )

Get a specific entity

Get a specific entity

Parameters

$entity_id
$options
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# search( array $options = [], null|string $group_id = NULL )

Search the group's entities

Search the group's entities

Parameters

$options
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# create( array $data = [], array $options = [], null|string $group_id = NULL )

Submit a new entity to this group

Submit a new entity to this group

Parameters

$data
$options
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# uploadFile( integer $entity_id, string $file_path, array $options = [], null|string $group_id = NULL, callable $progress_callback = NULL )

Parameters

$entity_id
$file_path
$options
$group_id
$progress_callback
Callback to be executed on transfer progress, as per http://docs.guzzlephp.org/en/latest/request-options.html#progress

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# getFile( integer $entity_id, string $file_hash, array $options = [], null $group_id = NULL )

Parameters

$entity_id
$file_hash
$options
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# downloadFile( integer $entity_id, string $file_hash, array $options = [], null $group_id = NULL, callable $progress_callback = NULL )

Parameters

$entity_id
$file_hash
$options
$group_id
$progress_callback
Callback to be executed on transfer progress, as per http://docs.guzzlephp.org/en/latest/request-options.html#progress

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# getFiles( integer $entity_id, array $options = [], null|integer $group_id = NULL )

Parameters

$entity_id
$options
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# getNotes( integer $entity_id, array $options = [], null|integer $group_id = NULL )

Parameters

$entity_id
$options
$group_id

Returns

Psr\Http\Message\ResponseInterface
public Psr\Http\Message\ResponseInterface
# addNote( integer $entity_id, string $note, null|integer $group_id = NULL )

Parameters

$entity_id
$note
$group_id

Returns

Psr\Http\Message\ResponseInterface

Methods inherited from APWG\API\AbstractClient

__construct(), _call(), getApiKey(), getBaseUri(), getCache(), getClient(), getGlobalOptions(), getGuzzleOptions(), setApiKey(), setBaseUri(), setCache(), setClient(), setGlobalOptions(), setGuzzleOptions()

Properties summary

Properties inherited from APWG\API\AbstractClient

$apiKey, $base_uri, $cache, $client, $globalOptions, $guzzleOptions

API documentation generated by ApiGen