Skip to content

Latest commit

 

History

History
393 lines (293 loc) · 15.9 KB

CommandsApi.md

File metadata and controls

393 lines (293 loc) · 15.9 KB

jcapiv1.CommandsApi

All URIs are relative to https://console.jumpcloud.com/api

Method HTTP request Description
command_file_get GET /files/command/{id} Get a Command File
commands_delete DELETE /commands/{id} Delete a Command
commands_get GET /commands/{id} List an individual Command
commands_list GET /commands List All Commands
commands_post POST /commands Create A Command
commands_put PUT /commands/{id} Update a Command

command_file_get

Commandfilereturn command_file_get(id, content_type, accept, fields=fields, limit=limit, skip=skip, x_org_id=x_org_id)

Get a Command File

This endpoint returns the uploaded file(s) associated with a specific command. #### Sample Request curl -X GET https://console.jumpcloud.com/api/files/command/{commandID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

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

# Configure API key authorization: x-api-key
configuration = jcapiv1.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv1.CommandsApi(jcapiv1.ApiClient(configuration))
id = 'id_example' # str | 
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
fields = '' # str | Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned.  (optional) (default to )
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
x_org_id = '' # str |  (optional) (default to )

try:
    # Get a Command File
    api_response = api_instance.command_file_get(id, content_type, accept, fields=fields, limit=limit, skip=skip, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommandsApi->command_file_get: %s\n" % e)

Parameters

Name Type Description Notes
id str
content_type str [default to application/json]
accept str [default to application/json]
fields str Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned. [optional] [default to ]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
skip int The offset into the records to return. [optional] [default to 0]
x_org_id str [optional] [default to ]

Return type

Commandfilereturn

Authorization

x-api-key

HTTP request headers

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

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

commands_delete

commands_delete(id, content_type, accept, x_org_id=x_org_id)

Delete a Command

This endpoint deletes a specific command based on the Command ID. #### Sample Request curl -X DELETE https://console.jumpcloud.com/api/commands/{CommandID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

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

# Configure API key authorization: x-api-key
configuration = jcapiv1.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv1.CommandsApi(jcapiv1.ApiClient(configuration))
id = 'id_example' # str | 
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
x_org_id = '' # str |  (optional) (default to )

try:
    # Delete a Command
    api_instance.commands_delete(id, content_type, accept, x_org_id=x_org_id)
except ApiException as e:
    print("Exception when calling CommandsApi->commands_delete: %s\n" % e)

Parameters

Name Type Description Notes
id str
content_type str [default to application/json]
accept str [default to application/json]
x_org_id str [optional] [default to ]

Return type

void (empty response body)

Authorization

x-api-key

HTTP request headers

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

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

commands_get

Command commands_get(id, content_type, accept, fields=fields, filter=filter, x_org_id=x_org_id)

List an individual Command

This endpoint returns a specific command based on the command ID. #### Sample Request curl -X GET https://console.jumpcloud.com/api/commands/{CommandID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

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

# Configure API key authorization: x-api-key
configuration = jcapiv1.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv1.CommandsApi(jcapiv1.ApiClient(configuration))
id = 'id_example' # str | 
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
fields = '' # str | Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned.  (optional) (default to )
filter = 'filter_example' # str | A filter to apply to the query. (optional)
x_org_id = '' # str |  (optional) (default to )

try:
    # List an individual Command
    api_response = api_instance.commands_get(id, content_type, accept, fields=fields, filter=filter, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommandsApi->commands_get: %s\n" % e)

Parameters

Name Type Description Notes
id str
content_type str [default to application/json]
accept str [default to application/json]
fields str Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned. [optional] [default to ]
filter str A filter to apply to the query. [optional]
x_org_id str [optional] [default to ]

Return type

Command

Authorization

x-api-key

HTTP request headers

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

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

commands_list

Commandslist commands_list(content_type, accept, skip=skip, fields=fields, limit=limit, sort=sort, filter=filter, x_org_id=x_org_id)

List All Commands

This endpoint returns all commands. #### Sample Request curl -X GET https://console.jumpcloud.com/api/commands/ \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}'

Example

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

# Configure API key authorization: x-api-key
configuration = jcapiv1.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv1.CommandsApi(jcapiv1.ApiClient(configuration))
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
skip = 0 # int | The offset into the records to return. (optional) (default to 0)
fields = '' # str | Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned.  (optional) (default to )
limit = 10 # int | The number of records to return at once. Limited to 100. (optional) (default to 10)
sort = '' # str | Use space separated sort parameters to sort the collection. Default sort is ascending. Prefix with `-` to sort descending.  (optional) (default to )
filter = 'filter_example' # str | A filter to apply to the query. (optional)
x_org_id = '' # str |  (optional) (default to )

try:
    # List All Commands
    api_response = api_instance.commands_list(content_type, accept, skip=skip, fields=fields, limit=limit, sort=sort, filter=filter, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommandsApi->commands_list: %s\n" % e)

Parameters

Name Type Description Notes
content_type str [default to application/json]
accept str [default to application/json]
skip int The offset into the records to return. [optional] [default to 0]
fields str Use a space seperated string of field parameters to include the data in the response. If omitted, the default list of fields will be returned. [optional] [default to ]
limit int The number of records to return at once. Limited to 100. [optional] [default to 10]
sort str Use space separated sort parameters to sort the collection. Default sort is ascending. Prefix with `-` to sort descending. [optional] [default to ]
filter str A filter to apply to the query. [optional]
x_org_id str [optional] [default to ]

Return type

Commandslist

Authorization

x-api-key

HTTP request headers

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

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

commands_post

Command commands_post(content_type, accept, body=body, x_org_id=x_org_id)

Create A Command

This endpoint allows you to create a new command. #### Sample Request curl -X POST https://console.jumpcloud.com/api/commands/ \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"name\":\"Test API Command\", \"command\":\"String\", \"user\":\"{UserID}\", \"schedule\":\"\", \"timeout\":\"100\" }'

Example

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

# Configure API key authorization: x-api-key
configuration = jcapiv1.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv1.CommandsApi(jcapiv1.ApiClient(configuration))
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
body = jcapiv1.Command() # Command |  (optional)
x_org_id = '' # str |  (optional) (default to )

try:
    # Create A Command
    api_response = api_instance.commands_post(content_type, accept, body=body, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommandsApi->commands_post: %s\n" % e)

Parameters

Name Type Description Notes
content_type str [default to application/json]
accept str [default to application/json]
body Command [optional]
x_org_id str [optional] [default to ]

Return type

Command

Authorization

x-api-key

HTTP request headers

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

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

commands_put

Command commands_put(id, content_type, accept, body=body, x_org_id=x_org_id)

Update a Command

This endpoint Updates a command based on the command ID and returns the modified command record. #### Sample Request curl -X PUT https://console.jumpcloud.com/api/commands/{CommandID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"name\":\"Test API Command\", \"command\":\"String\", \"user\":\"{UserID}\", \"schedule\":\"\", \"timeout\":\"100\" }'

Example

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

# Configure API key authorization: x-api-key
configuration = jcapiv1.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = jcapiv1.CommandsApi(jcapiv1.ApiClient(configuration))
id = 'id_example' # str | 
content_type = 'application/json' # str |  (default to application/json)
accept = 'application/json' # str |  (default to application/json)
body = jcapiv1.Command() # Command |  (optional)
x_org_id = '' # str |  (optional) (default to )

try:
    # Update a Command
    api_response = api_instance.commands_put(id, content_type, accept, body=body, x_org_id=x_org_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommandsApi->commands_put: %s\n" % e)

Parameters

Name Type Description Notes
id str
content_type str [default to application/json]
accept str [default to application/json]
body Command [optional]
x_org_id str [optional] [default to ]

Return type

Command

Authorization

x-api-key

HTTP request headers

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

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