FramaClangRestfulApiForPkm

FramaClang

framaClang

Runs Frama-Clang C++ parsing tool based on LLVM Clang


/frama_clang/{dbName}

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://pkm-api_frama-clang_1:8082/frama_clang/{dbName}?asynchronous=true&invocationID=invocationID_example" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.FramaClangApi;

import java.io.File;
import java.util.*;

public class FramaClangApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        FramaClangApi apiInstance = new FramaClangApi();
        String dbName = dbName_example; // String | The project name from where to get source code/header files, the compile commands, and put the parsing results (Source code ASTs, Comments, and Annotations)
        String key = key_example; // String | Access key to the PKM (optional, depending on server configuration)
        InlineObject body = ; // InlineObject | 
        Boolean asynchronous = true; // Boolean | flag to control asynchronous/synchronous execution of doc_to_asfm job
        String invocationID = invocationID_example; // String | invocation identifier (optional)

        try {
            Job result = apiInstance.framaClang(dbName, key, body, asynchronous, invocationID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FramaClangApi#framaClang");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.FramaClangApi;

public class FramaClangApiExample {
    public static void main(String[] args) {
        FramaClangApi apiInstance = new FramaClangApi();
        String dbName = dbName_example; // String | The project name from where to get source code/header files, the compile commands, and put the parsing results (Source code ASTs, Comments, and Annotations)
        String key = key_example; // String | Access key to the PKM (optional, depending on server configuration)
        InlineObject body = ; // InlineObject | 
        Boolean asynchronous = true; // Boolean | flag to control asynchronous/synchronous execution of doc_to_asfm job
        String invocationID = invocationID_example; // String | invocation identifier (optional)

        try {
            Job result = apiInstance.framaClang(dbName, key, body, asynchronous, invocationID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FramaClangApi#framaClang");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
FramaClangApi *apiInstance = [[FramaClangApi alloc] init];
String *dbName = dbName_example; // The project name from where to get source code/header files, the compile commands, and put the parsing results (Source code ASTs, Comments, and Annotations) (default to null)
String *key = key_example; // Access key to the PKM (optional, depending on server configuration) (default to null)
InlineObject *body = ; // 
Boolean *asynchronous = true; // flag to control asynchronous/synchronous execution of doc_to_asfm job (optional) (default to false)
String *invocationID = invocationID_example; // invocation identifier (optional) (optional) (default to null)

[apiInstance framaClangWith:dbName
    key:key
    body:body
    asynchronous:asynchronous
    invocationID:invocationID
              completionHandler: ^(Job output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var FramaClangRestfulApiForPkm = require('frama_clang_restful_api_for_pkm');

// Create an instance of the API class
var api = new FramaClangRestfulApiForPkm.FramaClangApi()
var dbName = dbName_example; // {String} The project name from where to get source code/header files, the compile commands, and put the parsing results (Source code ASTs, Comments, and Annotations)
var key = key_example; // {String} Access key to the PKM (optional, depending on server configuration)
var body = ; // {InlineObject} 
var opts = {
  'asynchronous': true, // {Boolean} flag to control asynchronous/synchronous execution of doc_to_asfm job
  'invocationID': invocationID_example // {String} invocation identifier (optional)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.framaClang(dbName, key, body, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class framaClangExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new FramaClangApi();
            var dbName = dbName_example;  // String | The project name from where to get source code/header files, the compile commands, and put the parsing results (Source code ASTs, Comments, and Annotations) (default to null)
            var key = key_example;  // String | Access key to the PKM (optional, depending on server configuration) (default to null)
            var body = new InlineObject(); // InlineObject | 
            var asynchronous = true;  // Boolean | flag to control asynchronous/synchronous execution of doc_to_asfm job (optional)  (default to false)
            var invocationID = invocationID_example;  // String | invocation identifier (optional) (optional)  (default to null)

            try {
                Job result = apiInstance.framaClang(dbName, key, body, asynchronous, invocationID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling FramaClangApi.framaClang: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\FramaClangApi();
$dbName = dbName_example; // String | The project name from where to get source code/header files, the compile commands, and put the parsing results (Source code ASTs, Comments, and Annotations)
$key = key_example; // String | Access key to the PKM (optional, depending on server configuration)
$body = ; // InlineObject | 
$asynchronous = true; // Boolean | flag to control asynchronous/synchronous execution of doc_to_asfm job
$invocationID = invocationID_example; // String | invocation identifier (optional)

try {
    $result = $api_instance->framaClang($dbName, $key, $body, $asynchronous, $invocationID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FramaClangApi->framaClang: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::FramaClangApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::FramaClangApi->new();
my $dbName = dbName_example; # String | The project name from where to get source code/header files, the compile commands, and put the parsing results (Source code ASTs, Comments, and Annotations)
my $key = key_example; # String | Access key to the PKM (optional, depending on server configuration)
my $body = WWW::OPenAPIClient::Object::InlineObject->new(); # InlineObject | 
my $asynchronous = true; # Boolean | flag to control asynchronous/synchronous execution of doc_to_asfm job
my $invocationID = invocationID_example; # String | invocation identifier (optional)

eval {
    my $result = $api_instance->framaClang(dbName => $dbName, key => $key, body => $body, asynchronous => $asynchronous, invocationID => $invocationID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FramaClangApi->framaClang: $@\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.FramaClangApi()
dbName = dbName_example # String | The project name from where to get source code/header files, the compile commands, and put the parsing results (Source code ASTs, Comments, and Annotations) (default to null)
key = key_example # String | Access key to the PKM (optional, depending on server configuration) (default to null)
body =  # InlineObject | 
asynchronous = true # Boolean | flag to control asynchronous/synchronous execution of doc_to_asfm job (optional) (default to false)
invocationID = invocationID_example # String | invocation identifier (optional) (optional) (default to null)

try:
    api_response = api_instance.frama_clang(dbName, key, body, asynchronous=asynchronous, invocationID=invocationID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FramaClangApi->framaClang: %s\n" % e)
extern crate FramaClangApi;

pub fn main() {
    let dbName = dbName_example; // String
    let key = key_example; // String
    let body = ; // InlineObject
    let asynchronous = true; // Boolean
    let invocationID = invocationID_example; // String

    let mut context = FramaClangApi::Context::default();
    let result = client.framaClang(dbName, key, body, asynchronous, invocationID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
dbName*
String
The project name from where to get source code/header files, the compile commands, and put the parsing results (Source code ASTs, Comments, and Annotations)
Required
Header parameters
Name Description
key*
String
Access key to the PKM (optional, depending on server configuration)
Required
Body parameters
Name Description
body *

Query parameters
Name Description
asynchronous
Boolean
flag to control asynchronous/synchronous execution of doc_to_asfm job
invocationID
String
invocation identifier (optional)

Responses

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

getJob

Get Frama-Clang Job. Getting a finished or failed job, unpublish it (it is no longer available)


/frama_clang/jobs/{jobId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://pkm-api_frama-clang_1:8082/frama_clang/jobs/{jobId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.FramaClangApi;

import java.io.File;
import java.util.*;

public class FramaClangApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        FramaClangApi apiInstance = new FramaClangApi();
        Integer jobId = 56; // Integer | Job identifier
        String key = key_example; // String | Access key to the PKM (optional, depending on server configuration)

        try {
            Job result = apiInstance.getJob(jobId, key);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FramaClangApi#getJob");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.FramaClangApi;

public class FramaClangApiExample {
    public static void main(String[] args) {
        FramaClangApi apiInstance = new FramaClangApi();
        Integer jobId = 56; // Integer | Job identifier
        String key = key_example; // String | Access key to the PKM (optional, depending on server configuration)

        try {
            Job result = apiInstance.getJob(jobId, key);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FramaClangApi#getJob");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
FramaClangApi *apiInstance = [[FramaClangApi alloc] init];
Integer *jobId = 56; // Job identifier (default to null)
String *key = key_example; // Access key to the PKM (optional, depending on server configuration) (default to null)

[apiInstance getJobWith:jobId
    key:key
              completionHandler: ^(Job output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var FramaClangRestfulApiForPkm = require('frama_clang_restful_api_for_pkm');

// Create an instance of the API class
var api = new FramaClangRestfulApiForPkm.FramaClangApi()
var jobId = 56; // {Integer} Job identifier
var key = key_example; // {String} Access key to the PKM (optional, depending on server configuration)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getJob(jobId, key, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getJobExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new FramaClangApi();
            var jobId = 56;  // Integer | Job identifier (default to null)
            var key = key_example;  // String | Access key to the PKM (optional, depending on server configuration) (default to null)

            try {
                Job result = apiInstance.getJob(jobId, key);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling FramaClangApi.getJob: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\FramaClangApi();
$jobId = 56; // Integer | Job identifier
$key = key_example; // String | Access key to the PKM (optional, depending on server configuration)

try {
    $result = $api_instance->getJob($jobId, $key);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FramaClangApi->getJob: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::FramaClangApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::FramaClangApi->new();
my $jobId = 56; # Integer | Job identifier
my $key = key_example; # String | Access key to the PKM (optional, depending on server configuration)

eval {
    my $result = $api_instance->getJob(jobId => $jobId, key => $key);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FramaClangApi->getJob: $@\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.FramaClangApi()
jobId = 56 # Integer | Job identifier (default to null)
key = key_example # String | Access key to the PKM (optional, depending on server configuration) (default to null)

try:
    api_response = api_instance.get_job(jobId, key)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FramaClangApi->getJob: %s\n" % e)
extern crate FramaClangApi;

pub fn main() {
    let jobId = 56; // Integer
    let key = key_example; // String

    let mut context = FramaClangApi::Context::default();
    let result = client.getJob(jobId, key, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
jobId*
Integer
Job identifier
Required
Header parameters
Name Description
key*
String
Access key to the PKM (optional, depending on server configuration)
Required

Responses

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String

Name Type Format Description
AccessMinusControlMinusAllowMinusOrigin String
AccessMinusControlMinusAllowMinusMethods String
AccessMinusControlMinusAllowMinusHeaders String