:doc:`KinesisVideo <../../kinesisvideo>` / Client / get_data_endpoint

*****************
get_data_endpoint
*****************



.. py:method:: KinesisVideo.Client.get_data_endpoint(**kwargs)

  

  Gets an endpoint for a specified stream for either reading or writing. Use this endpoint in your application to read from the specified stream (using the ``GetMedia`` or ``GetMediaForFragmentList`` operations) or write to it (using the ``PutMedia`` operation).

   

  .. note::

    

    The returned endpoint does not have the API name appended. The client needs to add the API name to the returned endpoint.

    

   

  In the request, specify the stream either by ``StreamName`` or ``StreamARN``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kinesisvideo-2017-09-30/GetDataEndpoint>`_  


  **Request Syntax**
  ::

    response = client.get_data_endpoint(
        StreamName='string',
        StreamARN='string',
        APIName='PUT_MEDIA'|'GET_MEDIA'|'LIST_FRAGMENTS'|'GET_MEDIA_FOR_FRAGMENT_LIST'|'GET_HLS_STREAMING_SESSION_URL'|'GET_DASH_STREAMING_SESSION_URL'|'GET_CLIP'|'GET_IMAGES'
    )
    
  :type StreamName: string
  :param StreamName: 

    The name of the stream that you want to get the endpoint for. You must specify either this parameter or a ``StreamARN`` in the request.

    

  
  :type StreamARN: string
  :param StreamARN: 

    The Amazon Resource Name (ARN) of the stream that you want to get the endpoint for. You must specify either this parameter or a ``StreamName`` in the request.

    

  
  :type APIName: string
  :param APIName: **[REQUIRED]** 

    The name of the API action for which to get an endpoint.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'DataEndpoint': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DataEndpoint** *(string) --* 

        The endpoint value. To read data from the stream or to write data to it, specify this endpoint in your application.

        
  
  **Exceptions**
  
  *   :py:class:`KinesisVideo.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`KinesisVideo.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`KinesisVideo.Client.exceptions.ClientLimitExceededException`

  
  *   :py:class:`KinesisVideo.Client.exceptions.NotAuthorizedException`

  