Skip to content

Latest commit

 

History

History
356 lines (257 loc) · 15 KB

OrganizationJobTemplatesApi.md

File metadata and controls

356 lines (257 loc) · 15 KB

phrase_api.OrganizationJobTemplatesApi

All URIs are relative to https://api.phrase.com/v2

Method HTTP request Description
organization_job_template_create POST /accounts/{account_id}/job_templates Create an organization job template
organization_job_template_delete DELETE /accounts/{account_id}/job_templates/{id} Delete an organization job template
organization_job_template_update PATCH /accounts/{account_id}/job_templates/{id} Update an organization job template
organization_job_templates_list GET /accounts/{account_id}/job_templates List organization job templates
organization_job_templates_show GET /accounts/{account_id}/job_templates/{id} Get a single organization job template

organization_job_template_create

OrganizationJobTemplateDetails organization_job_template_create(account_id, organization_job_template_create_parameters, x_phrase_app_otp=x_phrase_app_otp)

Create an organization job template

Create a new organization job template.

Example

from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint

configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'

# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = phrase_api.OrganizationJobTemplatesApi(api_client)
    account_id = 'account_id_example' # str | Account ID (required)
    organization_job_template_create_parameters = phrase_api.OrganizationJobTemplateCreateParameters() # OrganizationJobTemplateCreateParameters |  (required)
    x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)

    try:
        # Create an organization job template
        api_response = api_instance.organization_job_template_create(account_id, organization_job_template_create_parameters, x_phrase_app_otp=x_phrase_app_otp)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling OrganizationJobTemplatesApi->organization_job_template_create: %s\n" % e)

Parameters

Name Type Description Notes
account_id str Account ID
organization_job_template_create_parameters OrganizationJobTemplateCreateParameters
x_phrase_app_otp str Two-Factor-Authentication token (optional) [optional]

Return type

OrganizationJobTemplateDetails

Authorization

Basic, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
400 Bad request * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
404 Not Found * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
429 Rate Limiting * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -

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

organization_job_template_delete

organization_job_template_delete(account_id, id, x_phrase_app_otp=x_phrase_app_otp)

Delete an organization job template

Delete an existing organization job template.

Example

from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint

configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'

# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = phrase_api.OrganizationJobTemplatesApi(api_client)
    account_id = 'account_id_example' # str | Account ID (required)
    id = 'id_example' # str | ID (required)
    x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)

    try:
        # Delete an organization job template
        api_instance.organization_job_template_delete(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
    except ApiException as e:
        print("Exception when calling OrganizationJobTemplatesApi->organization_job_template_delete: %s\n" % e)

Parameters

Name Type Description Notes
account_id str Account ID
id str ID
x_phrase_app_otp str Two-Factor-Authentication token (optional) [optional]

Return type

void (empty response body)

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The resource was deleted successfully. * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
400 Bad request * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
404 Not Found * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
429 Rate Limiting * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -

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

organization_job_template_update

OrganizationJobTemplateDetails organization_job_template_update(account_id, id, organization_job_template_update_parameters, x_phrase_app_otp=x_phrase_app_otp)

Update an organization job template

Update an existing organization job template.

Example

from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint

configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'

# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = phrase_api.OrganizationJobTemplatesApi(api_client)
    account_id = 'account_id_example' # str | Account ID (required)
    id = 'id_example' # str | ID (required)
    organization_job_template_update_parameters = phrase_api.OrganizationJobTemplateUpdateParameters() # OrganizationJobTemplateUpdateParameters |  (required)
    x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)

    try:
        # Update an organization job template
        api_response = api_instance.organization_job_template_update(account_id, id, organization_job_template_update_parameters, x_phrase_app_otp=x_phrase_app_otp)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling OrganizationJobTemplatesApi->organization_job_template_update: %s\n" % e)

Parameters

Name Type Description Notes
account_id str Account ID
id str ID
organization_job_template_update_parameters OrganizationJobTemplateUpdateParameters
x_phrase_app_otp str Two-Factor-Authentication token (optional) [optional]

Return type

OrganizationJobTemplateDetails

Authorization

Basic, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
400 Bad request * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
404 Not Found * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
429 Rate Limiting * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -

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

organization_job_templates_list

List[OrganizationJobTemplate] organization_job_templates_list(account_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page)

List organization job templates

List all job templates for the given account.

Example

from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint

configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'

# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = phrase_api.OrganizationJobTemplatesApi(api_client)
    account_id = 'account_id_example' # str | Account ID (required)
    x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
    page = 1 # int | Page number
    per_page = 25 # int | Limit on the number of objects to be returned, between 1 and 100. 25 by default

    try:
        # List organization job templates
        api_response = api_instance.organization_job_templates_list(account_id, x_phrase_app_otp=x_phrase_app_otp, page=page, per_page=per_page)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling OrganizationJobTemplatesApi->organization_job_templates_list: %s\n" % e)

Parameters

Name Type Description Notes
account_id str Account ID
x_phrase_app_otp str Two-Factor-Authentication token (optional) [optional]
page int Page number [optional]
per_page int Limit on the number of objects to be returned, between 1 and 100. 25 by default [optional]

Return type

List[OrganizationJobTemplate]

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
* Link -
* Pagination -
400 Bad request * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
404 Not Found * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
429 Rate Limiting * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -

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

organization_job_templates_show

OrganizationJobTemplateDetails organization_job_templates_show(account_id, id, x_phrase_app_otp=x_phrase_app_otp)

Get a single organization job template

Get details on a single organization job template for a given account.

Example

from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint

configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'

# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = phrase_api.OrganizationJobTemplatesApi(api_client)
    account_id = 'account_id_example' # str | Account ID (required)
    id = 'id_example' # str | ID (required)
    x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)

    try:
        # Get a single organization job template
        api_response = api_instance.organization_job_templates_show(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling OrganizationJobTemplatesApi->organization_job_templates_show: %s\n" % e)

Parameters

Name Type Description Notes
account_id str Account ID
id str ID
x_phrase_app_otp str Two-Factor-Authentication token (optional) [optional]

Return type

OrganizationJobTemplateDetails

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
400 Bad request * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
404 Not Found * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
429 Rate Limiting * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -

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