Last active
October 20, 2017 13:21
-
-
Save degerstrom/0d3c83d1b28ef5ccdc49e013dda5ca53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| swagger: '2.0' | |
| info: | |
| description: | | |
| EcoOnline REST API for the ByggDok project. | |
| All responses from the API will be formatted according to the JSON API specification, which for example means that the expected response items will be wrapped in a `data {}` object, and pagination in a `links {}` object. Both of these elements have been omitted from the documentation below for brevity. | |
| version: unreleased | |
| title: EcoOnline | |
| host: app-test.ecoonline.com | |
| basePath: /app/api | |
| schemes: | |
| - https | |
| securityDefinitions: | |
| Bearer: | |
| type: apiKey | |
| name: Authorization | |
| in: header | |
| tags: | |
| - name: underconsideration | |
| description: These endpoints are still under consideration and need to be incorporated in the EcoOnline API strategy. | |
| - name: wip | |
| description: These endpoints are works in progress, enpoints and return data may change. | |
| paths: | |
| /legislationlist: | |
| get: | |
| tags: | |
| - wip | |
| description: Retrieve list of available legislations. | |
| consumes: | |
| - application/json | |
| produces: | |
| - application/json | |
| parameters: | |
| - name: language | |
| in: body | |
| description: The language the lists will be returned in. | |
| schema: | |
| $ref: '#/definitions/Language' | |
| responses: | |
| '200': | |
| description: successful operation | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/LegislationResponse' | |
| example: | |
| - id: 10 | |
| name: A list name | |
| - id: 376 | |
| name: Another list name | |
| '405': | |
| description: Invalid input | |
| security: | |
| - Bearer: [] | |
| /legislation: | |
| get: | |
| tags: | |
| - wip | |
| description: | | |
| Allows for one of three scenarios: | |
| 1) Retrieve a list of all products within the specified legislation(s). | |
| 2) Search for a product or project name with one or more specified legislation(s). | |
| 3) Search for a product or project name without any specified legislation(s). | |
| consumes: | |
| - application/json | |
| produces: | |
| - application/json | |
| parameters: | |
| - name: body | |
| in: body | |
| description: List of products | |
| schema: | |
| $ref: '#/definitions/LegislationRequest' | |
| responses: | |
| '200': | |
| description: successful operation | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/ProductResponse' | |
| '405': | |
| description: Invalid input | |
| security: | |
| - Bearer: [] | |
| /legislation/{locationId}: | |
| get: | |
| tags: | |
| - wip | |
| description: Retrieve products within the specified legislations | |
| consumes: | |
| - application/json | |
| produces: | |
| - application/json | |
| parameters: | |
| - name: locationId | |
| in: path | |
| description: Location ID | |
| required: true | |
| type: integer | |
| - name: body | |
| in: body | |
| description: List of products | |
| schema: | |
| $ref: '#/definitions/LegislationRequest' | |
| responses: | |
| '200': | |
| description: successful operation | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/ProductResponse' | |
| '405': | |
| description: Invalid input | |
| security: | |
| - Bearer: [] | |
| /sikkerhetsdatablad: | |
| get: | |
| tags: | |
| - underconsideration | |
| description: Hente produkters sikkerhetsdatablad | |
| consumes: | |
| - application/json | |
| produces: | |
| - application/json | |
| parameters: | |
| - name: body | |
| in: body | |
| description: Liste av produkter | |
| required: true | |
| schema: | |
| $ref: '#/definitions/ProductsRequest' | |
| responses: | |
| '200': | |
| description: successful operation | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/Sikkerhetsdatablad' | |
| '405': | |
| description: Invalid input | |
| security: | |
| - Bearer: [] | |
| /verneblad: | |
| get: | |
| tags: | |
| - underconsideration | |
| description: Hente produkters verneblad | |
| consumes: | |
| - application/json | |
| produces: | |
| - application/json | |
| parameters: | |
| - name: body | |
| in: body | |
| description: Liste av produkter | |
| required: true | |
| schema: | |
| $ref: '#/definitions/ProductsRequest' | |
| responses: | |
| '200': | |
| description: successful operation | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/Verneblad' | |
| '405': | |
| description: Invalid input | |
| security: | |
| - Bearer: [] | |
| /stoffliste: | |
| get: | |
| tags: | |
| - underconsideration | |
| description: 'Hente produkters stofflister, merkinger' | |
| consumes: | |
| - application/json | |
| produces: | |
| - application/json | |
| parameters: | |
| - name: body | |
| in: body | |
| description: List of products | |
| required: true | |
| schema: | |
| $ref: '#/definitions/ProductsRequest' | |
| responses: | |
| '200': | |
| description: successful operation | |
| schema: | |
| type: array | |
| items: | |
| $ref: '#/definitions/Stoffliste' | |
| '405': | |
| description: Invalid input | |
| security: | |
| - Bearer: [] | |
| definitions: | |
| ProductResponse: | |
| type: object | |
| properties: | |
| key: | |
| description: Internal, unique product indentifier | |
| type: integer | |
| name: | |
| description: Product name | |
| type: string | |
| language: | |
| description: | | |
| Product language | |
| ISO 3166-2 country code (https://en.wikipedia.org/wiki/ISO_3166-2) | |
| English is the default and fallback language. | |
| type: string | |
| legislation: | |
| description: Legislation list ID | |
| type: integer | |
| listname: | |
| description: Name of legislation list | |
| type: string | |
| link: | |
| description: Link to legislation list | |
| type: string | |
| cas_no: | |
| description: The products _CAS_ number | |
| type: integer | |
| ec_no: | |
| description: The products _EC_ number | |
| type: integer | |
| index_no: | |
| description: The products _Index_ number | |
| type: integer | |
| phaseout: | |
| description: True if the product is being phased out | |
| type: boolean | |
| supportlink: | |
| description: Link to legislative information about the product | |
| type: string | |
| LegislationRequest: | |
| type: object | |
| properties: | |
| language: | |
| description: | | |
| ISO 3166-2 country code (https://en.wikipedia.org/wiki/ISO_3166-2) | |
| English is the default and fallback language. | |
| type: string | |
| example: "no" | |
| default: "en" | |
| legislationlists: | |
| description: Comma separated list of legislations IDs | |
| type: string | |
| example: '1,2,3' | |
| name: | |
| description: Name of location or project | |
| type: string | |
| example: 'ByggDok' | |
| LegislationResponse: | |
| type: object | |
| properties: | |
| id: | |
| description: Legislation list id | |
| type: integer | |
| name: | |
| description: Legislation list name | |
| type: string | |
| Language: | |
| type: object | |
| properties: | |
| language: | |
| description: | | |
| ISO 3166-2 country code (https://en.wikipedia.org/wiki/ISO_3166-2) | |
| English is the default and fallback language. (Fallback means we'll use that language if we can't find the one you ask for). | |
| type: string | |
| example: "no" | |
| default: "en" | |
| Sikkerhetsdatablad: | |
| type: array | |
| items: | |
| type: object | |
| required: | |
| - uri | |
| properties: | |
| nobb_no: | |
| description: Produktets NOBB Nummer | |
| type: boolean | |
| gtin_no: | |
| description: Produktets GTIN Nummer | |
| type: boolean | |
| uri: | |
| description: Uri til sikkerhetsdatablad | |
| type: string | |
| Verneblad: | |
| type: array | |
| items: | |
| type: object | |
| required: | |
| - uri | |
| properties: | |
| nobb_no: | |
| description: Produktets NOBB Nummer | |
| type: boolean | |
| gtin_no: | |
| description: Produktets GTIN Nummer | |
| type: boolean | |
| uri: | |
| description: Uri til verneblad | |
| type: string | |
| Stoffliste: | |
| type: object | |
| properties: | |
| nobb_no: | |
| description: Produktets NOBB Nummer | |
| type: boolean | |
| gtin_no: | |
| description: Produktets GTIN Nummer | |
| type: boolean | |
| priolisten: | |
| description: Den norske prioritetslisten | |
| type: boolean | |
| reachKandidat: | |
| description: REACH Kandidatliste | |
| type: boolean | |
| reachGodkjenning: | |
| description: REACH Godkjenningsliste | |
| type: boolean | |
| a20: | |
| description: A20 listen | |
| type: boolean | |
| sin: | |
| description: SIN listen | |
| type: boolean | |
| clp: | |
| description: Den europeiske CLP listen. Liste over merkinger. | |
| type: array | |
| items: | |
| description: >- | |
| En av kodene: 1) Eksplosive stoffer og gjenstander. 2) Gasser 3) | |
| Brannfarlig væsker, 4.1) Brannfarlig faste stoffer, 4.2) | |
| Selvantennende stoffer. ... | |
| type: string | |
| eksponeringsregister: | |
| description: Eksponeringslisten | |
| type: object | |
| required: | |
| - registerpaakrevd | |
| properties: | |
| risikovurdert: | |
| type: object | |
| required: | |
| - brann | |
| - helse | |
| - miljo | |
| properties: | |
| brann: | |
| description: Brannrisiko. Verdi 1-5. | |
| type: integer | |
| helse: | |
| description: Helserisiko. Verdi 1-5. | |
| type: integer | |
| miljo: | |
| description: Miljørisiko. Verdi 1-5. | |
| type: integer | |
| registerpaakrevd: | |
| description: Om produktet må føre personregister/eksponeringsregister | |
| type: boolean | |
| ProductsRequest: | |
| type: array | |
| items: | |
| type: object | |
| properties: | |
| nobb_no: | |
| description: Produktets NOBB Nummer | |
| type: string | |
| gtin_no: | |
| description: Produktets GTIN Nummer | |
| type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment