grantsGrantIdGet
Grant Lifecycle Operation The GET method retrieves information about a specific grant by reading an individual grant resource.
/grants/{grantId}
Usage and SDK Samples
curl -X GET "https://localhost/grant/v1/grants/{grantId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String grantId = grantId_example; // String | Identifier of the grant. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the "id" attribute in the payload body of that response.
String accept = accept_example; // String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
String authorization = authorization_example; // String | The authorization token for the request. Reference: IETF RFC 7235
try {
apiInstance.grantsGrantIdGet(grantId, accept, authorization);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#grantsGrantIdGet");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String grantId = grantId_example; // String | Identifier of the grant. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the "id" attribute in the payload body of that response.
String accept = accept_example; // String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
String authorization = authorization_example; // String | The authorization token for the request. Reference: IETF RFC 7235
try {
apiInstance.grantsGrantIdGet(grantId, accept, authorization);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#grantsGrantIdGet");
e.printStackTrace();
}
}
}
String *grantId = grantId_example; // Identifier of the grant. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the "id" attribute in the payload body of that response.
String *accept = accept_example; // Content-Types that are acceptable for the response. Reference: IETF RFC 7231
String *authorization = authorization_example; // The authorization token for the request. Reference: IETF RFC 7235
(optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
[apiInstance grantsGrantIdGetWith:grantId
accept:accept
authorization:authorization
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Sol003VnfLifecycleOperationGrantingInterface = require('sol003___vnf_lifecycle_operation_granting_interface');
var api = new Sol003VnfLifecycleOperationGrantingInterface.DefaultApi()
var grantId = grantId_example; // {String} Identifier of the grant. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the "id" attribute in the payload body of that response.
var accept = accept_example; // {String} Content-Types that are acceptable for the response. Reference: IETF RFC 7231
var opts = {
'authorization': authorization_example // {String} The authorization token for the request. Reference: IETF RFC 7235
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.grantsGrantIdGet(grantId, accept, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class grantsGrantIdGetExample
{
public void main()
{
var apiInstance = new DefaultApi();
var grantId = grantId_example; // String | Identifier of the grant. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the "id" attribute in the payload body of that response.
var accept = accept_example; // String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
var authorization = authorization_example; // String | The authorization token for the request. Reference: IETF RFC 7235
(optional)
try
{
apiInstance.grantsGrantIdGet(grantId, accept, authorization);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.grantsGrantIdGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DefaultApi();
$grantId = grantId_example; // String | Identifier of the grant. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the "id" attribute in the payload body of that response.
$accept = accept_example; // String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
$authorization = authorization_example; // String | The authorization token for the request. Reference: IETF RFC 7235
try {
$api_instance->grantsGrantIdGet($grantId, $accept, $authorization);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->grantsGrantIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $grantId = grantId_example; # String | Identifier of the grant. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the "id" attribute in the payload body of that response.
my $accept = accept_example; # String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
my $authorization = authorization_example; # String | The authorization token for the request. Reference: IETF RFC 7235
eval {
$api_instance->grantsGrantIdGet(grantId => $grantId, accept => $accept, authorization => $authorization);
};
if ($@) {
warn "Exception when calling DefaultApi->grantsGrantIdGet: $@\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.DefaultApi()
grantId = grantId_example # String | Identifier of the grant. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the "id" attribute in the payload body of that response.
accept = accept_example # String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
authorization = authorization_example # String | The authorization token for the request. Reference: IETF RFC 7235
(optional)
try:
api_instance.grants_grant_id_get(grantId, accept, authorization=authorization)
except ApiException as e:
print("Exception when calling DefaultApi->grantsGrantIdGet: %s\n" % e)
Parameters
Name | Description |
---|---|
grantId* |
String
Identifier of the grant. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request granting a new VNF lifecycle operation. It can also be retrieved from the "id" attribute in the payload body of that response.
Required
|
Name | Description |
---|---|
Accept* |
String
Content-Types that are acceptable for the response. Reference: IETF RFC 7231
Required
|
Authorization |