articleRenamePut
Rename an article.
Rename an article. This is used to rename an article number. The new article number must not exist.
/articleRename
Usage and SDK Samples
curl -X PUT \
-H "Authorization: Bearer [[accessToken]]" \
"https://restapi.sharkwms.com/1.3/articleRename?articleNumber=articleNumber_example&newArticleNumber=newArticleNumber_example&owner=owner_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ArticlesApi;
import java.io.File;
import java.util.*;
public class ArticlesApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure Bearer (JWT) access token for authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
// Create an instance of the API class
ArticlesApi apiInstance = new ArticlesApi();
String articleNumber = articleNumber_example; // String | Specify the article number to find. A procent sign can be used for pattern matching.
String newArticleNumber = newArticleNumber_example; // String | Specify the new article number.
String owner = owner_example; // String | For sites with multiple owners of the articles, specify the actually owner.
try {
apiInstance.articleRenamePut(articleNumber, newArticleNumber, owner);
} catch (ApiException e) {
System.err.println("Exception when calling ArticlesApi#articleRenamePut");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String articleNumber = new String(); // String | Specify the article number to find. A procent sign can be used for pattern matching.
final String newArticleNumber = new String(); // String | Specify the new article number.
final String owner = new String(); // String | For sites with multiple owners of the articles, specify the actually owner.
try {
final result = await api_instance.articleRenamePut(articleNumber, newArticleNumber, owner);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->articleRenamePut: $e\n');
}
import org.openapitools.client.api.ArticlesApi;
public class ArticlesApiExample {
public static void main(String[] args) {
ArticlesApi apiInstance = new ArticlesApi();
String articleNumber = articleNumber_example; // String | Specify the article number to find. A procent sign can be used for pattern matching.
String newArticleNumber = newArticleNumber_example; // String | Specify the new article number.
String owner = owner_example; // String | For sites with multiple owners of the articles, specify the actually owner.
try {
apiInstance.articleRenamePut(articleNumber, newArticleNumber, owner);
} catch (ApiException e) {
System.err.println("Exception when calling ArticlesApi#articleRenamePut");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure Bearer (JWT) access token for authorization: bearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Create an instance of the API class
ArticlesApi *apiInstance = [[ArticlesApi alloc] init];
String *articleNumber = articleNumber_example; // Specify the article number to find. A procent sign can be used for pattern matching. (optional) (default to null)
String *newArticleNumber = newArticleNumber_example; // Specify the new article number. (optional) (default to null)
String *owner = owner_example; // For sites with multiple owners of the articles, specify the actually owner. (optional) (default to null)
// Rename an article.
[apiInstance articleRenamePutWith:articleNumber
newArticleNumber:newArticleNumber
owner:owner
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var SharkWmsRestapiVersion13 = require('shark_wms_restapi_version_1_3');
var defaultClient = SharkWmsRestapiVersion13.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN";
// Create an instance of the API class
var api = new SharkWmsRestapiVersion13.ArticlesApi()
var opts = {
'articleNumber': articleNumber_example, // {String} Specify the article number to find. A procent sign can be used for pattern matching.
'newArticleNumber': newArticleNumber_example, // {String} Specify the new article number.
'owner': owner_example // {String} For sites with multiple owners of the articles, specify the actually owner.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.articleRenamePut(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class articleRenamePutExample
{
public void main()
{
// Configure Bearer (JWT) access token for authorization: bearerAuth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Create an instance of the API class
var apiInstance = new ArticlesApi();
var articleNumber = articleNumber_example; // String | Specify the article number to find. A procent sign can be used for pattern matching. (optional) (default to null)
var newArticleNumber = newArticleNumber_example; // String | Specify the new article number. (optional) (default to null)
var owner = owner_example; // String | For sites with multiple owners of the articles, specify the actually owner. (optional) (default to null)
try {
// Rename an article.
apiInstance.articleRenamePut(articleNumber, newArticleNumber, owner);
} catch (Exception e) {
Debug.Print("Exception when calling ArticlesApi.articleRenamePut: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) access token for authorization: bearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ArticlesApi();
$articleNumber = articleNumber_example; // String | Specify the article number to find. A procent sign can be used for pattern matching.
$newArticleNumber = newArticleNumber_example; // String | Specify the new article number.
$owner = owner_example; // String | For sites with multiple owners of the articles, specify the actually owner.
try {
$api_instance->articleRenamePut($articleNumber, $newArticleNumber, $owner);
} catch (Exception $e) {
echo 'Exception when calling ArticlesApi->articleRenamePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ArticlesApi;
# Configure Bearer (JWT) access token for authorization: bearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ArticlesApi->new();
my $articleNumber = articleNumber_example; # String | Specify the article number to find. A procent sign can be used for pattern matching.
my $newArticleNumber = newArticleNumber_example; # String | Specify the new article number.
my $owner = owner_example; # String | For sites with multiple owners of the articles, specify the actually owner.
eval {
$api_instance->articleRenamePut(articleNumber => $articleNumber, newArticleNumber => $newArticleNumber, owner => $owner);
};
if ($@) {
warn "Exception when calling ArticlesApi->articleRenamePut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure Bearer (JWT) access token for authorization: bearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Create an instance of the API class
api_instance = openapi_client.ArticlesApi()
articleNumber = articleNumber_example # String | Specify the article number to find. A procent sign can be used for pattern matching. (optional) (default to null)
newArticleNumber = newArticleNumber_example # String | Specify the new article number. (optional) (default to null)
owner = owner_example # String | For sites with multiple owners of the articles, specify the actually owner. (optional) (default to null)
try:
# Rename an article.
api_instance.article_rename_put(articleNumber=articleNumber, newArticleNumber=newArticleNumber, owner=owner)
except ApiException as e:
print("Exception when calling ArticlesApi->articleRenamePut: %s\n" % e)
extern crate ArticlesApi;
pub fn main() {
let articleNumber = articleNumber_example; // String
let newArticleNumber = newArticleNumber_example; // String
let owner = owner_example; // String
let mut context = ArticlesApi::Context::default();
let result = client.articleRenamePut(articleNumber, newArticleNumber, owner, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| articleNumber |
String
Specify the article number to find. A procent sign can be used for pattern matching.
|
| newArticleNumber |
String
Specify the new article number.
|
| owner |
String
For sites with multiple owners of the articles, specify the actually owner.
|