Jump to: navigation, search

Difference between revisions of "Meteos/API"

(List Data Sets)
(Create Data Set (Download))
Line 220: Line 220:
 
'''Response'''
 
'''Response'''
 
<pre>
 
<pre>
 +
{
 +
    "dataset": {
 +
        "created_at": "2016-11-30T06:57:28.000000",
 +
        "description": "This is a sample dataset",
 +
        "head": null,
 +
        "id": "9fd54ac9-2da4-4c56-b8f1-fc05fda635b2",
 +
        "name": "sample-data",
 +
        "project_id": "475312c52eb941d3ab072fba9271d9c1",
 +
        "status": "creating",
 +
        "stderr": null,
 +
        "user_id": "511c049d52524ba9b14b0ff33867d3b8"
 +
    }
 +
}
 
</pre>
 
</pre>
  

Revision as of 06:57, 30 November 2016

API (TBD)

Experiment Template

Create Experiment Template

  • POST /v1/<tenant_id>/templates

Request

{
    "template": {
        "display_description": "This is a sample template of experiment", 
        "display_name": "example-template", 
        "floating_ip_pool": "56a30dc6-79d9-422d-94ba-cd4dbceea9a4", 
        "image_id": "9692f7a3-7dfa-4b8c-904c-4f4be3d1ebe7", 
        "master_flavor_id": "4", 
        "master_nodes_num": 1, 
        "spark_version": "1.6", 
        "worker_flavor_id": "2", 
        "worker_nodes_num": 2
    }
}

Response

{
    "template": {
        "cluster_id": null, 
        "created_at": "2016-11-30T06:13:07.000000", 
        "description": "This is a sample template of experiment", 
        "id": "aea85a97-ea67-4717-93ae-54b7c5cd6492", 
        "master_flavor": "4", 
        "master_nodes": 1, 
        "name": "example-template", 
        "project_id": "475312c52eb941d3ab072fba9271d9c1", 
        "spark_version": "1.6", 
        "status": "available", 
        "user_id": "511c049d52524ba9b14b0ff33867d3b8", 
        "worker_flavor": "2", 
        "worker_nodes": 2
    }
}

List Experiment Templates

  • GET /v1/<tenant_id>/templates

Response

{
    "templates": [
        {
            "description": "This is a sample template of experiment", 
            "id": "8e6f12ac-a08c-4ec5-996f-9be06c357cfb", 
            "links": [
                {
                    "href": "/v1/475312c52eb941d3ab072fba9271d9c1/templates/....", 
                    "rel": "self"
                }, 
                {
                    "href": "/475312c52eb941d3ab072fba9271d9c1/templates/....", 
                    "rel": "bookmark"
                }
            ], 
            "master_nodes": 1, 
            "name": "example-template", 
            "spark_version": "1.6", 
            "status": "available", 
            "worker_nodes": 5
        }, 
        {
            "description": "This is a sample template of experiment", 
            "id": "aea85a97-ea67-4717-93ae-54b7c5cd6492", 
            "links": [
                {
                    "href": "/v1/475312c52eb941d3ab072fba9271d9c1/templates/....", 
                    "rel": "self"
                }, 
                {
                    "href": "475312c52eb941d3ab072fba9271d9c1/templates/....", 
                    "rel": "bookmark"
                }
            ], 
            "master_nodes": 1, 
            "name": "example-template", 
            "spark_version": "1.6", 
            "status": "available", 
            "worker_nodes": 2
        }
    ]
}

Show Experiment Template

  • GET /v1/<tenant_id>/templates/<template_id>

Response

{
    "template": {
        "cluster_id": null, 
        "created_at": "2016-11-30T06:23:29.000000", 
        "description": "This is a sample template of experiment", 
        "id": "8e6f12ac-a08c-4ec5-996f-9be06c357cfb", 
        "master_flavor": "5", 
        "master_nodes": 1, 
        "name": "example-template", 
        "project_id": "475312c52eb941d3ab072fba9271d9c1", 
        "spark_version": "1.6", 
        "status": "available", 
        "user_id": "511c049d52524ba9b14b0ff33867d3b8", 
        "worker_flavor": "4", 
        "worker_nodes": 5
    }
}

Delete Experiment Template

  • DELETE /v1/<tenant_id>/templates/<template_id>

Experiment

Create Experiment

  • POST /v1/<tenant_id>/experiments

Request

{
    "experiment": {
        "display_description": "This is a sample experiment", 
        "display_name": "example-experiment", 
        "key_name": "key1", 
        "neutron_management_network": "fada8863-56b7-461b-b647-9334500c25df", 
        "template_id": "aea85a97-ea67-4717-93ae-54b7c5cd6492"
    }
}

Response

{
    "experiment": {
        "created_at": "2016-11-30T06:38:12.000000", 
        "description": "This is a sample experiment", 
        "id": "b45fb6a9-6f93-4e4b-93ec-0b128927b62d", 
        "key_name": "key1", 
        "management_network": "fada8863-56b7-461b-b647-9334500c25df", 
        "name": "example-experiment", 
        "project_id": "475312c52eb941d3ab072fba9271d9c1", 
        "status": "creating", 
        "user_id": "511c049d52524ba9b14b0ff33867d3b8"
    }
}

List Experiments

  • GET /v1/<tenant_id>/experiments

Response

{
    "experiments": [
        {
            "created_at": "2016-11-30T06:38:12.000000", 
            "description": "This is a sample experiment", 
            "id": "b45fb6a9-6f93-4e4b-93ec-0b128927b62d", 
            "links": [
                {
                    "href": "/v1/475312c52eb941d3ab072fba9271d9c1/experiments/....", 
                    "rel": "self"
                }, 
                {
                    "href": "/475312c52eb941d3ab072fba9271d9c1/experiments/....", 
                    "rel": "bookmark"
                }
            ], 
            "name": "example-experiment", 
            "status": "creating"
        }
    ]
}

Show Experiment

  • GET /v1/<tenant_id>/experiments/<experiment_id>

Response

{
    "experiment": {
        "created_at": "2016-11-30T06:38:12.000000", 
        "description": "This is a sample experiment", 
        "id": "b45fb6a9-6f93-4e4b-93ec-0b128927b62d", 
        "key_name": "key1", 
        "management_network": "fada8863-56b7-461b-b647-9334500c25df", 
        "name": "example-experiment", 
        "project_id": "475312c52eb941d3ab072fba9271d9c1", 
        "status": "creating", 
        "user_id": "511c049d52524ba9b14b0ff33867d3b8"
    }
}

Delete Experiment

  • DELETE /v1/<tenant_id>/experiments/<experiment_id>

Data Set

Create Data Set (Download)

  • POST /v1/<tenant_id>/datasets

Request

{
    "dataset": {
        "created_at": "2016-11-30T06:54:08.000000", 
        "description": "This is a sample dataset", 
        "head": null, 
        "id": "da6131ae-783f-45b5-a3eb-56050f0eed46", 
        "name": "sample-data", 
        "project_id": "475312c52eb941d3ab072fba9271d9c1", 
        "status": "creating", 
        "stderr": null, 
        "user_id": "511c049d52524ba9b14b0ff33867d3b8"
    }
}

Response

{
    "dataset": {
        "created_at": "2016-11-30T06:57:28.000000", 
        "description": "This is a sample dataset", 
        "head": null, 
        "id": "9fd54ac9-2da4-4c56-b8f1-fc05fda635b2", 
        "name": "sample-data", 
        "project_id": "475312c52eb941d3ab072fba9271d9c1", 
        "status": "creating", 
        "stderr": null, 
        "user_id": "511c049d52524ba9b14b0ff33867d3b8"
    }
}

Create Data Set (Parse)

  • POST /v1/<tenant_id>/datasets

Request


Response


List Data Sets

  • GET /v1/<tenant_id>/datasets

Response

{
    "datasets": [
        {
            "created_at": "2016-11-30T06:54:08.000000", 
            "description": "This is a sample dataset", 
            "id": "da6131ae-783f-45b5-a3eb-56050f0eed46", 
            "links": [
                {
                    "href": "/v1/475312c52eb941d3ab072fba9271d9c1/datasets/....", 
                    "rel": "self"
                }, 
                {
                    "href": "/475312c52eb941d3ab072fba9271d9c1/datasets/....", 
                    "rel": "bookmark"
                }
            ], 
            "name": "sample-data", 
            "source_dataset_url": "swift://meteos/linear_data.txt", 
            "status": "creating"
        }
    ]
}

Show Data Sets

  • GET /v1/<tenant_id>/datasets/<dataset_id>

Response


Delete Data Set

  • DELETE /v1/<tenant_id>/datasets/<dataset_id>

Prediction Model

Create Prediction Model

  • POST /v1/<tenant_id>/models

Request


Response


List Prediction Models

  • GET /v1/<tenant_id>/models

Response


Show Model

  • GET /v1/<tenant_id>/models/<moded_id>

Response


Delete Model

  • DELETE /v1/<tenant_id>/models/<model_id>

Learning Job

Create Learning Job

  • POST /v1/<tenant_id>/jobs

Request


Response


List Learning Jobs

  • GET /v1/<tenant_id>/jobs

Response


Show Learning Job

  • GET /v1/<tenant_id>/jobs/<job_id>

Response


Delete Learning Job

  • DELETE/v1/<tenant_id>/jobs/<job_id>