Signing and encryption are two concepts integral to api security.Encryption is the process that scrambles readable text so it can only be read by the person who has the secret code, or decryption key. It helps provide data security for sensitive information.Signing verifies the identity of the sender and ensures the data has not been altered in transit.The first step in securing an API is to ensure that only api requests sent over a secure channel (formerly known as SSL) are accepted.Communicating over TLS protects all credentials and API data in transit using end-to-end encryption.

What is a REST API?

REST stands for Representational State Transfer, Iit’s an approach for design and communication rather than a single tool or programming library. 
RESTful programming is stateless and provides a uniform interface, commonly using HTTP-based URLs with query parameters that mask the back-end infrastructure from the user. Responses typically come back as simple JSON-based key/value pairs.  An unprotected or poorly protected API (parituclarly one returning sensitve data) can be a major point of vulnerability.
 

How to secure rest API

The first step in securing an API is to ensure that only api requests sent over a secure channel (formerly known as SSL) are accepted.Communicating over TLS protects all credentials and API data in transit using end-to-end encryption. 

Once the communication is over TLS,  authentication and authorization can be handled via signing based or non signing based techniques.Note that signing verifies the identity of the sender and ensures the data has not been altered in transit. 

Signing based techniques

Note that A JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret or a public/private key pair. Access token issued by authorization server in oauth can be a self contained JWT token. Verification of token is typically done by public key of the authorization server.The purpose of using JWT is not to hide data but to ensure the authenticity of the data. JWT is signed and encoded, not encrypted.

Note that in Oauth / OIDC signed tokens may be used. 

Other techniques