AlphaAlpha Docs

Materials

API calls concerning materials

Find all

GET
/materials
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/materials"
[
  {
    "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"
}

Create

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

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"
}

Delete by list of ids

DELETE
/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

curl -X DELETE "http://localhost:18080/api/v1/materials" \  -H "Content-Type: application/json" \  -d '[    "string"  ]'
Empty
{
  "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"
}

Find by list of ids

GET
/materials/find
AuthorizationBearer <token>

In: header

Query Parameters

ids*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/materials/find?ids=string"
[
  {
    "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"
}

Find by id

GET
/materials/find/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/materials/find/string"
{
  "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"
}

Import

POST
/materials/import/{visibility}/{source}
AuthorizationBearer <token>

In: header

Path Parameters

visibility*string
Value in"PUBLIC" | "PRIVATE"
source*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/materials/import/PUBLIC/string" \  -H "Content-Type: application/json" \  -d '{    "file": "string"  }'
"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"
}

Get page by page number and size with optional sorting based on field to sortBy and direction

GET
/materials/page
AuthorizationBearer <token>

In: header

Query Parameters

pageNumber?integer
Formatint32
pageSize?integer
Formatint32
sortBy?string
direction?string
Value in"ASC" | "DESC"
search?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/materials/page"
{
  "content": [
    {
      "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"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "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"
}

Get page by page number and size with optional sorting based on field to sortBy and direction

GET
/materials/page/my-org/search
AuthorizationBearer <token>

In: header

Query Parameters

pageNumber*integer
Formatint32
pageSize?integer
Formatint32
sortBy?string
direction?string
Value in"ASC" | "DESC"
search?string
myOrg?boolean

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/materials/page/my-org/search?pageNumber=0"
{
  "content": [
    {
      "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"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "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"
}

Create or update by reference

POST
/materials/reference/{referenceId}
AuthorizationBearer <token>

In: header

Path Parameters

referenceId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/materials/reference/string" \  -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"
}

Search materials

GET
/materials/search
AuthorizationBearer <token>

In: header

Query Parameters

search?string
pageNumber?integer
Formatint32
pageSize?integer
Formatint32
sortBy?string
direction?string
Value in"ASC" | "DESC"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/materials/search"
{
  "content": [
    {
      "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"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "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"
}

Update

PATCH
/materials/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/materials/string" \  -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"
}

Delete by id

DELETE
/materials/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/materials/string"
Empty
{
  "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"
}

Update

PATCH
/materials/{nlsfb}/{name}
AuthorizationBearer <token>

In: header

Path Parameters

nlsfb*string
name*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/materials/string/string" \  -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"
}

Update

PATCH
/materials/{organisationId}/{nlsfb}/{name}
AuthorizationBearer <token>

In: header

Path Parameters

organisationId*string
nlsfb*string
name*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/materials/string/string/string" \  -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"
}