Skip to content

Instantly share code, notes, and snippets.

@sfgov-mikela
sfgov-mikela / gist:0c8d4e36fc4509ea5e39ebebaaf0a01d
Created March 19, 2024 23:56
Pastes trying to test out the formio api endpoint
]As far as I can tell any customConditionals and conditionals are used as part of validation on the API
Original Valid Ab1114 submission
{"data":{"projectAddressDataItems":"[{\"id\":\"156270\",\"address\":\"1 SOUTH VAN NESS AV\",\"address_number\":\"1\",\"street_name\":\"SOUTH VAN NESS\",\"street_type\":\"AV\",\"unit_number\":\"\",\"block\":\"3506\",\"lot\":\"001\",\"parcel_number\":\"3506001\"}]","projectAddressLookupMethod":"lookup_by_address","projectAddressLookupFunctions":"","projectAddress":"1 SOUTH VAN NESS AV","projectAddressNumber":"1","projectAddressNumberSuffix":"","projectAddressStreetName":"SOUTH VAN NESS","projectAddressStreetType":"AV","projectAddressUnitNumber":"","projectAddressBlock":"3506","projectAddressLot":"001","projectAddressId":"156270","iAttestThatIMeetTheRequirementsToApplyForAPermitAndThatMyApplicationIncludesAllRequiredMaterialsAndDocumentation":true,"permitType":"Building Permit","resubmittal":"N","additionalhousingunits":"N","applicantFirstName":"gfsdfg","applicantLastName":"
The production AWS environment has SES setup for api.sf.gov. The staging server will have permission for api.dev.sf.gov can be setup manually(or grab Mikela)
From the platform_base playbook we will need to add this permission to the instance_profile IAM role.
https://docs.aws.amazon.com/ses/latest/dg/control-user-access.html#iam-and-ses-examples-access-specific-ses-api-version
It looks like the current iam_instance_profile is pointing at an s3_write_profile
https://github.com/SFDigitalServices/ansible-platform/blob/main/platform_deploy.yaml#L39
Which is created here
https://github.com/SFDigitalServices/ansible-platform/blob/main/roles/s3_public/tasks/main.yaml#L36
wget https://sfelections.org 2>&1
--2024-06-03 17:20:52-- https://sfelections.org/
Resolving sfelections.org (sfelections.org)... 104.19.186.94, 104.19.187.94, 2606:4700::6813:bb5e, ...
Connecting to sfelections.org (sfelections.org)|104.19.186.94|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 218 [text/html]
Saving to: ‘index.html.1’
index.html.1 100%[====================================================================================================================================>] 218 --.-KB/s in 0s