Skip to content

Latest commit

 

History

History
399 lines (291 loc) · 13.2 KB

OAIEntitlementsApi.md

File metadata and controls

399 lines (291 loc) · 13.2 KB

OAIEntitlementsApi

All URIs are relative to http://http:/v1

Method HTTP request Description
entitlementsAllowDelete DELETE /entitlements/allow Remove an entitlement
entitlementsAllowGet GET /entitlements/allow Check if global entitlements are enabled
entitlementsAllowPost POST /entitlements/allow Add an entitlement for all users
entitlementsAllowUuidPost POST /entitlements/allow/{uuid} Grant product access to a customer
entitlementsFreePassGet GET /entitlements/free-pass Verify given free pass hash
entitlementsGet GET /entitlements List all entitlements
entitlementsGlobalGet GET /entitlements/global Lists all past and future global entitlements

entitlementsAllowDelete

-(NSURLSessionTask*) entitlementsAllowDeleteWithBody: (NSNumber*) body
    authUser: (NSString*) authUser
    authorization: (NSString*) authorization
        completionHandler: (void (^)(NSArray<NSObject*>* output, NSError* error)) handler;

Remove an entitlement

Example

NSNumber* body = @56; // 
NSString* authUser = @"authUser_example"; //  (optional)
NSString* authorization = @"authorization_example"; //  (optional)

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

// Remove an entitlement
[apiInstance entitlementsAllowDeleteWithBody:body
              authUser:authUser
              authorization:authorization
          completionHandler: ^(NSArray<NSObject*>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIEntitlementsApi->entitlementsAllowDelete: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
body NSNumber*
authUser NSString* [optional]
authorization NSString* [optional]

Return type

NSArray<NSObject>**

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: application/json;charset=utf-8

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

entitlementsAllowGet

-(NSURLSessionTask*) entitlementsAllowGetWithAuthUser: (NSString*) authUser
    authorization: (NSString*) authorization
    ip: (NSString*) ip
    paper: (NSString*) paper
        completionHandler: (void (^)(NSArray<OAIPersistedEntitlementAccess>* output, NSError* error)) handler;

Check if global entitlements are enabled

Example

NSString* authUser = @"authUser_example"; //  (optional)
NSString* authorization = @"authorization_example"; //  (optional)
NSString* ip = @"ip_example"; //  (optional)
NSString* paper = @"paper_example"; //  (optional)

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

// Check if global entitlements are enabled
[apiInstance entitlementsAllowGetWithAuthUser:authUser
              authorization:authorization
              ip:ip
              paper:paper
          completionHandler: ^(NSArray<OAIPersistedEntitlementAccess>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIEntitlementsApi->entitlementsAllowGet: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
authUser NSString* [optional]
authorization NSString* [optional]
ip NSString* [optional]
paper NSString* [optional]

Return type

NSArray*

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=utf-8

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

entitlementsAllowPost

-(NSURLSessionTask*) entitlementsAllowPostWithBody: (OAIEntitlementAccess*) body
    authUser: (NSString*) authUser
    authorization: (NSString*) authorization
        completionHandler: (void (^)(NSArray<NSObject*>* output, NSError* error)) handler;

Add an entitlement for all users

Example

OAIEntitlementAccess* body = [[OAIEntitlementAccess alloc] init]; // 
NSString* authUser = @"authUser_example"; //  (optional)
NSString* authorization = @"authorization_example"; //  (optional)

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

// Add an entitlement for all users
[apiInstance entitlementsAllowPostWithBody:body
              authUser:authUser
              authorization:authorization
          completionHandler: ^(NSArray<NSObject*>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIEntitlementsApi->entitlementsAllowPost: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
body OAIEntitlementAccess*
authUser NSString* [optional]
authorization NSString* [optional]

Return type

NSArray<NSObject>**

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: application/json;charset=utf-8

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

entitlementsAllowUuidPost

-(NSURLSessionTask*) entitlementsAllowUuidPostWithUuid: (NSString*) uuid
    body: (OAIEntitlementAccess*) body
    authUser: (NSString*) authUser
    authorization: (NSString*) authorization
        completionHandler: (void (^)(NSArray<NSObject*>* output, NSError* error)) handler;

Grant product access to a customer

Example

NSString* uuid = @"uuid_example"; // 
OAIEntitlementAccess* body = [[OAIEntitlementAccess alloc] init]; // 
NSString* authUser = @"authUser_example"; //  (optional)
NSString* authorization = @"authorization_example"; //  (optional)

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

// Grant product access to a customer
[apiInstance entitlementsAllowUuidPostWithUuid:uuid
              body:body
              authUser:authUser
              authorization:authorization
          completionHandler: ^(NSArray<NSObject*>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIEntitlementsApi->entitlementsAllowUuidPost: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
uuid NSString*
body OAIEntitlementAccess*
authUser NSString* [optional]
authorization NSString* [optional]

Return type

NSArray<NSObject>**

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: application/json;charset=utf-8

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

entitlementsFreePassGet

-(NSURLSessionTask*) entitlementsFreePassGetWithAuthUser: (NSString*) authUser
    authorization: (NSString*) authorization
    freePassHash: (NSString*) freePassHash
        completionHandler: (void (^)(NSNumber* output, NSError* error)) handler;

Verify given free pass hash

Example

NSString* authUser = @"authUser_example"; //  (optional)
NSString* authorization = @"authorization_example"; //  (optional)
NSString* freePassHash = @"freePassHash_example"; //  (optional)

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

// Verify given free pass hash
[apiInstance entitlementsFreePassGetWithAuthUser:authUser
              authorization:authorization
              freePassHash:freePassHash
          completionHandler: ^(NSNumber* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIEntitlementsApi->entitlementsFreePassGet: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
authUser NSString* [optional]
authorization NSString* [optional]
freePassHash NSString* [optional]

Return type

NSNumber*

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=utf-8

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

entitlementsGet

-(NSURLSessionTask*) entitlementsGetWithCompletionHandler: 
        (void (^)(NSDictionary<NSString*, NSArray<NSString*>*>* output, NSError* error)) handler;

List all entitlements

Example

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

// List all entitlements
[apiInstance entitlementsGetWithCompletionHandler: 
          ^(NSDictionary<NSString*, NSArray<NSString*>*>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIEntitlementsApi->entitlementsGet: %@", error);
                        }
                    }];

Parameters

This endpoint does not need any parameter.

Return type

NSDictionary<NSString, NSArray<NSString>>**

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=utf-8

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

entitlementsGlobalGet

-(NSURLSessionTask*) entitlementsGlobalGetWithAuthUser: (NSString*) authUser
    authorization: (NSString*) authorization
        completionHandler: (void (^)(NSArray<OAIPersistedEntitlementAccess>* output, NSError* error)) handler;

Lists all past and future global entitlements

Example

NSString* authUser = @"authUser_example"; //  (optional)
NSString* authorization = @"authorization_example"; //  (optional)

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

// Lists all past and future global entitlements
[apiInstance entitlementsGlobalGetWithAuthUser:authUser
              authorization:authorization
          completionHandler: ^(NSArray<OAIPersistedEntitlementAccess>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling OAIEntitlementsApi->entitlementsGlobalGet: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
authUser NSString* [optional]
authorization NSString* [optional]

Return type

NSArray*

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;charset=utf-8

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