How can I get the first part of the API Deployment URL from inside cloud formation template? https://u1i7vf9mnl.execute-api.us-west-1.amazonaws.com/v1

How can I get the u1i7vf9mnl portion of the URL from inside of the cloudformation template as a Ref or Fn::GetAtt or some other way?
Did you try the variable ServerlessRestApi? It works for us like this:

Outputs:    
    EncryptURL:
      Description: "Encrypt endpoint URL for Stage environment"
      Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Stage/encrypt"