Skip to content

Latest commit

 

History

History
300 lines (206 loc) · 8.65 KB

ACMlApi.md

File metadata and controls

300 lines (206 loc) · 8.65 KB

ACMlApi

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

Method HTTP request Description
createModel POST /ml/models Create model
deleteModel DELETE /ml/models/{modelId} Delete model
getModel GET /ml/models/{modelId} Get model
getModels GET /ml/models Get models
predict POST /ml/models/{modelId}/predict Predict

createModel

-(NSURLSessionTask*) createModelWithBody: (ACCreateModelBody*) body
        completionHandler: (void (^)(ACModelResponseBody* output, NSError* error)) handler;

Create model

Create model

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

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


ACCreateModelBody* body = [[ACCreateModelBody alloc] init]; // Body (optional)

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

// Create model
[apiInstance createModelWithBody:body
          completionHandler: ^(ACModelResponseBody* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACMlApi->createModel: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
body ACCreateModelBody* Body [optional]

Return type

ACModelResponseBody*

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]

deleteModel

-(NSURLSessionTask*) deleteModelWithModelId: (NSString*) modelId
        completionHandler: (void (^)(ACModelResponseBody* output, NSError* error)) handler;

Delete model

Delete model

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

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


NSString* modelId = @"modelId_example"; // modelId

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

// Delete model
[apiInstance deleteModelWithModelId:modelId
          completionHandler: ^(ACModelResponseBody* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACMlApi->deleteModel: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
modelId NSString* modelId

Return type

ACModelResponseBody*

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]

getModel

-(NSURLSessionTask*) getModelWithModelId: (NSString*) modelId
        completionHandler: (void (^)(ACModelResponseBody* output, NSError* error)) handler;

Get model

Get model

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

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


NSString* modelId = @"modelId_example"; // modelId

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

// Get model
[apiInstance getModelWithModelId:modelId
          completionHandler: ^(ACModelResponseBody* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACMlApi->getModel: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
modelId NSString* modelId

Return type

ACModelResponseBody*

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]

getModels

-(NSURLSessionTask*) getModelsWithUid: (NSString*) uid
    count: (NSString*) count
    offset: (NSString*) offset
        completionHandler: (void (^)(ACGetModelsResponseBody* output, NSError* error)) handler;

Get models

Get models

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

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


NSString* uid = @"uid_example"; // uid (optional)
NSString* count = @"count_example"; // count (optional)
NSString* offset = @"offset_example"; // offset (optional)

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

// Get models
[apiInstance getModelsWithUid:uid
              count:count
              offset:offset
          completionHandler: ^(ACGetModelsResponseBody* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACMlApi->getModels: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
uid NSString* uid [optional]
count NSString* count [optional]
offset NSString* offset [optional]

Return type

ACGetModelsResponseBody*

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]

predict

-(NSURLSessionTask*) predictWithModelId: (NSString*) modelId
    body: (ACPredictBody*) body
        completionHandler: (void (^)(ACPredictResponseBody* output, NSError* error)) handler;

Predict

Predict

Example

ACDefaultConfiguration *apiConfig = [ACDefaultConfiguration sharedConfig];

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


NSString* modelId = @"modelId_example"; // modelId
ACPredictBody* body = [[ACPredictBody alloc] init]; // Body (optional)

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

// Predict
[apiInstance predictWithModelId:modelId
              body:body
          completionHandler: ^(ACPredictResponseBody* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ACMlApi->predict: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
modelId NSString* modelId
body ACPredictBody* Body [optional]

Return type

ACPredictResponseBody*

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]