Skip to content

Latest commit

 

History

History
1064 lines (755 loc) · 38.2 KB

ACDevicesManagementApi.md

File metadata and controls

1064 lines (755 loc) · 38.2 KB

ACDevicesManagementApi

All URIs are relative to https://api.artik.cloud/v1.1

Method HTTP request Description
createTasks POST /devicemgmt/tasks Create a new task for one or more devices
deleteServerProperties DELETE /devicemgmt/devices/{did}/serverproperties Deletes a device's properties.
getAllByDid GET /devicemgmt/devices/{did}/tasks Returns the list of tasks for a particular device id with optional status filter.
getAllPendingTasksByDid GET /devicemgmt/devices/{did}/pendingtasks Returns the list of pending tasks for a particular device id.
getDeviceTypesInfo GET /devicemgmt/devicetypes/{dtid} Read a device type device management information.
getManifestProperties GET /devicemgmt/devicetypes/{dtid}/manifest/properties Get a device type's device management manifest properties
getProperties GET /devicemgmt/devices/{did}/properties Read a device's properties.
getStatuses GET /devicemgmt/tasks/{tid}/statuses Returns the details and status of a task id and the individual statuses of each device id in the list.
getStatusesHistory GET /devicemgmt/tasks/{tid}/statuses/history Returns the history of the status changes for a specific task id, or for a specific device id in that task.
getTaskByID GET /devicemgmt/tasks/{tid} Returns the details and global status of a specific task id.
getTasks GET /devicemgmt/tasks Returns the all the tasks for a device type.
notifyAboutAcceptance POST /devicemgmt/tasks/{tid}/devices/{did}/acceptance Notify/Inform about task acceptance status
queryProperties GET /devicemgmt/devices/properties Query device properties across devices.
updateDeviceTypesInfo PUT /devicemgmt/devicetypes/{dtid} Updates a device type information
updateServerProperties POST /devicemgmt/devices/{did}/serverproperties Updates a device's server properties.
updateTask PUT /devicemgmt/tasks/{tid} Updates a task for all devices - For now just allows changing the state to cancelled.
updateTaskForDevice PUT /devicemgmt/tasks/{tid}/devices/{did} Updates a task for a specific device - For now just allows changing the state to cancelled.

createTasks

-(NSURLSessionTask*) createTasksWithTaskPayload: (ACTaskRequest*) taskPayload
        completionHandler: (void (^)(ACTaskEnvelope* output, NSError* error)) handler;

Create a new task for one or more devices

Create a new task for one or more devices

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


ACTaskRequest* taskPayload = [[ACTaskRequest alloc] init]; // Task object to be created

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Create a new task for one or more devices
[apiInstance createTasksWithTaskPayload:taskPayload
          completionHandler: ^(ACTaskEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->createTasks: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
taskPayload ACTaskRequest* Task object to be created

Return type

ACTaskEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

deleteServerProperties

-(NSURLSessionTask*) deleteServerPropertiesWithDid: (NSString*) did
        completionHandler: (void (^)(ACMetadataEnvelope* output, NSError* error)) handler;

Deletes a device's properties.

Deletes a device's properties.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* did = @"did_example"; // Device ID.

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Deletes a device's properties.
[apiInstance deleteServerPropertiesWithDid:did
          completionHandler: ^(ACMetadataEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->deleteServerProperties: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
did NSString* Device ID.

Return type

ACMetadataEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

getAllByDid

-(NSURLSessionTask*) getAllByDidWithDid: (NSString*) did
    count: (NSNumber*) count
    offset: (NSNumber*) offset
    status: (NSString*) status
    order: (NSString*) order
    sort: (NSString*) sort
        completionHandler: (void (^)(ACTaskByDidListEnvelope* output, NSError* error)) handler;

Returns the list of tasks for a particular device id with optional status filter.

Returns the list of tasks for a particular device id with optional status filter.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* did = @"did_example"; // Device ID.
NSNumber* count = @56; // Max results count. (optional)
NSNumber* offset = @56; // Result starting offset. (optional)
NSString* status = @"status_example"; // Status filter. Comma-separated statuses. (optional)
NSString* order = @"order_example"; // Sort results by a field. Valid fields: createdOn. (optional)
NSString* sort = @"sort_example"; // Sort order. Valid values: asc or desc. (optional)

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Returns the list of tasks for a particular device id with optional status filter.
[apiInstance getAllByDidWithDid:did
              count:count
              offset:offset
              status:status
              order:order
              sort:sort
          completionHandler: ^(ACTaskByDidListEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->getAllByDid: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
did NSString* Device ID.
count NSNumber* Max results count. [optional]
offset NSNumber* Result starting offset. [optional]
status NSString* Status filter. Comma-separated statuses. [optional]
order NSString* Sort results by a field. Valid fields: createdOn. [optional]
sort NSString* Sort order. Valid values: asc or desc. [optional]

Return type

ACTaskByDidListEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

getAllPendingTasksByDid

-(NSURLSessionTask*) getAllPendingTasksByDidWithCompletionHandler: 
        (void (^)(ACPendingTasksList* output, NSError* error)) handler;

Returns the list of pending tasks for a particular device id.

Returns the list of all pending tasks (where acceptanceStatus is equal to WAITING ) for a particular device id.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];



ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Returns the list of  pending tasks for a particular device id.
[apiInstance getAllPendingTasksByDidWithCompletionHandler: 
          ^(ACPendingTasksList* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->getAllPendingTasksByDid: %@", error);
                        }
                    }];

Parameters

This endpoint does not need any parameter.

Return type

ACPendingTasksList*

Authorization

artikcloud_oauth

HTTP request headers

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

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

getDeviceTypesInfo

-(NSURLSessionTask*) getDeviceTypesInfoWithDtid: (NSString*) dtid
        completionHandler: (void (^)(ACDeviceTypesInfoEnvelope* output, NSError* error)) handler;

Read a device type device management information.

Read a device type device management information.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* dtid = @"dtid_example"; // Device type ID.

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Read a device type device management information.
[apiInstance getDeviceTypesInfoWithDtid:dtid
          completionHandler: ^(ACDeviceTypesInfoEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->getDeviceTypesInfo: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
dtid NSString* Device type ID.

Return type

ACDeviceTypesInfoEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

getManifestProperties

-(NSURLSessionTask*) getManifestPropertiesWithDtid: (NSString*) dtid
        completionHandler: (void (^)(ACMetadataPropertiesEnvelope* output, NSError* error)) handler;

Get a device type's device management manifest properties

Get a device type's device management manifest properties

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* dtid = @"dtid_example"; // Device Type ID.

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Get a device type's device management manifest properties
[apiInstance getManifestPropertiesWithDtid:dtid
          completionHandler: ^(ACMetadataPropertiesEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->getManifestProperties: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
dtid NSString* Device Type ID.

Return type

ACMetadataPropertiesEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

getProperties

-(NSURLSessionTask*) getPropertiesWithDid: (NSString*) did
    includeTimestamp: (NSNumber*) includeTimestamp
        completionHandler: (void (^)(ACMetadataEnvelope* output, NSError* error)) handler;

Read a device's properties.

Read a device's properties.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* did = @"did_example"; // Device ID.
NSNumber* includeTimestamp = @true; // Include timestamp. (optional)

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Read a device's properties.
[apiInstance getPropertiesWithDid:did
              includeTimestamp:includeTimestamp
          completionHandler: ^(ACMetadataEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->getProperties: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
did NSString* Device ID.
includeTimestamp NSNumber* Include timestamp. [optional]

Return type

ACMetadataEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

getStatuses

-(NSURLSessionTask*) getStatusesWithTid: (NSString*) tid
    count: (NSNumber*) count
    offset: (NSNumber*) offset
    status: (NSString*) status
    dids: (NSString*) dids
        completionHandler: (void (^)(ACTaskStatusesEnvelope* output, NSError* error)) handler;

Returns the details and status of a task id and the individual statuses of each device id in the list.

Returns the details and status of a task id and the individual statuses of each device id in the list.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* tid = @"tid_example"; // Task ID.
NSNumber* count = @56; // Max results count. (optional)
NSNumber* offset = @56; // Result starting offset. (optional)
NSString* status = @"status_example"; // Status filter. Comma-separated statuses. (optional)
NSString* dids = @"dids_example"; // Devices filter. Comma-separated device IDs. (optional)

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Returns the details and status of a task id and the individual statuses of each device id in the list.
[apiInstance getStatusesWithTid:tid
              count:count
              offset:offset
              status:status
              dids:dids
          completionHandler: ^(ACTaskStatusesEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->getStatuses: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
tid NSString* Task ID.
count NSNumber* Max results count. [optional]
offset NSNumber* Result starting offset. [optional]
status NSString* Status filter. Comma-separated statuses. [optional]
dids NSString* Devices filter. Comma-separated device IDs. [optional]

Return type

ACTaskStatusesEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

getStatusesHistory

-(NSURLSessionTask*) getStatusesHistoryWithTid: (NSString*) tid
    did: (NSString*) did
        completionHandler: (void (^)(ACTaskStatusesHistoryEnvelope* output, NSError* error)) handler;

Returns the history of the status changes for a specific task id, or for a specific device id in that task.

Returns the history of the status changes for a specific task id, or for a specific device id in that task.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* tid = @"tid_example"; // Task ID.
NSString* did = @"did_example"; // Device ID. Optional. (optional)

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Returns the history of the status changes for a specific task id, or for a specific device id in that task.
[apiInstance getStatusesHistoryWithTid:tid
              did:did
          completionHandler: ^(ACTaskStatusesHistoryEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->getStatusesHistory: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
tid NSString* Task ID.
did NSString* Device ID. Optional. [optional]

Return type

ACTaskStatusesHistoryEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

getTaskByID

-(NSURLSessionTask*) getTaskByIDWithTid: (NSString*) tid
        completionHandler: (void (^)(ACTaskEnvelope* output, NSError* error)) handler;

Returns the details and global status of a specific task id.

Returns the details and global status of a specific task id.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* tid = @"tid_example"; // Task ID.

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Returns the details and global status of a specific task id.
[apiInstance getTaskByIDWithTid:tid
          completionHandler: ^(ACTaskEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->getTaskByID: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
tid NSString* Task ID.

Return type

ACTaskEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

getTasks

-(NSURLSessionTask*) getTasksWithDtid: (NSString*) dtid
    count: (NSNumber*) count
    offset: (NSNumber*) offset
    status: (NSString*) status
    order: (NSString*) order
    sort: (NSString*) sort
        completionHandler: (void (^)(ACTaskListEnvelope* output, NSError* error)) handler;

Returns the all the tasks for a device type.

Returns the all the tasks for a device type.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* dtid = @"dtid_example"; // Device Type ID.
NSNumber* count = @56; // Max results count. (optional)
NSNumber* offset = @56; // Result starting offset. (optional)
NSString* status = @"status_example"; // Status filter. Comma-separated statuses. (optional)
NSString* order = @"order_example"; // Sort results by a field. Valid fields: createdOn. (optional)
NSString* sort = @"sort_example"; // Sort order. Valid values: asc or desc. (optional)

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Returns the all the tasks for a device type.
[apiInstance getTasksWithDtid:dtid
              count:count
              offset:offset
              status:status
              order:order
              sort:sort
          completionHandler: ^(ACTaskListEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->getTasks: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
dtid NSString* Device Type ID.
count NSNumber* Max results count. [optional]
offset NSNumber* Result starting offset. [optional]
status NSString* Status filter. Comma-separated statuses. [optional]
order NSString* Sort results by a field. Valid fields: createdOn. [optional]
sort NSString* Sort order. Valid values: asc or desc. [optional]

Return type

ACTaskListEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

notifyAboutAcceptance

-(NSURLSessionTask*) notifyAboutAcceptanceWithTid: (NSString*) tid
    did: (NSString*) did
    notifyAboutAcceptanceStatus: (ACAcceptanceStatusResponse*) notifyAboutAcceptanceStatus
        completionHandler: (void (^)(ACAcceptanceStatusResponse* output, NSError* error)) handler;

Notify/Inform about task acceptance status

User notify/informs to ARTIKCloud about task acceptance status

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* tid = @"tid_example"; // Task ID.
NSString* did = @"did_example"; // Device ID.
ACAcceptanceStatusResponse* notifyAboutAcceptanceStatus = [[ACAcceptanceStatusResponse alloc] init]; // Notify about task acceptance status

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Notify/Inform about task acceptance status
[apiInstance notifyAboutAcceptanceWithTid:tid
              did:did
              notifyAboutAcceptanceStatus:notifyAboutAcceptanceStatus
          completionHandler: ^(ACAcceptanceStatusResponse* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->notifyAboutAcceptance: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
tid NSString* Task ID.
did NSString* Device ID.
notifyAboutAcceptanceStatus ACAcceptanceStatusResponse* Notify about task acceptance status

Return type

ACAcceptanceStatusResponse*

Authorization

artikcloud_oauth

HTTP request headers

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

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

queryProperties

-(NSURLSessionTask*) queryPropertiesWithDtid: (NSString*) dtid
    count: (NSNumber*) count
    offset: (NSNumber*) offset
    filter: (NSString*) filter
    includeTimestamp: (NSNumber*) includeTimestamp
        completionHandler: (void (^)(ACMetadataQueryEnvelope* output, NSError* error)) handler;

Query device properties across devices.

Query device properties across devices.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* dtid = @"dtid_example"; // Device Type ID.
NSNumber* count = @56; // Max results count. (optional)
NSNumber* offset = @56; // Result starting offset. (optional)
NSString* filter = @"filter_example"; // Query filter. Comma-separated key=value pairs (optional)
NSNumber* includeTimestamp = @true; // Include timestamp. (optional)

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Query device properties across devices.
[apiInstance queryPropertiesWithDtid:dtid
              count:count
              offset:offset
              filter:filter
              includeTimestamp:includeTimestamp
          completionHandler: ^(ACMetadataQueryEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->queryProperties: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
dtid NSString* Device Type ID.
count NSNumber* Max results count. [optional]
offset NSNumber* Result starting offset. [optional]
filter NSString* Query filter. Comma-separated key=value pairs [optional]
includeTimestamp NSNumber* Include timestamp. [optional]

Return type

ACMetadataQueryEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

updateDeviceTypesInfo

-(NSURLSessionTask*) updateDeviceTypesInfoWithDtid: (NSString*) dtid
    deviceTypeInfo: (ACDeviceTypesInfo*) deviceTypeInfo
        completionHandler: (void (^)(ACDeviceTypesInfoEnvelope* output, NSError* error)) handler;

Updates a device type information

Updates a device type information

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* dtid = @"dtid_example"; // Device type ID.
ACDeviceTypesInfo* deviceTypeInfo = [[ACDeviceTypesInfo alloc] init]; // Device type info object to be set

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Updates a device type information
[apiInstance updateDeviceTypesInfoWithDtid:dtid
              deviceTypeInfo:deviceTypeInfo
          completionHandler: ^(ACDeviceTypesInfoEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->updateDeviceTypesInfo: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
dtid NSString* Device type ID.
deviceTypeInfo ACDeviceTypesInfo* Device type info object to be set

Return type

ACDeviceTypesInfoEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

updateServerProperties

-(NSURLSessionTask*) updateServerPropertiesWithDid: (NSString*) did
    deviceProperties: (NSObject*) deviceProperties
        completionHandler: (void (^)(ACMetadataEnvelope* output, NSError* error)) handler;

Updates a device's server properties.

Updates a device's server properties.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* did = @"did_example"; // Device ID.
NSObject* deviceProperties = NULL; // Device properties object to be set

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Updates a device's server properties.
[apiInstance updateServerPropertiesWithDid:did
              deviceProperties:deviceProperties
          completionHandler: ^(ACMetadataEnvelope* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->updateServerProperties: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
did NSString* Device ID.
deviceProperties NSObject* Device properties object to be set

Return type

ACMetadataEnvelope*

Authorization

artikcloud_oauth

HTTP request headers

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

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

updateTask

-(NSURLSessionTask*) updateTaskWithTid: (NSString*) tid
    taskUpdateRequest: (ACTaskUpdateRequest*) taskUpdateRequest
        completionHandler: (void (^)(ACTaskUpdateResponse* output, NSError* error)) handler;

Updates a task for all devices - For now just allows changing the state to cancelled.

Updates a task for all devices - For now just allows changing the state to cancelled.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* tid = @"tid_example"; // Task ID.
ACTaskUpdateRequest* taskUpdateRequest = [[ACTaskUpdateRequest alloc] init]; // Task update request

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Updates a task for all devices - For now just allows changing the state to cancelled.
[apiInstance updateTaskWithTid:tid
              taskUpdateRequest:taskUpdateRequest
          completionHandler: ^(ACTaskUpdateResponse* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->updateTask: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
tid NSString* Task ID.
taskUpdateRequest ACTaskUpdateRequest* Task update request

Return type

ACTaskUpdateResponse*

Authorization

artikcloud_oauth

HTTP request headers

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

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

updateTaskForDevice

-(NSURLSessionTask*) updateTaskForDeviceWithTid: (NSString*) tid
    did: (NSString*) did
    deviceTaskUpdateRequest: (ACDeviceTaskUpdateRequest*) deviceTaskUpdateRequest
        completionHandler: (void (^)(ACDeviceTaskUpdateResponse* output, NSError* error)) handler;

Updates a task for a specific device - For now just allows changing the state to cancelled.

Updates a task for a specific device - For now just allows changing the state to cancelled.

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


NSString* tid = @"tid_example"; // Task ID.
NSString* did = @"did_example"; // Device ID.
ACDeviceTaskUpdateRequest* deviceTaskUpdateRequest = [[ACDeviceTaskUpdateRequest alloc] init]; // Device task update request

ACDevicesManagementApi*apiInstance = [[ACDevicesManagementApi alloc] init];

// Updates a task for a specific device - For now just allows changing the state to cancelled.
[apiInstance updateTaskForDeviceWithTid:tid
              did:did
              deviceTaskUpdateRequest:deviceTaskUpdateRequest
          completionHandler: ^(ACDeviceTaskUpdateResponse* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACDevicesManagementApi->updateTaskForDevice: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
tid NSString* Task ID.
did NSString* Device ID.
deviceTaskUpdateRequest ACDeviceTaskUpdateRequest* Device task update request

Return type

ACDeviceTaskUpdateResponse*

Authorization

artikcloud_oauth

HTTP request headers

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

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