diff --git a/README.md b/README.md index 1c73cabc20ffd53ad38eea6786e1a84450ac5123..369d79232db756384a6bd43ca218ce405d405b53 100644 --- a/README.md +++ b/README.md @@ -70,11 +70,14 @@ NOTE: In the [3GPP Technical Specification (TS) 29.222 V18.5.0 Common API Framew ## OpenCAPIF SDK requirements -To leverage the OpenCAPIF SDK, you must have a registered user in the target CAPIF instance. **Please contact the administrator to obtain the necessary predefined credentials (username and password).** +To leverage the OpenCAPIF SDK, it must have a registered user in the target CAPIF instance. **Please contact the administrator to obtain the necessary predefined credentials (username and password).** # Netapp developer path -The NetApp Developer Path guides you through building and integrating NetApps using CAPIF. This path is divided into two key sections: Invoker NetApp and Provider NetApp. Each section covers the essential flow and functions for developing NetApps interaction with CAPIF, whether you’re acting as an invoker consuming services or a provider offering them. By following this path, developers will gain a comprehensive understanding of how to effectively use the SDK within the CAPIF ecosystem. +The NetApp Developer Path guides the programmer through building and integrating NetApps using CAPIF. This path is divided into two key sections: [Invoker NetApp](#invoker-netapp-1) and Provider NetApp. Each section covers the essential flow and functions for developing NetApps interaction with CAPIF, whether the user is acting as an invoker consuming services or a provider offering them. By following this path, developers will gain a comprehensive understanding of how to effectively use the SDK within the CAPIF ecosystem. + +## Invoker NetApp + Here is a code sample of the implementation of this hole [Invoker-Netapp](./netapp-samples/netapp-invoker-sample/netapp-invoker.py) sample. 1. **Create an Invoker object:** \ @@ -181,80 +184,10 @@ This image highlights Provider path using SDK code: ### Important information for Provider consumer -Within the `provider_folder`, the SDK will store some folders named with the provided `capif_username` you have had registered from administrator. At each folder, there will be found the following files: +Within the `provider_folder`, the SDK will store some folders named with the provided `capif_username` it has been registered from administrator. At each folder, there will be found the following files: - `capif_provider_details.json`: contains all the APFs and AEFs ids that have already onboarded with this `capif_username`, -- `CAPIF_<your_api_name><your_API_id>.json`: if it is already published or updated an API, it will contain a copy of the last payload, +- `CAPIF_<api_name><API_id>.json`: if it is already published or updated an API, it will contain a copy of the last payload, - `service_received.json`: if it is already used to get an API or get all APIs functionality, it will contain the response of last request, - `published-apis.json`: Contains the currently published APIs with their `ApiId`. -## Invoker NetApp - -A NetApp development running as an Invoker would usually follow this process step by step making use of SDK: - -1. **Create an Invoker object:** \ - Initialize the invoker by creating an instance of the `CAPIFInvokerConnector` class, passing the required configuration file: - - ```python - invoker = CAPIFInvokerConnector(config_file=utilities.get_config_file()) - ``` - -2. **Onboard the Invoker**: \ - Register the invoker with the CAPIF system to enable access to APIs: - - ```python - invoker.onboard_invoker() - ``` - -3. **Create a Service Discoverer object:** \ - Initialize the service discovery mechanism to search for available services: - - ```python - service_discoverer = ServiceDiscoverer(config_file=utilities.get_config_file()) - ``` - -4. **Discover available services:** \ - Use the discover() method to retrieve a list of available APIs: - - 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 - - ```python - service_discoverer.discover() - ``` - -5. **Retrieve security tokens:** \ - Use the get_tokens() method to obtain the necessary tokens for authenticating API requests: - - ```python - invoker.get_tokens() - ``` -Then all information for using the available APIs would be at capif_api_security_context_details.json - -This file would be placed in the invoker_folder path, more specifically in the folder that corresponds of the capif_username used in the config_file. - -Here is a sample of this capif_api_security_context_details [file](./samples/capif_api_security_context_details-sample.json). - -Here is a code sample of the implementation of this whole [functionality](./netapp-samples/netapp-invoker-sample/netapp-invoker.py). - -This image highlights Invoker path using SDK code: - - - -### Important information for Invoker consumer - -Within the `invoker_folder`, the SDK will store some folders named with the provided `capif_username` you have had registered from administrator. At each folder, there will be found the following files: - -- `capif_api_security_context_details.json`: This file contains the information of target invoker. It will contain: - - 1. Your `api_invoker_id`. - 2. If you have already used the Service Discovery Functionality, you will find all the available APIs with their information. - 3. If you have already used the Service Get Token functionality, you will find your access token for using the APIs you have already discovered. - -In the `provider_folder`, it will be located several folders with each `capif_username` that has already been onboarded as a provider, for each folder it is created by SDK this files: - -- `Capif_provider_details.json` : Contains all the APFs and AEFs ids that have already onboarded with this capif_username -- `CAPIF_<api_name><API_id>.json` : If it's already published or updated an API, It will be available a copy of the last payload. -- `Service_received.json` : If it's already used the get an api or get all apis functionality, It will be available the response to the request. -- `Published-Apis.json` : Contains the currently published APIs with their ApiId diff --git a/doc/sdk-full-documentation.md b/doc/sdk-full-documentation.md index b02d3c03cc390886e8796d561afe7c6e44d9763a..e8046031ba2044aae9bd843349fdc2d2fc3e3b43 100644 --- a/doc/sdk-full-documentation.md +++ b/doc/sdk-full-documentation.md @@ -63,7 +63,7 @@ CAPIF SDK references: SDK simplifies the onboarding process for Provider developers. It also provides the capability to register several APFs and AEFs if necessary. - + [CAPIF_Publish_Service_API](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) @@ -140,7 +140,7 @@ It is mandatory to have onboarded as a [provider](#onboard_provider--script-prov Mandatory fields: - PublisherAPFid - + ### Update and Offboard provider @@ -150,7 +150,7 @@ CAPIF SDK references: For using this features we must be previously onboarded as a provider. - + # Invoker NetApp @@ -174,7 +174,7 @@ CAPIF SDK references: Simplifies the process of onboarding for Invoker users - + ### Discover process @@ -190,7 +190,7 @@ DISCLAIMER: if it's the first time the user runs discover() it will appear a war WARNING - Received 404 error, redirecting to register security service - + ### Obtain Invoker tokens @@ -202,7 +202,7 @@ This functionality simplifies the process of creating a security context based o This functionality **requires** to to be 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. - + ### Update and offboard invoker @@ -212,7 +212,7 @@ CAPIF SDK references: To use these features, the NetApp must be previously [onboarded as an invoker](#onboard_invoker--script-invoker_capif_connectorpy). - + # Other features