Sort diagram api reference