Cosmos Toggles
  • Introduction
  • Getting Started
    • Software Dependencies
  • Build and Test
    • Projects
    • Environments
    • Flags
  • Contribute
Powered by GitBook
On this page
  • Create environment
  • Get environment

Was this helpful?

  1. Build and Test

Environments

Environment api reference

Create environment

POST https://localhost:44362/environments/

This endpoint allows you to get free cakes.

Headers

Name
Type
Description

Content-Type

string

The Content-Type entity header is used to indicate the media type. Use application/json

Request Body

Name
Type
Description

project

object

id

string

Unique identifier environment

name

string

Name of environment

{
  "project": {
     "id": "bc6c5436-ffff-439e-ae27-9b3b967daa11",
     "name": "Sample Project",
     "description": "Sample project to demonstrate cosmos toggles"
  },
  "id": "a809c860-dda0-488c-83b1-a6c5a5621a6f",
  "name": "Development"
}
[
  {
    "code": 409,
    "description": "Data already exists",
    "content": null,
    "friendlyMessages": null
  }
]
{
  "code": 500,
  "description": "Error message"
}

Get environment

GET https://localhost:44362/:projectId

Get environment by project id

Query Parameters

Name
Type
Description

projectId

string

Project identifier

Headers

Name
Type
Description

Content-Type

string

The Content-Type header is used to indicate the media type. Use application/json

{
  "project": {
     "id": "bc6c5436-ffff-439e-ae27-9b3b967daa11",
     "name": "Sample Project",
     "description": "Sample project to demonstrate cosmos toggles"
  },
  "id": "a809c860-dda0-488c-83b1-a6c5a5621a6f",
  "name": "Development"
}
[
  {
    "code": 404,
    "description": "Data nout found",
    "content": null,
    "friendlyMessages": null
  }
]
PreviousProjectsNextFlags

Last updated 5 years ago

Was this helpful?