Commit 7cf51cdf authored by Daniel García's avatar Daniel García
Browse files

Fix spelling and writing

parent e58a545b
Loading
Loading
Loading
Loading
+60 −60
Original line number Diff line number Diff line
# OpenCAPIF SDK usage

OpenCAPIF SDK implements this set of features to easily integrate an application with CAPIF NF either manually or integrating SDK library directly within app code.
OpenCAPIF SDK implements this set of features to easily integrate an application with CAPIF NF either manually, using scripting, or integrating SDK library directly within app code.

Before using it, it is required to have fulfilled the [requirements](./sdk-prerequirements.md) section, the [installation](./sdk-installation.md) section and the selected parts of the [configuration](./sdk-configuration.md) depending on the CAPIF role the NetApp is going to play.


![GENERAL CAPIF USAGE FLOW](./images/Flujo%20completo-OPENCAPIF%20ACTUAL.jpg)

This repository includes 2 different modes to test OpenCAPIF SDK:
@@ -21,17 +20,9 @@ This repository includes 2 different modes to test OpenCAPIF SDK:

# Table of contents

CAPIF is designed to use using two different roles:

As explained before, OpenCAPIF SDK is designed to play two different roles:


- [As an Invoker](#as-an-invoker)
    - [Important Information for Invoker](#important-information-for-invoker-consumer)
    - [Onboard Invoker](#onboard_invoker--script-invoker_capif_connectorpy)
    - [Discover API](#discover--script-invoker_service_discoverpy)
    - [Get Tokens](#get_tokens--script-invoker_service_get_tokenpy)
    - [Update and Offboard Invoker](#update_invoker-and-offboard_and_deregister_invoker--invoker_capif_connector_updatepy-and-invoker_capif_connector_offboardingpy)
- [As a Provider](#as-a-proxvider)
- [Provider NetApp](#provider-netapp)
    - [Important Information for Provider](#important-information-for-provider-consumer)
    - [Onboard Provider](#onboard_provider--script-provider_capif_connectorpy)
    - [Publish Services](#publish_services--script-provider_publish_apipy)
@@ -40,57 +31,18 @@ CAPIF is designed to use using two different roles:
    - [Get Published Services](#get_service--script-provider_get_published_apipy)
    - [Get All Published Services](#get_all_services--script-provider_get_all_published_apipy)
    - [Update and Offboard Provider](#update_provider-and-offboard_provider--provider_capif_connector_updatepy-and-provider_capif_connector_offboardingpy)
- [Invoker NetApp](#invoker-netapp)
    - [Important Information for Invoker](#important-information-for-invoker-consumer)
    - [Onboard Invoker](#onboard_invoker--script-invoker_capif_connectorpy)
    - [Discover API](#discover--script-invoker_service_discoverpy)
    - [Get Tokens](#get_tokens--script-invoker_service_get_tokenpy)
    - [Update and Offboard Invoker](#update_invoker-and-offboard_and_deregister_invoker--invoker_capif_connector_updatepy-and-invoker_capif_connector_offboardingpy)
- [Other Features](#other-features)
    - [Register and Login](#script-register_and_loginpy)
    - [Deregister and Login](#script-deregister_and_loginpy)

# As an invoker

The common path to follow using CAPIF in order to get an API token of the service it's wanted to use is by following this steps:
## Important information for Invoker consumer

In the `invoker_folder`, it will be located several folders with each `capif_username` that has onboarded as a provider. For each folder, it could be found:

-   `capif_api_security_context_details.json`: This file contains the information of the invoker. It will contain:
        
    1. The `api_invoker_id`.
    2. If it has already used the Service Discovery Functionality, it will be found all the available APIs with their information.
    3. If it has already used the Service Get Token functionality, it will be found the access token for using the APIs that has already been discovered.


### onboard_invoker() // Script invoker_capif_connector.py  

Simplifies the process of onboarding for Invoker users

![Invoker_onboard](./images/Invoker_onboarding.png)

### discover() // Script invoker_service_discover.py
In this functionality it could be used [discover_filter](./sdk-configuration.md) to retrieve only the access of the API's it's wanted to query

It is mandatory to have onboarded as a [invoker](#onboard_invoker--script-invoker_capif_connectorpy) before

DISCLAIMER: if it's the first time the user runs discover() it will appear a warning alert like this

      WARNING - Received 404 error, redirecting to register security service
    
![Invoker_discover](./images/Invoker_discover.png)

### get_tokens() // Script invoker_service_get_token.py

This functionality simplifies the way of getting created their properly security context for each of the services and acquiring the access token to use the final APIs.

This functionality **requires** to to have onboarded as a [invoker](#onboard_invoker--script-invoker_capif_connectorpy) before and run the [discover](#discover--script-invoker_service_discoverpy) function at least once before.

![Invoker_get_token](./images/invoker_get_token.png)

### update_invoker() and offboard_and_deregister_Invoker() // invoker_capif_connector_update.py and invoker_capif_connector_offboarding.py

For using this features we must have [onboarded as an invoker](#onboard_invoker--script-invoker_capif_connectorpy) previously.
# Provider NetApp

![Invoker_update-offboard](./images/invoker_update-offboard.png)


# As a provider
The common path to follow using CAPIF in order to publish an API is by following this steps:

## Important information for Provider consumer
@@ -105,13 +57,16 @@ In the `provider_folder`, it will be located several folders with each `capif_us

### onboard_provider() // Script provider_capif_connector.py

Simplifies the process of onboarding for Provider users,also has the capability to register several APF's and AEF's if its necessary
**CAPIF SDK function**: ==onboard_provider()==\
**CAPIF SDK script**: ==provider_capif_connector.py==

Simplifies the onboarding process for Provider developers. It also provides the capability to register several APFs and AEFs if necessary.

![Provider_onboard](./images/provider_onboarding.png)

[CAPIF_Publish_Service_API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) 

For using the Publish Service is mandatory to fulfil certain fields of the [Publish.json](./sdk-configuration.md) file
Using Publish Service it is required to fulfill certain fields of the [capif-sdk-config.json](./sdk-configuration.md) file.

### publish_services() // Script provider_publish_api.py

@@ -174,6 +129,51 @@ It is mandatory to have onboarded as a [provider](#onboard_provider--script-prov

![Provider_update-offboard](./images/provider_update-offboard.png)

# Invoker NetApp

The common path to follow using CAPIF in order to get an API token of the service it's wanted to use is by following this steps:
## Important information for Invoker consumer

In the `invoker_folder`, it will be located several folders with each `capif_username` that has onboarded as a provider. For each folder, it could be found:

-   `capif_api_security_context_details.json`: This file contains the information of the invoker. It will contain:
        
    1. The `api_invoker_id`.
    2. If it has already used the Service Discovery Functionality, it will be found all the available APIs with their information.
    3. If it has already used the Service Get Token functionality, it will be found the access token for using the APIs that has already been discovered.


### onboard_invoker() // Script invoker_capif_connector.py  

Simplifies the process of onboarding for Invoker users

![Invoker_onboard](./images/Invoker_onboarding.png)

### discover() // Script invoker_service_discover.py
In this functionality it could be used [discover_filter](./sdk-configuration.md) to retrieve only the access of the API's it's wanted to query

It is mandatory to have onboarded as a [invoker](#onboard_invoker--script-invoker_capif_connectorpy) before

DISCLAIMER: if it's the first time the user runs discover() it will appear a warning alert like this

      WARNING - Received 404 error, redirecting to register security service
    
![Invoker_discover](./images/Invoker_discover.png)

### get_tokens() // Script invoker_service_get_token.py

This functionality simplifies the way of getting created their properly security context for each of the services and acquiring the access token to use the final APIs.

This functionality **requires** to to have onboarded as a [invoker](#onboard_invoker--script-invoker_capif_connectorpy) before and run the [discover](#discover--script-invoker_service_discoverpy) function at least once before.

![Invoker_get_token](./images/invoker_get_token.png)

### update_invoker() and offboard_and_deregister_Invoker() // invoker_capif_connector_update.py and invoker_capif_connector_offboarding.py

For using this features we must have [onboarded as an invoker](#onboard_invoker--script-invoker_capif_connectorpy) previously.

![Invoker_update-offboard](./images/invoker_update-offboard.png)



# Other features