subscriberIdSubscriptionsPost
Creates a new individual CAPIF Event Subscription.
/{subscriberId}/subscriptions
Usage and SDK Samples
curl -X POST \
-H "Accept: application/json,application/problem+json" \
-H "Content-Type: application/json" \
"https://example.com/capif-events/v1/{subscriberId}/subscriptions" \
-d '{
"notificationDestination" : "notificationDestination",
"eventFilters" : [ {
"aefIds" : [ "aefIds", "aefIds" ],
"apiInvokerIds" : [ "apiInvokerIds", "apiInvokerIds" ],
"apiIds" : [ "apiIds", "apiIds" ]
}, {
"aefIds" : [ "aefIds", "aefIds" ],
"apiInvokerIds" : [ "apiInvokerIds", "apiInvokerIds" ],
"apiIds" : [ "apiIds", "apiIds" ]
} ],
"supportedFeatures" : "supportedFeatures",
"eventReq" : {
"grpRepTime" : 0,
"notifMethod" : "PERIODIC",
"partitionCriteria" : [ "TAC", "TAC" ],
"notifFlag" : "ACTIVATE",
"monDur" : "2000-01-23T04:56:07.000+00:00",
"immRep" : true,
"maxReportNbr" : 0,
"repPeriod" : 1,
"sampRatio" : 60
},
"websockNotifConfig" : {
"requestWebsocketUri" : true,
"websocketUri" : "websocketUri"
},
"events" : [ "SERVICE_API_AVAILABLE", "SERVICE_API_AVAILABLE" ],
"requestTestNotification" : true
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
// Create an instance of the API class
DefaultApi apiInstance = new DefaultApi();
String subscriberId = subscriberId_example; // String | Identifier of the Subscriber
EventSubscription eventSubscription = ; // EventSubscription |
try {
EventSubscription result = apiInstance.subscriberIdSubscriptionsPost(subscriberId, eventSubscription);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#subscriberIdSubscriptionsPost");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String subscriberId = new String(); // String | Identifier of the Subscriber
final EventSubscription eventSubscription = new EventSubscription(); // EventSubscription |
try {
final result = await api_instance.subscriberIdSubscriptionsPost(subscriberId, eventSubscription);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->subscriberIdSubscriptionsPost: $e\n');
}
import org.openapitools.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String subscriberId = subscriberId_example; // String | Identifier of the Subscriber
EventSubscription eventSubscription = ; // EventSubscription |
try {
EventSubscription result = apiInstance.subscriberIdSubscriptionsPost(subscriberId, eventSubscription);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#subscriberIdSubscriptionsPost");
e.printStackTrace();
}
}
}
// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *subscriberId = subscriberId_example; // Identifier of the Subscriber (default to null)
EventSubscription *eventSubscription = ; //
[apiInstance subscriberIdSubscriptionsPostWith:subscriberId
eventSubscription:eventSubscription
completionHandler: ^(EventSubscription output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var CapifEventsApi = require('capif_events_api');
// Create an instance of the API class
var api = new CapifEventsApi.DefaultApi()
var subscriberId = subscriberId_example; // {String} Identifier of the Subscriber
var eventSubscription = ; // {EventSubscription}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.subscriberIdSubscriptionsPost(subscriberId, eventSubscription, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class subscriberIdSubscriptionsPostExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new DefaultApi();
var subscriberId = subscriberId_example; // String | Identifier of the Subscriber (default to null)
var eventSubscription = new EventSubscription(); // EventSubscription |
try {
EventSubscription result = apiInstance.subscriberIdSubscriptionsPost(subscriberId, eventSubscription);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DefaultApi.subscriberIdSubscriptionsPost: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$subscriberId = subscriberId_example; // String | Identifier of the Subscriber
$eventSubscription = ; // EventSubscription |
try {
$result = $api_instance->subscriberIdSubscriptionsPost($subscriberId, $eventSubscription);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->subscriberIdSubscriptionsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $subscriberId = subscriberId_example; # String | Identifier of the Subscriber
my $eventSubscription = WWW::OPenAPIClient::Object::EventSubscription->new(); # EventSubscription |
eval {
my $result = $api_instance->subscriberIdSubscriptionsPost(subscriberId => $subscriberId, eventSubscription => $eventSubscription);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->subscriberIdSubscriptionsPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
subscriberId = subscriberId_example # String | Identifier of the Subscriber (default to null)
eventSubscription = # EventSubscription |
try:
api_response = api_instance.subscriber_id_subscriptions_post(subscriberId, eventSubscription)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->subscriberIdSubscriptionsPost: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let subscriberId = subscriberId_example; // String
let eventSubscription = ; // EventSubscription
let mut context = DefaultApi::Context::default();
let result = client.subscriberIdSubscriptionsPost(subscriberId, eventSubscription, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Path parameters
Name | Description |
---|---|
subscriberId* |
String
Identifier of the Subscriber
Required
|
Body parameters
Name | Description |
---|---|
eventSubscription * |
Responses
Name | Type | Format | Description |
---|---|---|---|
Location | String | An alternative URI of the resource. |