Read Subscriber’s Resource

The ReadSubscriberResource API in OCS.io allows for retrieving subscriber resources using the subscriber’s Ref ID or External ID, providing essential information for resource management.

API Overview

Parameters Required for Reading Subscriber

The following table lists and describes the parameters required to read a subscriber through the ReadSubscriberResource API:

Parameter Description

refId

Ref ID of the Subscriber.

externalId

External ID of the Subscriber.

resourceType

Type of the Resource which will be used for guiding to Subscriber. If not provided, all Resources will be retrieved.

historyIncluded

Indicates whether Historical Resources are included in the response. By default, only Valid Resources are retrieved.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when reading Subscriber Resource(s):

Read Subscriber Resource Examples

1. Read Current Subscriber Resources of All Types

Here is a cURL example for reading all current subscriber resources:

curl -X GET 'https://api.ocs.io/v1/casm/subscribers/resources/read?refId=<subscriber_ref_id>'

The outcome of the API call is as follows:

  • All current subscriber resources for subscriber with Ref ID <subscriber_ref_id> are retrieved.

2. Read Current Subscriber Resource of Specific Type

Here is a cURL example for reading the current Subscriber Resource of a specific type:

curl -X GET 'https://api.ocs.io/v1/casm/subscribers/resources/read?refId=<subscriber_ref_id>&resourceType=ipV4'

The outcome of the API call is as follows:

  • The subscriber resource(s) of type ipV4 for subscriber with Ref ID <subscriber_ref_id> are retrieved.

3. Read Historical Subscriber Resources of All Types

Here is a cURL example for reading all historical subscriber resources:

curl -X GET 'https://api.ocs.io/v1/casm/subscribers/resources/read?refId=<subscriber_ref_id>&historyIncluded=true'

The outcome of the API call is as follows:

  • All historical subscriber resources for subscriber with Ref ID <subscriber_ref_id> are retrieved.

4. Read Historical Subscriber Resources of Specific Type

Here is a cURL example for reading the historical subscriber resources of a specific type:

curl -X GET 'https://api.ocs.io/v1/casm/subscribers/resources/read?refId=<subscriber_ref_id>&resourceType=ipV4&historyIncluded=true'

The outcome of the API call is as follows:

  • The historical subscriber resource(s) of type ipV4 for subscriber with Ref ID <subscriber_ref_id> are retrieved.

  • If historyIncluded is set to true, the historical resources of the subscriber are included.