Skip to content

Latest commit

 

History

History
336 lines (247 loc) · 10.2 KB

ProjectApi.md

File metadata and controls

336 lines (247 loc) · 10.2 KB

sysml_v2_api_client.ProjectApi

All URIs are relative to http://localhost

Method HTTP request Description
delete_project_by_id DELETE /projects/{projectId} Delete project by ID
get_project_by_id GET /projects/{projectId} Get project by ID
get_projects GET /projects Get projects
post_project POST /projects Create project
put_project_by_id PUT /projects/{projectId} Update project by ID

delete_project_by_id

Project delete_project_by_id(project_id)

Delete project by ID

Example

from __future__ import print_function
import time
import sysml_v2_api_client
from sysml_v2_api_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 = sysml_v2_api_client.Configuration(
    host = "http://localhost"
)


# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = sysml_v2_api_client.ProjectApi(api_client)
    project_id = 'project_id_example' # str | ID of the project

    try:
        # Delete project by ID
        api_response = api_instance.delete_project_by_id(project_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ProjectApi->delete_project_by_id: %s\n" % e)

Parameters

Name Type Description Notes
project_id str ID of the project

Return type

Project

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/ld+json

HTTP response details

Status code Description Response headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -

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

get_project_by_id

Project get_project_by_id(project_id)

Get project by ID

Example

from __future__ import print_function
import time
import sysml_v2_api_client
from sysml_v2_api_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 = sysml_v2_api_client.Configuration(
    host = "http://localhost"
)


# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = sysml_v2_api_client.ProjectApi(api_client)
    project_id = 'project_id_example' # str | ID of the project

    try:
        # Get project by ID
        api_response = api_instance.get_project_by_id(project_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ProjectApi->get_project_by_id: %s\n" % e)

Parameters

Name Type Description Notes
project_id str ID of the project

Return type

Project

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/ld+json

HTTP response details

Status code Description Response headers
200 Ok -
404 Not found. -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -

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

get_projects

list[Project] get_projects(page_after=page_after, page_before=page_before, page_size=page_size)

Get projects

Example

from __future__ import print_function
import time
import sysml_v2_api_client
from sysml_v2_api_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 = sysml_v2_api_client.Configuration(
    host = "http://localhost"
)


# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = sysml_v2_api_client.ProjectApi(api_client)
    page_after = 'page_after_example' # str | Page after (optional)
page_before = 'page_before_example' # str | Page before (optional)
page_size = 56 # int | Page size (optional)

    try:
        # Get projects
        api_response = api_instance.get_projects(page_after=page_after, page_before=page_before, page_size=page_size)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ProjectApi->get_projects: %s\n" % e)

Parameters

Name Type Description Notes
page_after str Page after [optional]
page_before str Page before [optional]
page_size int Page size [optional]

Return type

list[Project]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/ld+json

HTTP response details

Status code Description Response headers
200 Ok -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -

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

post_project

Project post_project(body=body)

Create project

Example

from __future__ import print_function
import time
import sysml_v2_api_client
from sysml_v2_api_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 = sysml_v2_api_client.Configuration(
    host = "http://localhost"
)


# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = sysml_v2_api_client.ProjectApi(api_client)
    body = sysml_v2_api_client.Project() # Project |  (optional)

    try:
        # Create project
        api_response = api_instance.post_project(body=body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ProjectApi->post_project: %s\n" % e)

Parameters

Name Type Description Notes
body Project [optional]

Return type

Project

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/ld+json

HTTP response details

Status code Description Response headers
201 Created -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -

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

put_project_by_id

Project put_project_by_id(project_id, body=body)

Update project by ID

Example

from __future__ import print_function
import time
import sysml_v2_api_client
from sysml_v2_api_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 = sysml_v2_api_client.Configuration(
    host = "http://localhost"
)


# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = sysml_v2_api_client.ProjectApi(api_client)
    project_id = 'project_id_example' # str | ID of the project
body = sysml_v2_api_client.Project() # Project |  (optional)

    try:
        # Update project by ID
        api_response = api_instance.put_project_by_id(project_id, body=body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ProjectApi->put_project_by_id: %s\n" % e)

Parameters

Name Type Description Notes
project_id str ID of the project
body Project [optional]

Return type

Project

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/ld+json

HTTP response details

Status code Description Response headers
200 Ok -
415 The requested content type is not acceptable. -
500 Internal server error. -
0 Unexpected response. -

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