For the complete documentation index, see llms.txt. This page is also available as Markdown.

Authorizing Requests

When sending requests to the API endpoints, the request includes a header that contains an authorization code. The authorization code is acquired by sending a request to DisasterAWARE Enterprise API Authorization endpoint.

Please note, authorization tokens are valid for 15 mins, at which time you will need to request a new authorization token. The tokens are standard JWT tokens, therefore you can decode the token to review the expiration (exp) value. You can paste your token into https://jwt.io to inspect the token details.

Authorization API

URL
HTTP Verb
Functionality

/authorize

POST

Login with posting credentials to get access and refresh JSON Web Tokens

Obtain a JWT access token

post

Authenticate with username and password to receive a short-lived JWT access token (15-minute expiry) and a refresh token.

Body
usernamestringRequiredExample: user@example.com
passwordstring · passwordRequiredExample: s3cret
Responses
200

Authentication successful.

application/json
accessTokenstringOptional

Short-lived JWT access token (15-minute expiry).

Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
refreshTokenstringOptional

Long-lived token used to obtain a new access token.

Example: dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4...
post/authorize
POST /authorize HTTP/1.1
Host: api-v2.disasteraware.com
Content-Type: application/json
Accept: */*
Content-Length: 51

{
  "username": "user@example.com",
  "password": "s3cret"
}
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refreshToken": "dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4..."
}

Last updated