Added usage field to service
Some checks failed
checks-impure / test (pull_request) Successful in 25s
checks / test (pull_request) Failing after 1m56s

This commit is contained in:
2024-01-14 17:01:14 +01:00
parent b8da1db58c
commit e47b0b4911
26 changed files with 1140 additions and 308 deletions

View File

@@ -4,12 +4,82 @@ All URIs are relative to _http://localhost_
| Method | HTTP request | Description |
| ----------------------------------------------------------------------------- | --------------------------------------- | --------------------------- |
| [**add_service_usage**](ServicesApi.md#add_service_usage) | **POST** /api/v1/service_usage | Add Service Usage |
| [**create_service**](ServicesApi.md#create_service) | **POST** /api/v1/service | Create Service |
| [**delete_service**](ServicesApi.md#delete_service) | **DELETE** /api/v1/service | Delete Service |
| [**get_all_services**](ServicesApi.md#get_all_services) | **GET** /api/v1/services | Get All Services |
| [**get_service_by_did**](ServicesApi.md#get_service_by_did) | **GET** /api/v1/service | Get Service By Did |
| [**get_services_without_entity**](ServicesApi.md#get_services_without_entity) | **GET** /api/v1/services_without_entity | Get Services Without Entity |
# **add_service_usage**
> Service add_service_usage(service_uuid, service_usage_create)
Add Service Usage
### Example
```python
import time
import os
import openapi_client
from openapi_client.models.service import Service
from openapi_client.models.service_usage_create import ServiceUsageCreate
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.ServicesApi(api_client)
service_uuid = 'service_uuid_example' # str |
service_usage_create = openapi_client.ServiceUsageCreate() # ServiceUsageCreate |
try:
# Add Service Usage
api_response = api_instance.add_service_usage(service_uuid, service_usage_create)
print("The response of ServicesApi->add_service_usage:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ServicesApi->add_service_usage: %s\n" % e)
```
### Parameters
| Name | Type | Description | Notes |
| ------------------------ | ----------------------------------------------- | ----------- | ----- |
| **service_uuid** | **str** | |
| **service_usage_create** | [**ServiceUsageCreate**](ServiceUsageCreate.md) | |
### Return type
[**Service**](Service.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------------- | ---------------- |
| **200** | Successful Response | - |
| **422** | Validation Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_service**
> Service create_service(service_create)
@@ -103,7 +173,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.ServicesApi(api_client)
entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234')
entity_did = 'did:sov:test:120' # str | (optional) (default to 'did:sov:test:120')
try:
# Delete Service
@@ -116,9 +186,9 @@ with openapi_client.ApiClient(configuration) as api_client:
### Parameters
| Name | Type | Description | Notes |
| -------------- | ------- | ----------- | --------------------------------------------------- |
| **entity_did** | **str** | | [optional] [default to 'did:sov:test:1234'] |
| Name | Type | Description | Notes |
| -------------- | ------- | ----------- | -------------------------------------------------- |
| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
### Return type
@@ -237,7 +307,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.ServicesApi(api_client)
entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234')
entity_did = 'did:sov:test:120' # str | (optional) (default to 'did:sov:test:120')
skip = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
@@ -252,11 +322,11 @@ with openapi_client.ApiClient(configuration) as api_client:
### Parameters
| Name | Type | Description | Notes |
| -------------- | ------- | ----------- | --------------------------------------------------- |
| **entity_did** | **str** | | [optional] [default to 'did:sov:test:1234'] |
| **skip** | **int** | | [optional] [default to 0] |
| **limit** | **int** | | [optional] [default to 100] |
| Name | Type | Description | Notes |
| -------------- | ------- | ----------- | -------------------------------------------------- |
| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
| **skip** | **int** | | [optional] [default to 0] |
| **limit** | **int** | | [optional] [default to 100] |
### Return type
@@ -307,7 +377,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.ServicesApi(api_client)
entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234')
entity_did = 'did:sov:test:120' # str | (optional) (default to 'did:sov:test:120')
skip = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
@@ -322,11 +392,11 @@ with openapi_client.ApiClient(configuration) as api_client:
### Parameters
| Name | Type | Description | Notes |
| -------------- | ------- | ----------- | --------------------------------------------------- |
| **entity_did** | **str** | | [optional] [default to 'did:sov:test:1234'] |
| **skip** | **int** | | [optional] [default to 0] |
| **limit** | **int** | | [optional] [default to 100] |
| Name | Type | Description | Notes |
| -------------- | ------- | ----------- | -------------------------------------------------- |
| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
| **skip** | **int** | | [optional] [default to 0] |
| **limit** | **int** | | [optional] [default to 100] |
### Return type