Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Skenarios service has an API which can be used to maintain portfolio and properties. The base URL for all requests is https://api.skenarios.com/

...

ResponseExplanation
200 OKYour request was processed successfully
201 CreatedYour request was processed successfully, an object was created
400 Bad RequestSomething is wrong in the received data or query. This is most likely a format issue.
401 UnauthorizedYour request was not authorized, please check the JWT token.
403 ForbiddenThe user-specified in the JWT token has no access privileges on the given object.
404 Not FoundThe requested service doesn't exist
422 Unprocessable EntitySent parameters were understood, but their content was problematic. Please check your input.
500 Internal Server ErrorWhoops! This is embarrassing, something unexpected happened. We'll take a look at the issue as soon as possible. 

...

wget --quiet \
--method POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your JWT token here>' \
--header 'Cache-Control: no-cache' \
--body-data '{"title":"My new portfolio!", "description":"All your base are belong to us!", "dataCountry":{ "countryCode":"FI","name":"Finland"}
}' \
--output-document \
- https://api.skenarios.com/api/v1/portfolio

...

{"portfolioId":961,"title":"My new portfolio!","description":"All your base are belong to us!","ownerUserId":"<username>","organization":"SkenarioLabs", 

"dataCountry":{"countryCode":"FI","name":"Finland","currencyName":"EURO","currencyCode":"EUR","currencySymbol":"€"}

,"projectId":961}

Take a note about the portfolioId, that's needed later for adding properties into the portfolio.

...