code: @POST
      @Consumes(Servlets.JSON_MEDIA_TYPE)
      @Produces(Servlets.JSON_MEDIA_TYPE)
      public EntityMutationResponse createOrUpdate(AtlasEntityWithExtInfo entity) throws AtlasBaseException {
          AtlasPerfTracer perf = null;
  
          try {
              if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
                  perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.createOrUpdate()");
              }
  
              return entitiesStore.createOrUpdate(new AtlasEntityStream(entity), false);
          } finally {
              AtlasPerfTracer.log(perf);
          }
      }
docs: Create new entity or update existing entity in Atlas.
  Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName
  @param entity
  @return EntityMutationResponse
  @throws AtlasBaseException