AlphaAlpha Docs
API ReferenceMaterials

Create

Create a new material

POST
/materials
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/materials" \  -H "Content-Type: application/json" \  -d '{    "density": 0.1,    "description": "string",    "lifetime": 0,    "metaData": {      "property1": "string",      "property2": "string"    },    "name": "string",    "nlsfb": "string",    "source": "string",    "unit": "string",    "visibility": "PUBLIC"  }'
{
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "density": 0.1,
  "description": "string",
  "id": "string",
  "impact": {
    "carbonEmission": 0.1,
    "carbonStorage": 0.1,
    "eol": {
      "avi": 0.1,
      "dump": 0.1,
      "recycle": 0.1,
      "refabricate": 0.1,
      "reuse": 0.1,
      "stay": 0.1
    },
    "mki": 0.1
  },
  "lifetime": 0,
  "metaData": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "name": "string",
  "nlsfb": "string",
  "origin": {
    "primary": 0.1,
    "renewable": 0.1,
    "secondary": 0.1
  },
  "ownerId": "string",
  "referenceId": "string",
  "source": "string",
  "unit": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "visibility": "PUBLIC"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}