createAdminPushToken
Generate a push token of a specific administrator
Generates a push token of the administrator you specify.
/admins/pushtokens/{adminId}
Usage and SDK Samples
curl -X POST "https://localhost/mc2/rest/admins/pushtokens/{adminId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminsApi;
import java.io.File;
import java.util.*;
public class AdminsApiExample {
public static void main(String[] args) {
AdminsApi apiInstance = new AdminsApi();
String adminId = adminId_example; // String | Admin Username (ADM_ID)
AdminPushToken Object body = ; // AdminPushToken Object | Admin Push Token Object
try {
apiInstance.createAdminPushToken(adminId, body);
} catch (ApiException e) {
System.err.println("Exception when calling AdminsApi#createAdminPushToken");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AdminsApi;
public class AdminsApiExample {
public static void main(String[] args) {
AdminsApi apiInstance = new AdminsApi();
String adminId = adminId_example; // String | Admin Username (ADM_ID)
AdminPushToken Object body = ; // AdminPushToken Object | Admin Push Token Object
try {
apiInstance.createAdminPushToken(adminId, body);
} catch (ApiException e) {
System.err.println("Exception when calling AdminsApi#createAdminPushToken");
e.printStackTrace();
}
}
}
String *adminId = adminId_example; // Admin Username (ADM_ID)
AdminPushToken Object *body = ; // Admin Push Token Object
AdminsApi *apiInstance = [[AdminsApi alloc] init];
// Generate a push token of a specific administrator
[apiInstance createAdminPushTokenWith:adminId
body:body
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var GenianNacRestApiFor3rdParty = require('genian_nac_rest_api_for_3rd_party');
var api = new GenianNacRestApiFor3rdParty.AdminsApi()
var adminId = adminId_example; // {String} Admin Username (ADM_ID)
var body = ; // {AdminPushToken Object} Admin Push Token Object
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.createAdminPushToken(adminId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createAdminPushTokenExample
{
public void main()
{
var apiInstance = new AdminsApi();
var adminId = adminId_example; // String | Admin Username (ADM_ID)
var body = new AdminPushToken Object(); // AdminPushToken Object | Admin Push Token Object
try
{
// Generate a push token of a specific administrator
apiInstance.createAdminPushToken(adminId, body);
}
catch (Exception e)
{
Debug.Print("Exception when calling AdminsApi.createAdminPushToken: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\AdminsApi();
$adminId = adminId_example; // String | Admin Username (ADM_ID)
$body = ; // AdminPushToken Object | Admin Push Token Object
try {
$api_instance->createAdminPushToken($adminId, $body);
} catch (Exception $e) {
echo 'Exception when calling AdminsApi->createAdminPushToken: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminsApi;
my $api_instance = WWW::SwaggerClient::AdminsApi->new();
my $adminId = adminId_example; # String | Admin Username (ADM_ID)
my $body = WWW::SwaggerClient::Object::AdminPushToken Object->new(); # AdminPushToken Object | Admin Push Token Object
eval {
$api_instance->createAdminPushToken(adminId => $adminId, body => $body);
};
if ($@) {
warn "Exception when calling AdminsApi->createAdminPushToken: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AdminsApi()
adminId = adminId_example # String | Admin Username (ADM_ID)
body = # AdminPushToken Object | Admin Push Token Object
try:
# Generate a push token of a specific administrator
api_instance.create_admin_push_token(adminId, body)
except ApiException as e:
print("Exception when calling AdminsApi->createAdminPushToken: %s\n" % e)
Parameters
Name | Description |
---|---|
adminId* |
String
Admin Username (ADM_ID)
Required
|
Name | Description |
---|---|
body * |