Import api-ref docs (#2)

Import api-ref docs

Reviewed-by: kucerakk <kucerakk@gmail.com>
This commit is contained in:
Artem Goncharov 2022-03-28 14:03:38 +02:00 committed by GitHub
parent 704fc0626f
commit 488022ee6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
200 changed files with 40090 additions and 1 deletions

View File

@ -3,6 +3,7 @@
merge-mode: squash-merge
default-branch: main
templates:
- api-ref-hc-jobs
- umn-hc-jobs
check:
jobs:

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
=================
Application Cases
=================
.. toctree::
:maxdepth: 1
creating_a_training_job_using_the_tensorflow_framework

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,98 @@
Creating a ModelArts Agency
===========================
Function
--------
This API is used to create an agency so that ModelArts can access dependent services such as OBS, SWR, and IEF.
URI
---
POST /v2/{project_id}/agency
.. table:: **Table 1** Path parameters
+------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+============+===========+========+=======================================================================================================================================================+
| project_id | Yes | String | Project ID. For details about how to obtain a project ID, see `Obtaining a Project ID <../common_parameters/obtaining_a_project_id_and_name.html>`__. |
+------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
Request Parameters
------------------
.. _CreateModelArtsAgencyrequestCreateModelArtsAgencyRequest:
.. table:: **Table 2** Request body parameters
+--------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+====================+=================+=================+============================================================================================================================+
| agency_name_suffix | No | String | Agency name suffix. |
| | | | |
| | | | The parameter contains a maximum of 50 characters. |
| | | | |
| | | | The agency name prefix is consistently to be **ma_agency**. |
| | | | |
| | | | For example, if the value of this parameter is **iam-user01**, the name of the created agency is **ma_agency_iam-user01**. |
| | | | |
| | | | The value of this parameter is left blank by default, indicating that an agency named **modelarts_agency** is created. |
+--------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------+
Response Parameters
-------------------
None
Example Requests
----------------
Create a ModelArts agency.
.. code-block::
POST https://{endpoint}/v2/{project_id}/agency
{
"agency_name_suffix" : "iam-user01"
}
Example Responses
-----------------
**Status code: 200**
OK
.. code-block::
{
"agency_name" : "ma_agency_iam-user01"
}
Status Codes
------------
.. _CreateModelArtsAgencystatuscode:
=========== ============
Status Code Description
=========== ============
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
=========== ============
Error Codes
-----------
See `Error Codes <../common_parameters/error_codes.html>`__.

View File

@ -0,0 +1,84 @@
Deleting Authorization
======================
Function
--------
This API is used to delete the authorization of a specified user or all users.
URI
---
DELETE /v2/{project_id}/authorizations
.. table:: **Table 1** Path parameters
+------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+============+===========+========+=======================================================================================================================================================+
| project_id | Yes | String | Project ID. For details about how to obtain a project ID, see `Obtaining a Project ID <../common_parameters/obtaining_a_project_id_and_name.html>`__. |
+------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
.. table:: **Table 2** Query parameters
+-----------+-----------+--------+---------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+===========+===========+========+===================================================================================================+
| user_id | No | String | User ID. If this parameter is set to **all**, the authorization of all IAM users will be deleted. |
+-----------+-----------+--------+---------------------------------------------------------------------------------------------------+
Request Parameters
------------------
None
Response Parameters
-------------------
None
Example Requests
----------------
Delete the authorization of a specified user.
.. code-block::
DELETE https://{endpoint}/v2/{project_id}/authorizations?user_id=****d80fb058844ae8b82aa66d9fe****
Example Responses
-----------------
**Status code: 200**
OK
.. code-block::
{
"result" : "true"
}
Status Codes
------------
.. _DeleteAuthorizationsstatuscode:
=========== ============
Status Code Description
=========== ============
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
=========== ============
Error Codes
-----------
See `Error Codes <../common_parameters/error_codes.html>`__.

View File

@ -0,0 +1,11 @@
========================
Authorization Management
========================
.. toctree::
:maxdepth: 1
configuring_authorization
viewing_an_authorization_list
deleting_authorization
creating_a_modelarts_agency

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
API Calling
===========
ModelArts supports Representational State Transfer (REST) APIs, allowing you to call APIs using HTTPS. For details about API calling, see `Calling APIs <../calling_apis/making_an_api_request.html#modelarts030005>`__.

View File

@ -0,0 +1,26 @@
Basic Concepts
==============
- Account
An account is created upon successful registration with the cloud platform. The account has full access permissions for all of its cloud services and resources. It can be used to reset user passwords and grant user permissions.
- Region
A region is a physical location where a cloud service is deployed. Availability zones (AZ) in the same region can communicate with each other over an intranet but AZs in different regions cannot communicate with each other. By creating cloud resources in different regions, you can design applications to better meet customer requirements and comply with local laws and regulations.
- AZ
An AZ contains one or more physical data centers. It has independent cooling, fire extinguishing, moisture-proof, and electricity facilities. Within an AZ, computing, network, storage, and other resources are logically divided into multiple clusters. AZs within a region are interconnected using high-speed optical fibers to allow users to build cross-AZ high-availability systems.
- Project
Projects group and isolate compute, storage, and network resources across physical regions. A default project is provided for each region, and subprojects can be created under each default project. Users can be granted permissions to access all resources in a specific project. For more refined access control, create subprojects under a project and purchase resources in the subprojects. Users can then be assigned permissions to access only specific resources in the subprojects.
.. figure:: /_static/images/en-us_image_0171392261.gif
:alt: **Figure 1** Project isolation model
**Figure 1** Project isolation model

View File

@ -0,0 +1,28 @@
Endpoints
=========
Endpoints are **request address** for calling APIs. Endpoints vary depending on services and regions. To obtain the regions and endpoints, contact the enterprise administrator.
A service endpoint consists of the service name, region ID, and external domain name in the format of "{service_name}.{region_id}.{external_domain_name}". For details about how to obtain each parameter, see `Table 1 <#modelarts030141enustopic0000001072357044table8700253831>`__.
.. _modelarts030141enustopic0000001072357044table8700253831:
.. table:: **Table 1** Obtaining an endpoint
+----------------------+-------------------------------------------------+------------------------------------------+
| Parameter | Description | How to Obtain |
+======================+=================================================+==========================================+
| service_name | Abbreviation of a case-insensitive service name | **modelarts** for ModelArts by default. |
+----------------------+-------------------------------------------------+------------------------------------------+
| region_id | Region ID | Obtain the value from the administrator. |
+----------------------+-------------------------------------------------+------------------------------------------+
| external_domain_name | External domain name suffix | Obtain the value from the administrator. |
+----------------------+-------------------------------------------------+------------------------------------------+
.. important::
If an endpoint uses a domain name, configure the hosts file in the format of "{float-ip} {service_name}.{region_id}.{external_domain_name}" on the local PC. Obtain **float-ip** from the administrator.

View File

@ -0,0 +1,11 @@
================
Before You Start
================
.. toctree::
:maxdepth: 1
overview
api_calling
endpoints
basic_concepts

View File

@ -0,0 +1,6 @@
Overview
========
ModelArts is a one-stop AI development platform geared toward developers and data scientists of all skill levels. It enables you to rapidly build, train, and deploy models anywhere (from the cloud to the edge), and manage full-lifecycle AI workflows. ModelArts accelerates AI development and fosters AI innovation with key capabilities, including data preprocessing and auto labeling, distributed training, automated model building, and one-click workflow execution. You can use ModelArts through open APIs. For details about all ModelArts APIs, see `API Overview <../api_overview.html>`__.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
============
Calling APIs
============
.. toctree::
:maxdepth: 1
making_an_api_request
authentication
response

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
Change History
==============
.. _modelarts030097enustopic0135263212table1819116292310:
=========== ===================================
Released On Description
=========== ===================================
2021-04-30 This is the first official release.
=========== ===================================

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
=================
Common Parameters
=================
.. toctree::
:maxdepth: 1
status_code
error_codes
obtaining_a_project_id_and_name
obtaining_an_account_name_and_id
obtaining_a_username_and_id

View File

@ -0,0 +1,52 @@
Obtaining a Project ID and Name
===============================
Scenarios
---------
A project ID or name is required for some requests when an API is called. Therefore, obtain the project ID and name before calling the API. Use either of the following methods:
- `Obtaining a Project ID and Name from the Console <#obtaining-a-project-id-and-name-from-the-console>`__
- `Obtaining a Project ID by Calling an API <#obtaining-a-project-id-by-calling-an-api>`__
Obtaining a Project ID and Name from the Console
------------------------------------------------
To do so, perform the following operations:
#. Log in to the console.
#. In the upper right corner, click your account avatar icon and choose **My Settings** from the drop-down list.
#. On the **My Settings** page, go to the **Project List** tab page, which is displayed by default. View the project ID and name in the project list.
Obtaining a Project ID by Calling an API
----------------------------------------
The API for obtaining a project ID is **GET https://**\ *{iam-endpoint}*\ **/v3/projects**. To obtain *{iam-endpoint}*, see `Request URI <../calling_apis/making_an_api_request.html#request-uri>`__\ `Endpoints <../before_you_start/endpoints.html>`__.
The following is an example response. For example, if ModelArts is deployed in the **xxx** region, the value of **name** in the response body is **xxx**. The value of **id** in **projects** is the project ID.
.. code-block::
{
"projects": [{
"domain_id": "65382450e8f64ac0870cd180d14e684b",
"is_domain": false,
"parent_id": "65382450e8f64ac0870cd180d14e684b",
"name": "xxx",
"description": "",
"links": {
"next": null,
"previous": null,
"self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99"
},
"id": "a4a5d4098fb4474fa22cd05f897d6b99",
"enabled": true
}],
"links": {
"next": null,
"previous": null,
"self": "https://www.example.com/v3/projects"
}
}

View File

@ -0,0 +1,18 @@
Obtaining a Username and ID
===========================
When you call APIs, certain requests require the username and ID. To obtain a username and ID, do as follows:
#. Log in to the management console after registration.
#. In the upper right corner, click your account avatar icon and choose **My Settings** from the drop-down list.
On the **My Settings** page, view the username and ID.
.. figure:: /_static/images/en-us_image_0000001126895190.png
:alt: **Figure 1** Viewing the username and ID
**Figure 1** Viewing the username and ID

View File

@ -0,0 +1,18 @@
Obtaining an Account Name and ID
================================
When you call APIs, certain requests require the account name and ID. To obtain an account name and ID, do as follows:
#. Sign up and log in to the console.
#. Hover the cursor on the username and choose **My Credentials** from the drop-down list.
On the **API Credentials** page, view the account name and ID.
.. figure:: /_static/images/en-us_image_0000001126894914.png
:alt: **Figure 1** Viewing the account name and ID
**Figure 1** Viewing the account name and ID

File diff suppressed because it is too large Load Diff

166
api-ref/source/conf.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
================
Data Export Task
================
.. toctree::
:maxdepth: 1
querying_the_dataset_export_task_list
creating_a_dataset_export_task
querying_the_status_of_a_dataset_export_task

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
================
Data Import Task
================
.. toctree::
:maxdepth: 1
querying_the_dataset_import_task_list
creating_an_import_task
querying_details_about_a_dataset_import_task

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
=========================
Data Synchronization Task
=========================
.. toctree::
:maxdepth: 1
synchronizing_a_dataset
querying_the_status_of_a_dataset_synchronization_task

View File

@ -0,0 +1,69 @@
Synchronizing a Dataset
=======================
Function
--------
This API is used to synchronize samples and labeling information from the input dataset path to the dataset.
URI
---
POST /v2/{project_id}/datasets/{dataset_id}/sync-data
.. table:: **Table 1** Path parameters
+------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+============+===========+========+============================================================================================================================================================+
| dataset_id | Yes | String | Dataset ID. |
+------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| project_id | Yes | String | Project ID. For details about how to obtain the project ID, see `Obtaining a Project ID <../../common_parameters/obtaining_a_project_id_and_name.html>`__. |
+------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
Request Parameters
------------------
None
Response Parameters
-------------------
None
Example Requests
----------------
Synchronizing a Dataset
.. code-block::
POST https://{endpoint}/v2/{project_id}/datasets/{dataset_id}/sync-data
Example Responses
-----------------
None
Status Codes
------------
.. _SyncDataSourcestatuscode:
=========== ============
Status Code Description
=========== ============
200 OK
401 Unauthorized
403 Forbidden
404 Not Found
=========== ============
Error Codes
-----------
See `Error Codes <../../common_parameters/error_codes.html>`__.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,74 @@
Deleting a Dataset
==================
Function
--------
This API is used to delete a dataset without deleting the source data of the dataset.
URI
---
DELETE /v2/{project_id}/datasets/{dataset_id}
.. table:: **Table 1** Path parameters
+------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+============+===========+========+============================================================================================================================================================+
| dataset_id | Yes | String | Dataset ID. |
+------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| project_id | Yes | String | Project ID. For details about how to obtain the project ID, see `Obtaining a Project ID <../../common_parameters/obtaining_a_project_id_and_name.html>`__. |
+------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
Request Parameters
------------------
None
Response Parameters
-------------------
None
Example Requests
----------------
Deleting a Dataset
.. code-block::
DELETE https://{endpoint}/v2/{project_id}/datasets/{dataset_id}
Example Responses
-----------------
**Status code: 204**
No Content
.. code-block::
{ }
Status Codes
------------
.. _DeleteDatasetstatuscode:
=========== ============
Status Code Description
=========== ============
204 No Content
401 Unauthorized
403 Forbidden
=========== ============
Error Codes
-----------
See `Error Codes <../../common_parameters/error_codes.html>`__.

View File

@ -0,0 +1,16 @@
==================
Dataset Management
==================
.. toctree::
:maxdepth: 1
response_body_for_querying_the_dataset_list.
creating_a_dataset
querying_details_about_a_dataset
modifying_a_dataset
deleting_a_dataset
querying_dataset_statistics
querying_the_monitoring_data_of_a_dataset
querying_details_about_team_labeling_task_statistics
querying_details_about_the_progress_of_a_team_labeling_task_member

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More