Skip to content

Latest commit

 

History

History
168 lines (113 loc) · 4.56 KB

AssetsApi.md

File metadata and controls

168 lines (113 loc) · 4.56 KB

nexuscli.AssetsApi

All URIs are relative to https://localhost/service/siesta/

Method HTTP request Description
delete_asset DELETE /rest/beta/assets/{id} Delete a single asset
get_asset_by_id GET /rest/beta/assets/{id} Get a single asset
get_assets GET /rest/beta/assets List assets

delete_asset

delete_asset(id)

Delete a single asset

Example

from __future__ import print_function
import time
import nexuscli
from nexuscli.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
nexuscli.configuration.username = 'YOUR_USERNAME'
nexuscli.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = nexuscli.AssetsApi()
id = 'id_example' # str | Id of the asset to delete

try: 
    # Delete a single asset
    api_instance.delete_asset(id)
except ApiException as e:
    print("Exception when calling AssetsApi->delete_asset: %s\n" % e)

Parameters

Name Type Description Notes
id str Id of the asset to delete

Return type

void (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_asset_by_id

AssetXO get_asset_by_id(id)

Get a single asset

Example

from __future__ import print_function
import time
import nexuscli
from nexuscli.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
nexuscli.configuration.username = 'YOUR_USERNAME'
nexuscli.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = nexuscli.AssetsApi()
id = 'id_example' # str | Id of the asset to get

try: 
    # Get a single asset
    api_response = api_instance.get_asset_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssetsApi->get_asset_by_id: %s\n" % e)

Parameters

Name Type Description Notes
id str Id of the asset to get

Return type

AssetXO

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_assets

PageAssetXO get_assets(repository_id, continuation_token=continuation_token)

List assets

Example

from __future__ import print_function
import time
import nexuscli
from nexuscli.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
nexuscli.configuration.username = 'YOUR_USERNAME'
nexuscli.configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = nexuscli.AssetsApi()
repository_id = 'repository_id_example' # str | ID of the repository from which you would like to retrieve assets.
continuation_token = 'continuation_token_example' # str | A token returned by a prior request. If present, the next page of results are returned (optional)

try: 
    # List assets
    api_response = api_instance.get_assets(repository_id, continuation_token=continuation_token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssetsApi->get_assets: %s\n" % e)

Parameters

Name Type Description Notes
repository_id str ID of the repository from which you would like to retrieve assets.
continuation_token str A token returned by a prior request. If present, the next page of results are returned [optional]

Return type

PageAssetXO

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]