FramaCRestfulApiForPkm

FramaC

framaC

Runs Frama-C static program analyzer


/frama_c/{dbName}

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://pkm-api_frama-c_1:8081/frama_c/{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.FramaCApi;

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

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

        // Create an instance of the API class
        FramaCApi apiInstance = new FramaCApi();
        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) and/or the analysis results
        String key = key_example; // String | Access key to the PKM
        InlineObject body = ; // InlineObject | 
        Boolean asynchronous = true; // Boolean | flag to control asynchronous/synchronous execution of Frama-C job
        String invocationID = invocationID_example; // String | invocation identifier (optional)

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

public class FramaCApiExample {
    public static void main(String[] args) {
        FramaCApi apiInstance = new FramaCApi();
        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) and/or the analysis results
        String key = key_example; // String | Access key to the PKM
        InlineObject body = ; // InlineObject | 
        Boolean asynchronous = true; // Boolean | flag to control asynchronous/synchronous execution of Frama-C job
        String invocationID = invocationID_example; // String | invocation identifier (optional)

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


// Create an instance of the API class
FramaCApi *apiInstance = [[FramaCApi 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) and/or the analysis results (default to null)
String *key = key_example; // Access key to the PKM (default to null)
InlineObject *body = ; // 
Boolean *asynchronous = true; // flag to control asynchronous/synchronous execution of Frama-C job (optional) (default to false)
String *invocationID = invocationID_example; // invocation identifier (optional) (optional) (default to null)

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

// Create an instance of the API class
var api = new FramaCRestfulApiForPkm.FramaCApi()
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) and/or the analysis results
var key = key_example; // {String} Access key to the PKM
var body = ; // {InlineObject} 
var opts = {
  'asynchronous': true, // {Boolean} flag to control asynchronous/synchronous execution of Frama-C 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.framaC(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 framaCExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new FramaCApi();
            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) and/or the analysis results (default to null)
            var key = key_example;  // String | Access key to the PKM (default to null)
            var body = new InlineObject(); // InlineObject | 
            var asynchronous = true;  // Boolean | flag to control asynchronous/synchronous execution of Frama-C job (optional)  (default to false)
            var invocationID = invocationID_example;  // String | invocation identifier (optional) (optional)  (default to null)

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

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\FramaCApi();
$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) and/or the analysis results
$key = key_example; // String | Access key to the PKM
$body = ; // InlineObject | 
$asynchronous = true; // Boolean | flag to control asynchronous/synchronous execution of Frama-C job
$invocationID = invocationID_example; // String | invocation identifier (optional)

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::FramaCApi->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) and/or the analysis results
my $key = key_example; # String | Access key to the PKM
my $body = WWW::OPenAPIClient::Object::InlineObject->new(); # InlineObject | 
my $asynchronous = true; # Boolean | flag to control asynchronous/synchronous execution of Frama-C job
my $invocationID = invocationID_example; # String | invocation identifier (optional)

eval {
    my $result = $api_instance->framaC(dbName => $dbName, key => $key, body => $body, asynchronous => $asynchronous, invocationID => $invocationID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FramaCApi->framaC: $@\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.FramaCApi()
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) and/or the analysis results (default to null)
key = key_example # String | Access key to the PKM (default to null)
body =  # InlineObject | 
asynchronous = true # Boolean | flag to control asynchronous/synchronous execution of Frama-C job (optional) (default to false)
invocationID = invocationID_example # String | invocation identifier (optional) (optional) (default to null)

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

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 = FramaCApi::Context::default();
    let result = client.framaC(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) and/or the analysis results
Required
Header parameters
Name Description
key*
String
Access key to the PKM
Required
Body parameters
Name Description
body *

Query parameters
Name Description
asynchronous
Boolean
flag to control asynchronous/synchronous execution of Frama-C 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-C Job. Getting a finished or failed job, unpublish it (it is no longer available)


/frama_c/jobs/{jobId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://pkm-api_frama-c_1:8081/frama_c/jobs/{jobId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.FramaCApi;

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

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

        // Create an instance of the API class
        FramaCApi apiInstance = new FramaCApi();
        Integer jobId = 56; // Integer | Job identifier
        String key = key_example; // String | Access key to the PKM

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

public class FramaCApiExample {
    public static void main(String[] args) {
        FramaCApi apiInstance = new FramaCApi();
        Integer jobId = 56; // Integer | Job identifier
        String key = key_example; // String | Access key to the PKM

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


// Create an instance of the API class
FramaCApi *apiInstance = [[FramaCApi alloc] init];
Integer *jobId = 56; // Job identifier (default to null)
String *key = key_example; // Access key to the PKM (default to null)

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

// Create an instance of the API class
var api = new FramaCRestfulApiForPkm.FramaCApi()
var jobId = 56; // {Integer} Job identifier
var key = key_example; // {String} Access key to the PKM

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 FramaCApi();
            var jobId = 56;  // Integer | Job identifier (default to null)
            var key = key_example;  // String | Access key to the PKM (default to null)

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

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\FramaCApi();
$jobId = 56; // Integer | Job identifier
$key = key_example; // String | Access key to the PKM

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

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

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

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

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

    let mut context = FramaCApi::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
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