getAssets
List assets
Retrieve a paginated list of the assets in your workspace, newest first
/external/v1/assets
Usage and SDK Samples
curl -X GET \
-H "Authorization: Bearer [[accessToken]]" \
-H "Accept: application/json" \
"https://app.presencewave.com/external/v1/assets?type=type_example&page=56&size=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AssetsApi;
import java.io.File;
import java.util.*;
public class AssetsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setBearerToken("BEARER TOKEN");
// Create an instance of the API class
AssetsApi apiInstance = new AssetsApi();
String type = type_example; // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
Integer page = 56; // Integer | Page number (0-based)
Integer size = 56; // Integer | Number of items per page (max 100)
try {
getAssets_200_response result = apiInstance.getAssets(type, page, size);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AssetsApi#getAssets");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String type = new String(); // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
final Integer page = new Integer(); // Integer | Page number (0-based)
final Integer size = new Integer(); // Integer | Number of items per page (max 100)
try {
final result = await api_instance.getAssets(type, page, size);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->getAssets: $e\n');
}
import org.openapitools.client.api.AssetsApi;
public class AssetsApiExample {
public static void main(String[] args) {
AssetsApi apiInstance = new AssetsApi();
String type = type_example; // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
Integer page = 56; // Integer | Page number (0-based)
Integer size = 56; // Integer | Number of items per page (max 100)
try {
getAssets_200_response result = apiInstance.getAssets(type, page, size);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AssetsApi#getAssets");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Create an instance of the API class
AssetsApi *apiInstance = [[AssetsApi alloc] init];
String *type = type_example; // File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
(optional) (default to all)
Integer *page = 56; // Page number (0-based) (optional) (default to 0)
Integer *size = 56; // Number of items per page (max 100) (optional) (default to 20)
// List assets
[apiInstance getAssetsWith:type
page:page
size:size
completionHandler: ^(getAssets_200_response output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var PresenceWaveExternalApi = require('presence_wave_external_api');
var defaultClient = PresenceWaveExternalApi.ApiClient.instance;
// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.accessToken = "YOUR ACCESS TOKEN";
// Create an instance of the API class
var api = new PresenceWaveExternalApi.AssetsApi()
var opts = {
'type': type_example, // {String} File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
'page': 56, // {Integer} Page number (0-based)
'size': 56 // {Integer} Number of items per page (max 100)
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAssets(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class getAssetsExample
{
public void main()
{
// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Create an instance of the API class
var apiInstance = new AssetsApi();
var type = type_example; // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
(optional) (default to all)
var page = 56; // Integer | Page number (0-based) (optional) (default to 0)
var size = 56; // Integer | Number of items per page (max 100) (optional) (default to 20)
try {
// List assets
getAssets_200_response result = apiInstance.getAssets(type, page, size);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling AssetsApi.getAssets: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (opaque) access token for authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AssetsApi();
$type = type_example; // String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
$page = 56; // Integer | Page number (0-based)
$size = 56; // Integer | Number of items per page (max 100)
try {
$result = $api_instance->getAssets($type, $page, $size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssetsApi->getAssets: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AssetsApi;
# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AssetsApi->new();
my $type = type_example; # String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
my $page = 56; # Integer | Page number (0-based)
my $size = 56; # Integer | Number of items per page (max 100)
eval {
my $result = $api_instance->getAssets(type => $type, page => $page, size => $size);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AssetsApi->getAssets: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure Bearer (opaque) access token for authorization: ApiKeyAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Create an instance of the API class
api_instance = openapi_client.AssetsApi()
type = type_example # String | File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
(optional) (default to all)
page = 56 # Integer | Page number (0-based) (optional) (default to 0)
size = 56 # Integer | Number of items per page (max 100) (optional) (default to 20)
try:
# List assets
api_response = api_instance.get_assets(type=type, page=page, size=size)
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetsApi->getAssets: %s\n" % e)
extern crate AssetsApi;
pub fn main() {
let type = type_example; // String
let page = 56; // Integer
let size = 56; // Integer
let mut context = AssetsApi::Context::default();
let result = client.getAssets(type, page, size, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| type |
String
File-type filter. `document` covers PDF, Word, Excel, text and presentation files;
`other` is everything that is neither an image nor a document.
|
| page |
Integer
Page number (0-based)
|
| size |
Integer
Number of items per page (max 100)
|