Create Subscriber’s Resource

The CreateSubscriberResource API is used to create a subscriber resource based on provided attributes in OCS.io.

API Overview

Fields Required for Creating Subscriber Resource

The following table lists and describes the fields required to create a subscriber resource through the CreateSubscriberResource API:

Field Description

subscriber

ID (Ref ID / External ID) of the Subscriber.

resourceType

Type of the Resource which will be used for guiding to Subscriber.

resource

Value of the Resource which will be used for guiding to Subscriber.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when creating a subscriber resource:

  • Subscriber must be provided in the request, it must be already created in the system and must not be in Deactivated State.

  • Resource must be provided in the request, it must be unique and must not be already assigned to another Subscriber in other state then Deactivated.

  • Resource Type must be provided in the request and it must be configured in the system.

Create Subscriber Resource Example

Use the following request’s body to create a subscriber resource:

{
  "requestId": "{{$guid}}",
  "subscriber": {
    "externalId": "subscriber_external_id"
  },
  "resourceType": "ipV4",
  "resource": "10.0.0.1"
}

The outcome of the API call is as follows:

  • A new resource with the value 10.0.0.1 of type ipV4 is created for the subscriber identified by external ID subscriber_external_id.