Get information about the application Aspose.Words REST API includes a GetInfo
method that allows developers to retrieve information about the application, such as the version number and build date.
This method can be useful for troubleshooting and for keeping track of which version of the application is in use. It can also be used to verify that the application is up-to-date.
Server
Method
Endpoint
https://api.aspose.cloud/v4.0
GET
/words/info
Note : to access this REST API, you need to register and get personal credentials. Use the ‘
Quick Start ’ guide to go through the procedure in a couple of minutes.
Let’s look at practical examples of using the web service. You can do this both with cURL and Postman utilities, and from your code in various programming languages: Python, Java, JavaScript, C#, PHP, C++, Go, Ruby, Swift, Dart.
How to retrieve information about the application with cURL or Postman
One of the easiest and fastest ways to call a REST API is to use cURL or Postman:
cURL Request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -v "https://api.aspose.cloud/v4.0/words/info" \
-X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ####################" \
To get a JWT token use these instructions
Postman Request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{
"info": {
"name": "GetInfo",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"auth": {
"type": "oauth2",
"oauth2": [
{
"key": "clientSecret",
"value": "{{CLIENT_SECRET}}",
"type": "string"
},
{
"key": "clientId",
"value": "{{CLIENT_ID}}",
"type": "string"
},
{
"key": "addTokenTo",
"value": "header",
"type": "string"
},
{
"key": "client_authentication",
"value": "body",
"type": "string"
},
{
"key": "accessTokenUrl",
"value": "https://api.aspose.cloud/connect/token",
"type": "string"
},
{
"key": "grant_type",
"value": "client_credentials",
"type": "string"
},
{
"key": "tokenName",
"value": "Access Token",
"type": "string"
}
]
},
"item": [
{
"name": "request",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.aspose.cloud/v4.0/words/info",
"protocol": "https",
"host": [
"api",
"aspose",
"cloud"
],
"path": [
"v4.0",
"words",
"info"
],
"query": [
]
}
},
"response": []
}
],
"variable": [
]
}
To get a JWT token use these instructions
Using SDK is the quickest way to speed up the development. Please take a look at the provided code examples to quickly call this web service from your favourite programming language:
Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os
import asposewordscloud
import asposewordscloud.models.requests
from asposewordscloud.rest import ApiException
from shutil import copyfile
words_api = WordsApi(client_id = '####-####-####-####-####', client_secret = '##################')
request = asposewordscloud.models.requests.GetInfoRequest()
words_api.get_info(request)
Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.aspose.words.cloud.*;
import com.aspose.words.cloud.api.*;
import com.aspose.words.cloud.model.*;
import com.aspose.words.cloud.model.requests.*;
import com.aspose.words.cloud.model.responses.*;
import java.nio.file.Files;
import java.nio.file.Paths;
ApiClient apiClient = new ApiClient(/*clientId*/ "####-####-####-####-####", /*clientSecret*/ "##################", null);
WordsApi wordsApi = new WordsApi(apiClient);
GetInfoRequest request = new GetInfoRequest();
wordsApi.getInfo(request);
Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs";
const clientId = "####-####-####-####-####";
const secret = "##################";
const wordsApi = new WordsApi(clientId, secret);
const request = new model.GetInfoRequest({
});
wordsApi.getInfo(request)
.then((requestResult) => {
// tslint:disable-next-line:no-console
console.log("Result of request: ", requestResult);
});
C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Aspose.Words.Cloud.Sdk;
using Aspose.Words.Cloud.Sdk.Model;
using Aspose.Words.Cloud.Sdk.Model.Requests;
var config = new Configuration { ClientId = "####-####-####-####-####", ClientSecret = "##################" };
var wordsApi = new WordsApi(config);
var request = new GetInfoRequest();
await wordsApi.GetInfo(request);
PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php
use Aspose\Words\WordsApi;
use Aspose\Words\Model\Requests\{GetInfoRequest};
$clientId = '####-####-####-####-####';
$secret = '##################';
$wordsApi = new WordsApi($clientId, $secret);
$request = new GetInfoRequest();
$wordsApi->getInfo($request);
C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "aspose_words_cloud.h"
using namespace aspose::words::cloud;
auto config = std::make_shared<ApiConfiguration>(/*clientId*/ L"####-####-####-####-####", /*clientSecret*/ L"##################");
auto wordsApi = std::make_shared<WordsApi>(config);
std::shared_ptr<requests::GetInfoRequest> request(
new requests::GetInfoRequest());
wordsApi->getInfo(request);
Go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{
"ClientId" : " ####-####-####-####-####" ,
"ClientSecret" : " ##################" ,
"BaseUrl" : " https://api.aspose.cloud"
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import (
"os"
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models")
config, _ := models.NewConfiguration("config.json")
wordsApi, ctx, _ := api.CreateWordsApi(config)
request := &models.GetInfoRequest{
}
_, _, _ = wordsApi.GetInfo(ctx, request)
Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'aspose_words_cloud'
AsposeWordsCloud.configure do |config|
config.client_data['ClientId'] = '####-####-####-####-####'
config.client_data['ClientSecret'] = '##################'
end
@words_api = WordsAPI.new
request = GetInfoRequest.new()
@words_api.get_info(request)
Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AsposeWordsCloud
let config = Configuration(clientId: "####-####-####-####-####", clientSecret: "##################");
let api = try WordsAPI(configuration: config);
let request = GetInfoRequest();
_ = try api.getInfo(request: request);
Dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io';
import 'package:aspose_words_cloud/aspose_words_cloud.dart';
final clientId = "####-####-####-####-####";
final clientSecret = "##################";
final config = Configuration(clientId, clientSecret);
final wordsApi = WordsApi(config);
final request = GetInfoRequest();
await wordsApi.getInfo(request);
See Also
GitHub repository — explore Aspose.Words Cloud SDK Family. These software libraries take care of all low-level document-processing details.