deleteArtifact
Delete artifact
/projects/{project_id}/refs/{ref_id}/artifacts/{artifact_id}
Usage and SDK Samples
curl -X DELETE -H "Authorization: Basic [[basicHash]]" "https://localhost/alfresco/service/projects/{project_id}/refs/{ref_id}/artifacts/{artifact_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ArtifactApi;
import java.io.File;
import java.util.*;
public class ArtifactApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
// Configure API key authorization: Ticket
ApiKeyAuth Ticket = (ApiKeyAuth) defaultClient.getAuthentication("Ticket");
Ticket.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Ticket.setApiKeyPrefix("Token");
ArtifactApi apiInstance = new ArtifactApi();
String projectId = projectId_example; // String | project identifier
String refId = refId_example; // String | ref identifier
String artifactId = artifactId_example; // String | artifact identifier
try {
Artifacts result = apiInstance.deleteArtifact(projectId, refId, artifactId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ArtifactApi#deleteArtifact");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ArtifactApi;
public class ArtifactApiExample {
public static void main(String[] args) {
ArtifactApi apiInstance = new ArtifactApi();
String projectId = projectId_example; // String | project identifier
String refId = refId_example; // String | ref identifier
String artifactId = artifactId_example; // String | artifact identifier
try {
Artifacts result = apiInstance.deleteArtifact(projectId, refId, artifactId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ArtifactApi#deleteArtifact");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: Basic)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
// Configure API key authorization: (authentication scheme: Ticket)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"alf_ticket"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"alf_ticket"];
String *projectId = projectId_example; // project identifier
String *refId = refId_example; // ref identifier
String *artifactId = artifactId_example; // artifact identifier
ArtifactApi *apiInstance = [[ArtifactApi alloc] init];
// Delete artifact
[apiInstance deleteArtifactWith:projectId
refId:refId
artifactId:artifactId
completionHandler: ^(Artifacts output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ModelManagementService = require('model_management_service');
var defaultClient = ModelManagementService.ApiClient.instance;
// Configure HTTP basic authorization: Basic
var Basic = defaultClient.authentications['Basic'];
Basic.username = 'YOUR USERNAME'
Basic.password = 'YOUR PASSWORD'
// Configure API key authorization: Ticket
var Ticket = defaultClient.authentications['Ticket'];
Ticket.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Ticket.apiKeyPrefix['alf_ticket'] = "Token"
var api = new ModelManagementService.ArtifactApi()
var projectId = projectId_example; // {String} project identifier
var refId = refId_example; // {String} ref identifier
var artifactId = artifactId_example; // {String} artifact identifier
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.deleteArtifact(projectId, refId, artifactId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class deleteArtifactExample
{
public void main()
{
// Configure HTTP basic authorization: Basic
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
// Configure API key authorization: Ticket
Configuration.Default.ApiKey.Add("alf_ticket", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("alf_ticket", "Bearer");
var apiInstance = new ArtifactApi();
var projectId = projectId_example; // String | project identifier
var refId = refId_example; // String | ref identifier
var artifactId = artifactId_example; // String | artifact identifier
try
{
// Delete artifact
Artifacts result = apiInstance.deleteArtifact(projectId, refId, artifactId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ArtifactApi.deleteArtifact: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: Basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
// Configure API key authorization: Ticket
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('alf_ticket', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('alf_ticket', 'Bearer');
$api_instance = new Swagger\Client\Api\ArtifactApi();
$projectId = projectId_example; // String | project identifier
$refId = refId_example; // String | ref identifier
$artifactId = artifactId_example; // String | artifact identifier
try {
$result = $api_instance->deleteArtifact($projectId, $refId, $artifactId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ArtifactApi->deleteArtifact: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ArtifactApi;
# Configure HTTP basic authorization: Basic
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';
# Configure API key authorization: Ticket
$WWW::SwaggerClient::Configuration::api_key->{'alf_ticket'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'alf_ticket'} = "Bearer";
my $api_instance = WWW::SwaggerClient::ArtifactApi->new();
my $projectId = projectId_example; # String | project identifier
my $refId = refId_example; # String | ref identifier
my $artifactId = artifactId_example; # String | artifact identifier
eval {
my $result = $api_instance->deleteArtifact(projectId => $projectId, refId => $refId, artifactId => $artifactId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ArtifactApi->deleteArtifact: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: Basic
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: Ticket
swagger_client.configuration.api_key['alf_ticket'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['alf_ticket'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.ArtifactApi()
projectId = projectId_example # String | project identifier
refId = refId_example # String | ref identifier
artifactId = artifactId_example # String | artifact identifier
try:
# Delete artifact
api_response = api_instance.delete_artifact(projectId, refId, artifactId)
pprint(api_response)
except ApiException as e:
print("Exception when calling ArtifactApi->deleteArtifact: %s\n" % e)
Parameters
Name | Description |
---|---|
project_id* |
String
project identifier
Required
|
ref_id* |
String
ref identifier
Required
|
artifact_id* |
String
artifact identifier
Required
|