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
Name | Description |
---|---|
subscriberId* |
String
Identifier of the Subscriber
Required
|
Name | Description |
---|---|
eventSubscription * |
{
Represents an individual CAPIF Event Subscription resource. Required: events,notificationDestination
eventFilters:
eventReq:
undefined
events:
notificationDestination:
undefined
requestTestNotification:
supportedFeatures:
undefined
websockNotifConfig:
undefined
|
Responses
Status: 201 - Created (Successful creation of subscription)
Name | Type | Format | Description |
---|---|---|---|
Location | String | An alternative URI of the resource. |
Status: 400 - Bad request
Represents additional information and details on an error response.
Description of invalid parameters, for a request rejected due to invalid parameters.
A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
Status: 401 - Unauthorized
Represents additional information and details on an error response.
Description of invalid parameters, for a request rejected due to invalid parameters.
A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
Status: 403 - Forbidden
Represents additional information and details on an error response.
Description of invalid parameters, for a request rejected due to invalid parameters.
A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
Status: 404 - Not Found
Represents additional information and details on an error response.
Description of invalid parameters, for a request rejected due to invalid parameters.
A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
Status: 411 - Length Required
Represents additional information and details on an error response.
Description of invalid parameters, for a request rejected due to invalid parameters.
A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
Status: 413 - Payload Too Large
Represents additional information and details on an error response.
Description of invalid parameters, for a request rejected due to invalid parameters.
A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
Status: 415 - Unsupported Media Type
Represents additional information and details on an error response.
Description of invalid parameters, for a request rejected due to invalid parameters.
A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
Status: 429 - Too Many Requests
Represents additional information and details on an error response.
Description of invalid parameters, for a request rejected due to invalid parameters.
A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
Status: 500 - Internal Server Error
Represents additional information and details on an error response.
Description of invalid parameters, for a request rejected due to invalid parameters.
A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.
Status: 503 - Service Unavailable
Represents additional information and details on an error response.
Description of invalid parameters, for a request rejected due to invalid parameters.
A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported.