Skip to content
English
  • There are no suggestions because the search field is empty.

Testing the Shoreline Simulation API Using Postman

 

Overview
The Shoreline Simulation API allows customers to create and monitor simulations of wind‑farm construction and maintenance. Before you can call any endpoints, you must authenticate with an OAuth 2.0 token.

Step 1 – Gather prerequisites

  1. Obtain a client ID and client secret from your Shoreline account in the team settings under API clients. These credentials are needed for OAuth 2.0 authentication.

  2. Install Postman from postman.com or use their web tool.

  3. Note the API base URL, which is https://app.shoreline.no/api.

Step 2 – Request an access token

  1. Open Postman and create a new request.

  2. Set the method to POST and the URL to https://app.shoreline.no/api/oauth2/token.

  3. On the Body tab, choose “x‑www‑form‑urlencoded” and add these fields:

    • grant_type = client_credentials

    • client_id = your client ID

    • client_secret = your client secret

    • (Optional) scope if Shoreline requires one.

  4. Send the request. The response returns an access_token. Copy this token for later use.

Step 3 – Set up Postman

You can import the API specification or create the requests manually.

  • Importing the specification

    1. In Postman, click Import, then Link.

    2. Enter https://app.shoreline.no/api/v3/api-docs (the OpenAPI specification used by the Swagger UI).

    3. Postman will generate a collection of endpoints. Edit the collection settings and add two variables: baseUrl = https://app.shoreline.no/api and accessToken = <your token>.

    4. Set the Authorization type to Bearer Token and use as the value.

  • Creating requests manually

    1. Create a new collection called “Shoreline Simulation API.”

    2. Add variables baseUrl = https://app.shoreline.no/api and accessToken containing your token.

    3. For each request below, set Authorization to Bearer Token and use .

Step 4 – Submit a simulation request

  1. Create a POST request at /simulations.

  2. Set the body type to raw JSON. Include required fields:

    {
    "runs": 1,
    "caseId": 123,
    "startDate": "2026-04-01",
    "durationInYears": 1,
    "case": {
    "personnelList": "...",
    "vesselList": "...",
    "windFarms": "..."
    }
    }

    The body must include the number of runs, a case ID, the start date, and the duration in years; the optional case object lets you specify resources.

  3. Send the request. The response returns a requestId. Save this value for the next steps.

Step 5 – Check simulation status

  1. Create a GET request at /simulations/, replacing with the ID from Step 4.

  2. Send the request to see the progress of your simulation. The response lists each run with its number, status, progress, and the outputs available for download.

Step 6 – Download an output file

  1. Identify the runNumber and available output names from the previous response.

  2. Create a GET request at /simulations//runs//outputs/. Replace the placeholders with your request ID, run number (starting at 1) and the output name (such as “excel”).

  3. Send the request. If the file exists, Postman will download or prompt you to save it.

Step 7 – Clone an existing case

  1. To copy a case, create a GET request at /simulations/copy/?startDate=YYYY-MM-DD&durationInYears=n.

  2. Replace with the ID of the case you want to copy, and set startDate and durationInYears accordingly.

  3. Send the request. The response contains the cloned case details, including personnel, vessels and wind‑farm lists. A 404 response means the case could not be found.

Additional tips

  • Store variables (baseUrl, accessToken, requestId) in a Postman environment to reuse them easily.

  • The runs value must be between 1 and 500, and durationInYears must be between 1 and 30.

  • Repeat Step 2 if the token expires.

  • Consult the Swagger UI for detailed schema definitions, parameter ranges and example payloads.

This tutorial should help users authenticate, set up Postman, and exercise each endpoint of the Shoreline Simulation API.