All URIs are relative to https://api.artik.cloud/v1.1
Method | HTTP request | Description |
---|---|---|
addDevice | POST /devices | Add Device |
deleteDevice | DELETE /devices/{deviceId} | Delete Device |
deleteDeviceToken | DELETE /devices/{deviceId}/tokens | Delete Device Token |
getDevice | GET /devices/{deviceId} | Get Device |
getDevicePresence | GET /devices/{deviceId}/presence | Get device presence information |
getDeviceToken | GET /devices/{deviceId}/tokens | Get Device Token |
updateDevice | PUT /devices/{deviceId} | Update Device |
updateDeviceToken | PUT /devices/{deviceId}/tokens | Update Device Token |
-(NSURLSessionTask*) addDeviceWithDevice: (ACDevice*) device
completionHandler: (void (^)(ACDeviceEnvelope* output, NSError* error)) handler;
Add Device
Create a device
ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
ACDevice* device = [[ACDevice alloc] init]; // Device to be added to the user
ACDevicesApi*apiInstance = [[ACDevicesApi alloc] init];
// Add Device
[apiInstance addDeviceWithDevice:device
completionHandler: ^(ACDeviceEnvelope* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling ACDevicesApi->addDevice: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
device | ACDevice* | Device to be added to the user |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) deleteDeviceWithDeviceId: (NSString*) deviceId
completionHandler: (void (^)(ACDeviceEnvelope* output, NSError* error)) handler;
Delete Device
Deletes a device
ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSString* deviceId = @"deviceId_example"; // deviceId
ACDevicesApi*apiInstance = [[ACDevicesApi alloc] init];
// Delete Device
[apiInstance deleteDeviceWithDeviceId:deviceId
completionHandler: ^(ACDeviceEnvelope* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling ACDevicesApi->deleteDevice: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
deviceId | NSString* | deviceId |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) deleteDeviceTokenWithDeviceId: (NSString*) deviceId
completionHandler: (void (^)(ACDeviceTokenEnvelope* output, NSError* error)) handler;
Delete Device Token
Deletes a device's token
ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSString* deviceId = @"deviceId_example"; // deviceId
ACDevicesApi*apiInstance = [[ACDevicesApi alloc] init];
// Delete Device Token
[apiInstance deleteDeviceTokenWithDeviceId:deviceId
completionHandler: ^(ACDeviceTokenEnvelope* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling ACDevicesApi->deleteDeviceToken: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
deviceId | NSString* | deviceId |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) getDeviceWithDeviceId: (NSString*) deviceId
completionHandler: (void (^)(ACDeviceEnvelope* output, NSError* error)) handler;
Get Device
Retrieves a device
ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSString* deviceId = @"deviceId_example"; // deviceId
ACDevicesApi*apiInstance = [[ACDevicesApi alloc] init];
// Get Device
[apiInstance getDeviceWithDeviceId:deviceId
completionHandler: ^(ACDeviceEnvelope* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling ACDevicesApi->getDevice: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
deviceId | NSString* | deviceId |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) getDevicePresenceWithDeviceId: (NSString*) deviceId
completionHandler: (void (^)(ACPresenceEnvelope* output, NSError* error)) handler;
Get device presence information
Return the presence status of the given device along with the time it was last seen
ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSString* deviceId = @"deviceId_example"; // Device ID.
ACDevicesApi*apiInstance = [[ACDevicesApi alloc] init];
// Get device presence information
[apiInstance getDevicePresenceWithDeviceId:deviceId
completionHandler: ^(ACPresenceEnvelope* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling ACDevicesApi->getDevicePresence: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
deviceId | NSString* | Device ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) getDeviceTokenWithDeviceId: (NSString*) deviceId
completionHandler: (void (^)(ACDeviceTokenEnvelope* output, NSError* error)) handler;
Get Device Token
Retrieves a device's token
ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSString* deviceId = @"deviceId_example"; // deviceId
ACDevicesApi*apiInstance = [[ACDevicesApi alloc] init];
// Get Device Token
[apiInstance getDeviceTokenWithDeviceId:deviceId
completionHandler: ^(ACDeviceTokenEnvelope* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling ACDevicesApi->getDeviceToken: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
deviceId | NSString* | deviceId |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) updateDeviceWithDeviceId: (NSString*) deviceId
device: (ACDevice*) device
completionHandler: (void (^)(ACDeviceEnvelope* output, NSError* error)) handler;
Update Device
Updates a device
ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSString* deviceId = @"deviceId_example"; // deviceId
ACDevice* device = [[ACDevice alloc] init]; // Device to be updated
ACDevicesApi*apiInstance = [[ACDevicesApi alloc] init];
// Update Device
[apiInstance updateDeviceWithDeviceId:deviceId
device:device
completionHandler: ^(ACDeviceEnvelope* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling ACDevicesApi->updateDevice: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
deviceId | NSString* | deviceId | |
device | ACDevice* | Device to be updated |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) updateDeviceTokenWithDeviceId: (NSString*) deviceId
completionHandler: (void (^)(ACDeviceTokenEnvelope* output, NSError* error)) handler;
Update Device Token
Updates a device's token
ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: artikcloud_oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
NSString* deviceId = @"deviceId_example"; // deviceId
ACDevicesApi*apiInstance = [[ACDevicesApi alloc] init];
// Update Device Token
[apiInstance updateDeviceTokenWithDeviceId:deviceId
completionHandler: ^(ACDeviceTokenEnvelope* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling ACDevicesApi->updateDeviceToken: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
deviceId | NSString* | deviceId |
- Content-Type: text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]